Patent ID: 11934837
Assignee: HUAWEI TECHNOLOGIES CO., LTD.
Field: Computer technology (Electrical engineering)
Classification: CPC G | IPC G

Claim 9:
10. A single instruction multiple data (SIMD) instruction generation device, wherein the SIMD instruction generation device supports a multipath technology, comprising:
a memory and a processor, wherein the memory is coupled to the processor; and
the memory stores program instructions, and when the program instructions are executed by the processor, the processor is enabled to perform operations:
obtaining a length of each of at least one loop dimension of a first tensor formula;
obtaining a plurality of groups of information about a first single instruction multiple data (SIMD) instruction model, wherein each group of information about the first SIMD instruction model corresponds to at least one loop dimension of one tensor formula, each group of information about the first SIMD instruction model comprises a first constraint condition, and the first constraint condition is used to indicate a constraint condition of a length of each of the at least one loop dimension;
selecting information about a second SIMD instruction model from the plurality of groups of information about the first SIMD instruction model based on the first constraint condition and the length of each of the at least one loop dimension of the first tensor formula, wherein the length of each of the at least one loop dimension of the first tensor formula meets the first constraint condition in the information about a second SIMD instruction model; and
generating, based on the length of each of the at least one loop dimension of the first tensor formula and the second SIMD instruction model, a first SIMD instruction obtained after the first tensor formula is converted.