IP Library › Granted Patent US 12,135,968
Granted Patent B2
US 12,135,968 · App. 17/134,358 · Granted Nov 5, 2024

Instructions to convert from FP16 to BF8

Inventors: Alexander Heinecke (San Jose, CA); Naveen Mellempudi (Bangalore, IN); Robert Valentine (Kiryat Tivon, IL); Mark Charney (Lexington, MA); Christopher Hughes (Santa Clara, CA); Evangelos Georganas (San Mateo, CA); Zeev Sperber (Zichron Yackov, IL); Amit Gradstein (Binyamina, IL); Simon Rubanovich (Haifa, IL)
Assignee: Intel Corporation
G06F9/30025G06F5/012G06F9/30036
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 12,135,968
App. No.
17/134,358
Granted
Nov 5, 2024
Kind
B2
Abstract

Techniques for converting FP16 to BF8 using bias are described. An exemplary embodiment utilizes decoder circuitry to decode a single instruction, the single instruction to include one or more fields to identify a first source operand, one or more fields to identify a second source operand, one or more fields to identify a source/destination operand, and one or more fields for an opcode, wherein the opcode is to indicate that execution circuitry is to convert packed half-precision data from the identified first and second sources to packed bfloat8 data using bias terms from the identified source/destination operand and store the packed bfloat8 data into corresponding data element positions of the identified source/destination operand; and execution circuitry to execute the decoded instruction according to the opcode to convert packed half-precision data from the identified first and second sources to packed bfloat8 data using bias terms from the identified source/destination operand and store the packed bfloat8 data into corresponding data element positions of the identified source/destination operand.

Claims (26)

1. An apparatus comprising:

decoder circuitry to decode a single instruction, the single instruction to include one or more fields to identify a first source operand, one or more fields to identify a second source operand, one or more fields to identify a source/destination operand, and one or more fields for an opcode, wherein the opcode is to indicate that execution circuitry is to convert packed half-precision floating-point data values from the identified first and second source operands to packed bfloat8 data values using bias terms from the identified source/destination operand and store the packed bfloat8 data values into corresponding data element positions of the identified source/destination operand; and

execution circuitry to execute the decoded instruction according to the opcode to convert packed half-precision floating-point data values from the identified first and second source operands to packed bfloat8 data values using bias terms from the identified source/destination operand and store the packed bfloat8 data values into corresponding data element positions of the identified source/destination operand.

2. The apparatus of claim 1 , wherein the first and second source operands are vector registers.

3. The apparatus of claim 1 , wherein the bias terms are 8-bit values.

4. The apparatus of claim 1 , wherein when a half-precision floating-point data value is infinite, a bfloat8 data value is set to be bits 15:8 of the half-precision floating-point data value.

5. The apparatus of claim 1 , wherein when a half-precision floating-point data value is not-a-number, a bfloat8 data value has bits 7:2 set to be bits 15:10 of the half-precision floating-point data value, bit 1 set to be a value of 1, and bit 0 set to be bit 8 of the half-precision floating-point data value.

6. The apparatus of claim 1 , wherein when a half-precision floating-point data value is not-a-number, a bfloat8 data value is to be computed by setting a first temporary value to be 0, setting bits 7:0 of the first temporary value to be a bias term, setting a second temporary value to be the half-precision floating-point data value plus the first temporary value, and the bfloat8 data value is set to be bits 15:8 of the second temporary value.

7. The apparatus of claim 1 , wherein the single instruction is further to include one or more fields to identify a writemask operand, wherein one or more bits of the writemask operand are to indicate to execution circuitry which of the converted bfloat8 data values are to be written in the source/destination operand.

8. A method comprising:

decoding a single instruction, the single instruction to include one or more fields to identify a first source operand, one or more fields to identify a second source operand, one or more fields to identify a source/destination operand, and one or more fields for an opcode, wherein the opcode is to indicate that execution circuitry is to convert packed half-precision floating-point data values from the identified first and second source operands to packed bfloat8 data values using bias terms from the identified source/destination operand and store the packed bfloat8 data values into corresponding data element positions of the identified source/destination operand; and

executing the decoded instruction according to the opcode to convert packed half-precision floating-point data values from the identified first and second source operands to packed bfloat8 data values using bias terms from the identified source/destination operand and store the packed bfloat8 data values into corresponding data element positions of the identified source/destination operand.

9. The method of claim 8 , wherein the one or more fields to identify the first source operand is to identify a vector register.

10. The method of claim 8 , wherein the bias terms are 8-bit values.

11. The method of claim 8 , wherein when a half-precision floating-point data value is infinite, a bfloat8 data value is set to be bits 15:8 of the half-precision floating-point data value.

12. The method of claim 8 , wherein when a half-precision floating-point data value is mot-a-number, a bfloat8 data value has bits 7:2 set to be bits 15:10 of the half-precision floating-point data value, bit 1 set to be a value of 1, and bit 0 set to be bit 8 of the half-precision floating-point data value.

13. The method of claim 8 , wherein when a half-precision floating-point data value is not-a-number, a bfloat8 data value is to be computed by setting a first temporary value to be 0, setting bits 7:0 of the first temporary value to be a bias term, setting a second temporary value to be the half-precision floating-point data value plus the first temporary value, and the bfloat8 data is set to be bits 15:8 of the second temporary value.

14. The method of claim 8 , wherein the single instruction is further to include one or more fields to identify a writemask operand, wherein one or more bits of the writemask operand are to indicate to execution circuitry which of the converted bfloat8 data values are to be written in the source/destination operand.

15. The method of claim 8 , further comprising translating the single instruction into one or more instructions of a different instruction set architecture prior to decoding, wherein executing of the one or more instructions of the different instruction set architecture is to be functionally equivalent as the executing according to the opcode of the single instruction.

16. A non-transitory machine-readable medium storing an instance of a single instruction that includes one or more fields to identify a first source operand, one or more fields to identify a second source operand, one or more fields to identify a source/destination operand, and one or more fields for an opcode, wherein the opcode is to indicate that execution circuitry is to convert packed half-precision data values from the identified first and second source operands to packed bfloat8 data values using bias terms from the identified source/destination operand and store the packed bfloat8 data values into corresponding data element positions of the identified source/destination operand, wherein the instance of the single instruction is to be handled by a processor by performing a method, the method comprising:

decoding the single instruction; and

executing the decoded instruction according to the opcode to convert packed half-precision data values from the identified first and second source operands to packed bfloat8 data values using bias terms from the identified source/destination operand and store the packed bfloat8 data values into corresponding data element positions of the identified source/destination operand.

17. The non-transitory machine-readable medium of claim 16 , wherein when a half-precision floating-point data value is infinite, a bfloat8 data value is set to be bits 15:8 of the half-precision floating-point data value.

18. The non-transitory machine-readable medium of claim 16 , wherein when a half-precision floating-point data value is not-a-number, a bfloat8 data value has bits 7:2 set to be bits 15:10 of the half-precision floating-point data value, bit 1 set to be a value of 1, and bit 0 set to be bit 8 of the half-precision floating-point data value.

19. The non-transitory machine-readable medium of claim 16 , wherein when a half-precision floating-point data value is not-a-number, a bfloat8 data value is to be computed by setting a first temporary value to be 0, setting bits 7:0 of the first temporary value to be a bias term, setting a second temporary value to be the half-precision floating-point data value plus the first temporary value, and the bfloat8 data value is set to be bits 15:8 of the second temporary value.

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

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded May 13, 2021
From: HEINECKE, ALEXANDER; MELLEMPUDI, NAVEEN; VALENTINE, ROBERT; CHARNEY, MARK; HUGHES, CHRISTOPHER; GEORGANAS, EVANGELOS; SPERBER, ZEEV; GRADSTEIN, AMIT; RUBANOVICH, SIMON
To: INTEL CORPORATION
Reel/Frame 056234/0785 →
Continuity (1)
Related Publication 20220206743A1 · Jun 30, 2022