# US 2024/0095302 A1 · Changing precision of operands

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

- Number: US 2024/0095302 A1
- Document ID: US20240095302A1
- Status: Published application
- Kind: A1
- Application number: 17/846,409
- Filed: 2022-06-22
- Published: 2024-03-21
- Earliest claimed: 2022-06-22
- Assignees: NVIDIA Corporation
- Applicants: NVIDIA Corporation
- Inventors: Jiqun Tu; David Maxwell Clark
- Web page: https://patentgrep.com/patent/US20240095302A1

## CPC

- G06F 7/483: Computations with numbers represented by a non-linear combination of denominational numbers, e.g. rational numbers, logarithmic number system or floating-point numbers {(G06F7/4806, G06F7/4824, G06F7/49, G06F7/491, G06F7/544 take precedence)}
- G06F 17/16: Matrix or vector computation {, e.g. matrix-matrix or matrix-vector multiplication, matrix factorization (matrix transposition G06F7/78)}
- G06F 7/5443: {Sum of products (for applications thereof, see the relevant places, e.g. G06F17/10, H03H17/00)}
- H03M 7/24: Conversion to or from floating-point codes
- G06F 2207/3812: Devices capable of handling different types of numbers
- G06F 2207/3828: Multigauge devices, i.e. capable of handling packed numbers without unpacking them
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)
- H03M: CODING; DECODING; CODE CONVERSION IN GENERAL (using fluidic means F15C4/00; optical analogue/digital converters G02F7/00; coding, decoding or code conversion, specially adapted for particular applications, see the relevant subclasses, e.g. G01D, G01R, G06F, G06T, G09G, G10L, G11B, G11C, H04B, H04L, H04M, H04N; ciphering or deciphering for cryptography or other purposes involving the need for secrecy G09C)

## Abstract

Apparatuses, systems, and techniques to perform matrix multiply-accumulate (MMA) operations on data of a first type using one or more MMA instructions for data of a second type. In at least one embodiment, a single tensorfloat-32 (TF32) MMA instruction computes a 32-bit floating point (FP32) output using TF32 input operands converted from FP32 data values.

## Claims

### Claim 1

A processor comprising:
one or more circuits to transform one or more operands of a first datatype to one or more operands of a second datatype and causing a matrix multiply-accumulate (MMA) operation to be performed on the one or more operands of the second datatype.

### Claim 2 (depends on 1)

The processor of claim 1, wherein the one or more operands of the first datatype are to be transformed by causing a first portion of the one or more operands of the first datatype to be stored as the one or more operands of the second datatype and a second portion of the one or more operands of the first datatype to be stored as one or more other operands of the second datatype.

### Claim 3 (depends on 1)

The processor of claim 1, wherein the MMA operation, if performed by the one or more circuits, causes the one or more circuits to perform one or more mathematical operations specific to the second datatype.

### Claim 4 (depends on 1)

The processor of claim 1, wherein the one or more operands of a first datatype comprise one or more first sets of data and the one or more operands of the second datatype comprise one or more second sets of data transformed from the one or more first sets of data by combining one or more subsets of the one or more first sets of data.

### Claim 5 (depends on 1)

The processor of claim 1, wherein the MMA operation, if performed by the one or more circuits, is to generate one or more outputs of the first datatype.

### Claim 6 (depends on 1)

The processor of claim 1, wherein the one or more circuits are to transform the one or more operands of the first datatype by causing one or more first bits to be stored as a first set of bits in the one or more operands of the second datatype, one or more second bits to be stored as a second set of bits in the one or more operands of the second datatype, and one or more third bits to be stored as a third set of bits in the one or more operands of the second datatype.

### Claim 7

A system comprising:
one or more processors to convert one or more operands of a first datatype to one or more operands of a second datatype and causing a matrix multiply-accumulate (MMA) operation to be performed on the one or more operands of the second datatype.

### Claim 8 (depends on 7)

The system of claim 7, wherein the one or more operands of the first datatype comprise one or more sets of data with a set of dimensions and the MMA operation, if performed by the one or more processors, is to generate one or more other sets of data of the first datatype with a subset of the set of dimensions.

### Claim 9 (depends on 7)

The system of claim 7, wherein the one or more operands of the first datatype comprise one or more first sets of data with a set of dimensions and the one or more operands of the second datatype comprise one or more second sets of data each with a subset of the set of dimensions, the one or more second sets of data to be used by the MMA operation.

### Claim 10 (depends on 7)

The system of claim 7, wherein causing the MMA operation to be performed on the one or more operands of the second datatype causes the one or more processors to generate one or more sets of data of the first datatype.

### Claim 11 (depends on 7)

The system of claim 7, wherein the one or more processors are to convert the one or more operands of the first datatype by causing one or more first bits to be stored as a first set of bits in the one or more operands of the second datatype, one or more second bits to be stored as a second set of bits in the one or more operands of the second datatype, and one or more third bits to be stored as a third set of bits in the one or more operands of the second datatype.

### Claim 12 (depends on 7)

The system of claim 7, wherein the one or more processors are to convert the one or more operands of the first datatype by calculating one or more differences between each of the one or more operands of the first datatype and each of the one or more operands of the second datatype and storing the one or more differences in another one or more operands of the second datatype.

### Claim 13 (depends on 7)

The system of claim 7, wherein the MMA operation has a shape and the one or more operands of the second datatype comprise one or more sets of data to satisfy the shape.

### Claim 14

A machine-readable medium having stored thereon one or more instructions, which if performed by one or more processors, cause the one or more processors to at least:
change one or more operands of a first datatype to one or more operands of a second datatype and causing a matrix multiply-accumulate (MMA) operation to be performed on the one or more operands of the second datatype.

### Claim 15 (depends on 14)

The machine-readable medium of claim 14, further comprising instructions, which if performed by the one or more processors, cause the one or more processors to change the one or more operands of the first datatype to the one or more operands of the second datatype by calculating a first portion of the one or more operands of the first datatype to be stored as the one or more operands of the second datatype and a second portion of the one or more operands of the first datatype to be stored as one or more other operands of the second datatype.

### Claim 16 (depends on 14)

The machine-readable medium of claim 14, further comprising instructions, which if performed by the one or more processors, cause the one or more processors to change the one or more operands of the first datatype by causing one or more first bits to be stored as a first set of bits in the one or more operands of the second datatype, one or more second bits to be stored as a second set of bits in the one or more operands of the second datatype, and one or more third bits to be stored as a third set of bits in the one or more operands of the second datatype.

### Claim 17 (depends on 14)

The machine-readable medium of claim 14, further comprising instructions, which if performed by the one or more processors, cause the one or more processors to convert the one or more operands of the first datatype by calculating one or more differences between each of the one or more operands of the first datatype and each of the one or more operands of the second datatype and storing the one or more differences in another one or more operands of the second datatype.

### Claim 18 (depends on 14)

The machine-readable medium of claim 14, wherein the MMA operation to be performed on the one or more operands of the second datatype causes the one or more processors to generate one or more results of the first datatype.

### Claim 19 (depends on 14)

The machine-readable medium of claim 14, wherein the one or more operands of a first datatype comprise one or more first sets of data and the one or more operands of the second datatype comprise one or more second sets of data calculated based, at least in part, on the one or more first sets of data and the MMA operation is to be performed on one or more combinations of the one or more second sets of data.

### Claim 20 (depends on 14)

The machine-readable medium of claim 14, wherein the MMA operation has a shape determined based, at least in part, on a set of dimensions of the one or more operands of the second datatype and the MMA operation is specific to the second datatype.

### Claim 21

A method comprising:
transforming one or more operands of a first datatype to one or more operands of a second datatype and causing a matrix multiply-accumulate (MMA) operation to be performed on the one or more operands of the second datatype.

### Claim 22 (depends on 21)

The method of claim 21, further comprising transforming the one or more operands of the first datatype by causing one or more first bits of the one or more operands of the first datatype to be stored in the one or more operands of the second datatype, causing one or more second bits of the one or more operands of the first datatype to be stored in the one or more operands of the second datatype, and causing one or more third bits of the one or more operands of the first datatype to be stored in the one or more operands of the second datatype.

### Claim 23 (depends on 21)

The method of claim 21, further comprising transforming the one or more operands of the first datatype by calculating one or more differences between each of the one or more operands of the first datatype and each of the one or more operands of the second datatype and storing the one or more differences in another one or more operands of the second datatype to be usable as input to the MMA operation.

### Claim 24 (depends on 21)

The method of claim 21, wherein transforming the one or more operands of the first datatype to the one or more operands of the second datatype comprises calculating a first portion of the one or more operands of the first datatype to be stored as the one or more operands of the second datatype and a second portion of the one or more operands of the first datatype to be stored as one or more other operands of the second datatype, and the MMA operation is to be performed based, at least in part, on the one or more operands of the second datatype and the one or more other operands of the second datatype.

### Claim 25 (depends on 21)

The method of claim 21, wherein the MMA operation has a shape determined based, at least in part, on one or more dimensions of the one or more operands of the second datatype and the MMA operation is specific to the second datatype.

### Claim 26 (depends on 21)

The method of claim 21, further comprising generating one or more outputs of the first data type by the MMA operation based, at least in part, on the one or more operands of the second datatype.

### Claim 27 (depends on 21)

The method of claim 21, wherein the MMA operation comprises one or more multiplication operations and one or more accumulation operations to generate one or more data sets of the first datatype based, at least in part, on the one or more operands of the second datatype.

### Claim 28

A processor comprising:
one or more circuits to convert one or more thirty-two bit floating point (FP32) operands to one or more tensorflow32 (TF32) operands and cause a matrix-multiply-accumulate (MMA) operation to be performed on the one or more TF32 operands.

### Claim 29 (depends on 28)

The processor of claim 28, wherein each of the one or more FP32 operands comprises a one-bit sign, an eight-bit exponent, and a twenty three-bit mantissa, and the one or more circuits are to convert the one or more FP32 operands by copying, for each of the one or more FP32 operands, the one-bit sign, the eight-bit exponent, and a first ten bits of the twenty-three bit mantissa to at least one of the one or more TF32 operands.

### Claim 30 (depends on 28)

The processor of claim 28, wherein the one or more circuits are to convert the one or more FP32 operands to the one or more TF32 operands by computing one or more differences between the one or more FP32 operands and one or more other data values and copying the one or more differences to the one or more TF32 operands.

### Claim 31 (depends on 28)

The processor of claim 28, wherein the MMA operation is an m16n8k4 MMA instruction which, if executed, causes the one or more circuits to compute one or more sets of FP32 data.

### Claim 32 (depends on 28)

The processor of claim 28, wherein the one or more FP32 operands comprise a first set of data with a first width and a first height and a second set of data with a second width and a second height and the one or more TF32 operands comprise a third set of data with at least the first height and a fourth set of data with at least the second width and the MMA operation, if performed, causes the one or more circuits to generate a fifth set of data with at least the first height and the second width.

### Claim 33 (depends on 28)

The processor of claim 28, wherein the one or more TF32 operands comprise a first set of data computed based, at least in part, on at least one mantissa of the one or more FP32 operands and a second set of data computed based, at least in part, on one or more differences between the one or more FP32 operands and one or more data values.

### Claim 34 (depends on 28)

The processor of claim 28, wherein the MMA operation comprises a shape and the one or more TF32 operands comprise one or more dimensions to satisfy the shape.

### Claim 35

A system comprising:
one or more processors to convert one or more thirty-two bit floating point (FP32) operands to one or more tensorflow32 (TF32) operands and cause a matrix-multiply-accumulate (MMA) operation to be performed on the one or more TF32 operands.

### Claim 36 (depends on 35)

The system of claim 35, wherein the MMA operation comprises a shape and the shape indicates one or more dimensions of the one or more TF32 operands.

### Claim 37 (depends on 35)

The system of claim 35, wherein the MMA operation is a m16n8k4 TF32 MMA instruction that, if executed, causes the one or more processors to compute one or more FP32 data values based, at least in part, on the one or more TF32 operands.

### Claim 38 (depends on 35)

The system of claim 35, wherein the one or more TF32 operands comprise a first set of data computed based, at least in part, on at least one mantissa of the one or more FP32 operands and a second set of data computed based, at least in part, on one or more differences between the one or more FP32 operands and one or more data values.

### Claim 39 (depends on 35)

The system of claim 35, wherein each of the one or more FP32 operands comprises a one-bit sign, an eight-bit exponent, and a twenty three-bit mantissa, and the one or more processors are to convert at least one of the one or more FP32 operands by copying, for the at least one of the one or more FP32 operands, the one-bit sign, the eight-bit exponent, and a first ten bits of the twenty-three bit mantissa to at least one of the one or more TF32 operands.

### Claim 40 (depends on 35)

The system of claim 35, wherein the one or more FP32 operands comprise a first set of data with a first width and a first height and a second set of data with a second width and a second height and the one or more TF32 operands comprise a third set of data with at least the first height and a fourth set of data with at least the second width and the MMA operation, if performed, causes the one or more processors to generate a fifth set of data with at least the first height and the second width.

### Claim 41 (depends on 35)

The system of claim 35, wherein the one or more processors are the convert the one or more FP32 operands by decomposing each of the one or more FP32 operands into a high part and a low part and copying the high part and the low part into sets of data to be combined into the one or more TF32 operands.

### Claim 42 (depends on 35)

The system of claim 35, wherein the MMA operation is to be performed in response to an m16n8k4 TF32 MMA instruction.

### Claim 43

A machine-readable medium having stored thereon one or more instructions, which if performed by one or more processors, cause the one or more processors to at least:
convert one or more thirty-two bit floating point (FP32) operands to one or more tensorflow32 (TF32) operands and cause a matrix-multiply-accumulate (MMA) operation to be performed on the one or more TF32 operands.

### Claim 44 (depends on 43)

The machine-readable medium of claim 43, further comprising instructions that, if performed by the one or more processors, cause the one or more processors to convert the one or more FP32 operands by decomposing each of the one or more FP32 operands into a high part and a low part and copying the high part and the low part into sets of data to be combined into the one or more TF32 operands.

### Claim 45 (depends on 43)

The machine-readable medium of claim 43, further comprising instructions that, if performed by the one or more processors, cause the one or more processors to convert the one or more FP32 operands by copying a one-bit sign, an eight-bit exponent, and a first ten bits of a twenty three-bit mantissa of at least one of the one or more FP32 operands to at least one of the one or more TF32 operands.

### Claim 46 (depends on 43)

The machine-readable medium of claim 43, further comprising instructions that, if performed by the one or more processors, cause the one or more processors to convert the one or more FP32 operands by calculating one or more differences between at least one of the one or more FP32 operands and one or more data values and copying the one or more differences to at least one of the one or more TF32 operands.

### Claim 47 (depends on 43)

The machine-readable medium of claim 43, wherein the MMA operation comprises a shape and the shape indicates one or more dimensions of the one or more TF32 operands.

### Claim 48 (depends on 43)

The machine-readable medium of claim 43, wherein the MMA operation is an m16n8k4 MMA instruction and the MMA operation is to generate one or more sets of FP32 data.

### Claim 49 (depends on 43)

The machine-readable medium of claim 43, wherein the one or more FP32 operands comprise a first set of data with a first width and a first height and a second set of data with a second width and a second height and the one or more TF32 operands comprise a third set of data with at least the first height and a fourth set of data with at least the second width and the MMA operation causes the one or more processors to generate a fifth set of data with at least the first height and the second width.

### Claim 50

A method comprising:
converting one or more thirty-two bit floating point (FP32) operands to one or more tensorflow32 (TF32) operands and causing a matrix-multiply-accumulate (MMA) operation to be performed on the one or more TF32 operands.

### Claim 51 (depends on 50)

The method of claim 50, further comprising converting the one or more FP32 operands by decomposing each of the one or more FP32 operands into at least one high part and at least one low part to be combined into at least one of the one or more TF32 operands.

### Claim 52 (depends on 50)

The method of claim 50, further comprising converting the one or more FP32 operands by copying a one-bit sign, an eight-bit exponent, and a first ten bits of a twenty three-bit mantissa of at least one of the one or more FP32 operands to at least one of the one or more TF32 operands and calculating one or more differences between the at least one of the one or more FP32 operands and one or more data values and copying the one or more differences to the at least one of the one or more TF32 operands.

### Claim 53 (depends on 50)

The method of claim 50, wherein the one or more FP32 operands comprise a first set of data with a first width and a first height and a second set of data with a second width and a second height and the one or more TF32 operands comprise a third set of data with at least the first height and a fourth set of data with at least the second width and the MMA operation is to generate a fifth set of data with at least the first height and the second width.

### Claim 54 (depends on 50)

The method of claim 50, wherein the MMA operation comprises a shape and the shape indicates one or more dimensions of the one or more TF32 operands.

### Claim 55 (depends on 50)

The method of claim 50, wherein the MMA operation is an m16n8k4 MMA instruction.

### Claim 56 (depends on 50)

The method of claim 50, wherein causing the MMA operation to be performed causes one or more sets of FP32 data to be generated based, at least in part, on the one or more TF32 operands.
