# US 2023/0068781 A1 · Bfloat16 scale and/or reduce instructions

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2023/0068781 A1
- Document ID: US20230068781A1
- Status: Published application
- Kind: A1
- Application number: 17/463,382
- Filed: 2021-08-31
- Published: 2023-03-02
- Earliest claimed: 2021-08-31
- Assignees: Intel Corporation
- Applicants: Intel Corporation
- Inventors: Menachem ADELMAN; Alexander HEINECKE; Robert VALENTINE; Zeev SPERBER; Amit GRADSTEIN; Mark CHARNEY; Evangelos GEORGANAS; Dhiraj KALAMKAR; Christopher HUGHES; Cristina ANDERSON
- Web page: https://patentgrep.com/patent/US20230068781A1

## CPC

- G06F 9/30145: {Instruction analysis, e.g. decoding, instruction word fields}
- G06F 9/30036: {Instructions to perform operations on packed data, e.g. vector, tile or matrix operations}
- G06F 9/30038: {using a mask}
- G06F 9/30101: {Special purpose registers}
- G06F 9/30014: {with variable precision}
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

Techniques for scale and reduction of BF16 data elements are described. An exemplary instruction includes fields for an having fields for an opcode, an identification of a location of a first packed data source operand, an identification of a location of a second packed data source operand, and an identification of a packed data destination operand, wherein the opcode is to indicate that execution circuitry is to perform, for each data element position of the packed data source operands, a floating point scale operation of a BF16 data element of the first packed data source by multiplying the data element by a power of 2 value, wherein a value of the exponent of the power of 2 value is a floor value of a BF16 data element of the second packed data source, and store a result of the floating point scale operation into a corresponding data element position of the packed data destination operand.

## Claims

### Claim 1

An apparatus comprising:
decode circuitry to decode an instance of a single instruction, the single instruction to include fields for an having fields for an opcode, an identification of a location of a first packed data source operand, an identification of a location of a second packed data source operand, and an identification of a packed data destination operand, wherein the opcode is to indicate that execution circuitry is to perform, for each data element position of the packed data source operands, a floating point scale operation of a BF16 data element of the first packed data source by multiplying the data element by a power of 2 value, wherein a value of the exponent of the power of 2 value is a floor value of a BF16 data element of the second packed data source, and store a result of the floating point scale operation into a corresponding data element position of the packed data destination operand; and
the execution circuitry to execute the decoded instruction according to the opcode.

### Claim 2 (depends on 1)

The apparatus of claim 1, wherein the field for the identification of the first source operand is to identify a vector register.

### Claim 3 (depends on 1)

The apparatus of claim 1, wherein the field for the identification of the first source operand is to identify a memory location.

### Claim 4 (depends on 1)

The apparatus of claim 1, wherein the execution circuitry is to use a round to nearest even rounding mode during execution of the decoded instruction.

### Claim 5 (depends on 1)

The apparatus of claim 1, wherein the floor value is a zero when the data element of the second packed data source is a denormal.

### Claim 6 (depends on 1)

The apparatus of claim 1, wherein the data element of the first packed data source is a zero when the data element of the first packed data source is a denormal.

### Claim 7 (depends on 1)

The apparatus of claim 1, wherein the instruction is to further include one or more fields for a writemask register.

### Claim 8

A system comprising:
memory to store an instance of a single instruction;
decode circuitry to decode the instance of the single instruction, the single instruction to include fields for an having fields for an opcode, an identification of a location of a first packed data source operand, an identification of a location of a second packed data source operand, and an identification of a packed data destination operand, wherein the opcode is to indicate that execution circuitry is to perform, for each data element position of the packed data source operands, a floating point scale operation of a BF16 data element of the first packed data source by multiplying the data element by a power of 2 value, wherein a value of the exponent of the power of 2 value is a floor value of a BF16 data element of the second packed data source, and store a result of the floating point scale operation into a corresponding data element position of the packed data destination operand; and
the execution circuitry to execute the decoded instruction according to the opcode.

### Claim 9 (depends on 8)

The system of claim 8, wherein the field for the identification of the first source operand is to identify a vector register.

### Claim 10 (depends on 8)

The system of claim 8, wherein the field for the identification of the first source operand is to identify a memory location.

### Claim 11 (depends on 8)

The system of claim 8, wherein the execution circuitry is to use a round to nearest even rounding mode during execution of the decoded instruction.

### Claim 12 (depends on 8)

The system of claim 8, wherein the floor value is a zero when the data element of the second packed data source is a denormal.

### Claim 13 (depends on 8)

The system of claim 8, wherein the instruction is to further include one or more fields for a writemask register.

### Claim 14 (depends on 8)

The system of claim 8, wherein the data element of the first packed data source is a zero when the data element of the first packed data source is a denormal.

### Claim 15

A non-transitory machine-readable medium storing at least an instance of a particular single instruction, wherein the instance of the particular single instruction is to be processed by a processor by performing a method comprising:
decoding the instance of the single instruction, the single instruction to include fields for an having fields for an opcode, an identification of a location of a first packed data source operand, an identification of a location of a second packed data source operand, and an identification of a packed data destination operand, wherein the opcode is to indicate that execution circuitry is to perform, for each data element position of the packed data source operands, a floating point scale operation of a BF16 data element of the first packed data source by multiplying the data element by a power of 2 value, wherein a value of the exponent of the power of 2 value is a floor value of a BF16 data element of the second packed data source, and store a result of the floating point scale operation into a corresponding data element position of the packed data destination operand; and
executing the decoded instruction according to the opcode.

### Claim 16 (depends on 15)

The non-transitory machine-readable medium of claim 15, wherein the field for the identification of the first source operand is to identify a vector register.

### Claim 17 (depends on 15)

The non-transitory machine-readable medium of claim 15, wherein the field for the identification of the first source operand is to identify a memory location.

### Claim 18 (depends on 15)

The non-transitory machine-readable medium of claim 15, wherein the executing is to use a round to nearest even rounding mode during execution of the decoded instruction.

### Claim 19 (depends on 15)

The non-transitory machine-readable medium of claim 15, wherein the floor value is a zero when the data element of the second packed data source is a denormal.

### Claim 20 (depends on 15)

The non-transitory machine-readable medium of claim 15, wherein the instruction is to further include one or more fields for a writemask register.

### Claim 21 (depends on 15)

The non-transitory machine-readable medium of claim 15, wherein the data element of the first packed data source is a zero when the data element of the first packed data source is a denormal.

### Claim 22

A non-transitory machine-readable medium storing at least an instance of a particular single instruction, wherein the instance of the particular single instruction is to be processed by a processor by performing a method comprising:
translating the particular single instruction from a first instruction set architecture to one or more instructions of a second, different instruction set architecture, the particular single instruction to include fields for an having fields for an opcode, an identification of a location of a first packed data source operand, an identification of a location of a second packed data source operand, and an identification of a packed data destination operand, wherein the opcode is to indicate that execution circuitry is to perform, for each data element position of the packed data source operands, a floating point scale operation of a BF16 data element of the first packed data source by multiplying the data element by a power of 2 value, wherein a value of the exponent of the power of 2 value is a floor value of a BF16 data element of the second packed data source, and store a result of the floating point scale operation into a corresponding data element position of the packed data destination operand;
decoding the one or more instructions of a second, different instruction set architecture;
executing the decoded one or more instructions of a second, different instruction set architecture.

### Claim 23 (depends on 22)

The non-transitory machine-readable medium of claim 22, wherein the field for the identification of the first source operand is to identify a vector register.

### Claim 24 (depends on 22)

The non-transitory machine-readable medium of claim 22, wherein the field for the identification of the first source operand is to identify a memory location.

### Claim 25 (depends on 22)

The non-transitory machine-readable medium of claim 22, wherein the executing is to use a round to nearest even rounding mode during execution of the decoded instruction.

### Claim 26 (depends on 22)

The non-transitory machine-readable medium of claim 22, wherein the floor value is a zero when the data element of the second packed data source is a denormal.

### Claim 27 (depends on 22)

The non-transitory machine-readable medium of claim 22, wherein the data element of the first packed data source is a zero when the data element of the first packed data source is a denormal.

### Claim 28 (depends on 22)

The non-transitory machine-readable medium of claim 22, wherein the instruction is to further include one or more fields for a writemask register.

### Claim 29

A method comprising:
translating the particular single instruction from a first instruction set architecture to one or more instructions of a second, different instruction set architecture, the particular single instruction to include fields for an having fields for an opcode, an identification of a location of a first packed data source operand, an identification of a location of a second packed data source operand, and an identification of a packed data destination operand, wherein the opcode is to indicate that execution circuitry is to perform, for each data element position of the packed data source operands, a floating point scale operation of a BF16 data element of the first packed data source by multiplying the data element by a power of 2 value, wherein a value of the exponent of the power of 2 value is a floor value of a BF16 data element of the second packed data source, and store a result of the floating point scale operation into a corresponding data element position of the packed data destination operand;
decoding the one or more instructions of a second, different instruction set architecture;
executing the decoded one or more instructions of a second, different instruction set architecture.

### Claim 30 (depends on 29)

The non-transitory machine-readable medium of claim 29, wherein the field for the identification of the first source operand is to identify a vector register.

### Claim 31 (depends on 29)

The non-transitory machine-readable medium of claim 29, wherein the field for the identification of the first source operand is to identify a memory location.

### Claim 32 (depends on 29)

The non-transitory machine-readable medium of claim 29, wherein the executing is to use a round to nearest even rounding mode during execution of the decoded instruction.

### Claim 33 (depends on 29)

The non-transitory machine-readable medium of claim 29, wherein the floor value is a zero when the data element of the second packed data source is a denormal.

### Claim 34 (depends on 29)

The non-transitory machine-readable medium of claim 29, wherein the instruction is to further include one or more fields for a writemask register.

### Claim 35 (depends on 29)

The non-transitory machine-readable medium of claim 29, wherein the data element of the first packed data source is a zero when the data element of the first packed data source is a denormal.
