# US 2023/0409891 A1 · Scaling half-precision floating point tensors for training deep neural networks

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

- Number: US 2023/0409891 A1
- Document ID: US20230409891A1
- Status: Published application
- Kind: A1
- Application number: 18/456,272
- Filed: 2023-08-25
- Published: 2023-12-21
- Earliest claimed: 2017-05-03
- Assignees: Intel Corporation
- Applicants: Intel Corporation
- Inventors: NAVEEN MELLEMPUDI; DIPANKAR DAS
- Web page: https://patentgrep.com/patent/US20230409891A1

## CPC

- G06N 3/063: using electronic means
- G06F 5/012: {in floating-point computations}
- G06F 7/487: Multiplying; Dividing {(G06F7/4833, G06F7/4836 take precedence)}
- G06F 7/5443: {Sum of products (for applications thereof, see the relevant places, e.g. G06F17/10, H03H17/00)}
- G06F 9/30014: {with variable precision}
- G06N 3/044: Recurrent networks, e.g. Hopfield networks
- G06N 3/0442: characterised by memory or gating, e.g. long short-term memory [LSTM] or gated recurrent units [GRU]
- G06N 3/045: Combinations of networks
- G06N 3/0464: Convolutional networks [CNN, ConvNet]
- G06N 3/084: Backpropagation, e.g. using gradient descent
- G06N 3/0895: Weakly supervised learning, e.g. semi-supervised or self-supervised learning
- G06N 3/09: Supervised learning
- G06N 3/098: Distributed learning, e.g. federated learning
- G06T 1/20: Processor architectures; Processor configuration, e.g. pipelining
- G06N: COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)
- G06T: IMAGE DATA PROCESSING OR GENERATION, IN GENERAL

## Abstract

One embodiment provides for a machine-learning accelerator device a multiprocessor to execute parallel threads of an instruction stream, the multiprocessor including a compute unit, the compute unit including a set of functional units, each functional unit to execute at least one of the parallel threads of the instruction stream. The compute unit includes compute logic configured to execute a single instruction to scale an input tensor associated with a layer of a neural network according to a scale factor, the input tensor stored in a floating-point data type, the compute logic to scale the input tensor to enable a data distribution of data of the input tensor to be represented by a 16-bit floating point data type.

## Claims

### Claim 1

A graphics processor comprising:
a memory controller;
a level 2 (L2) cache memory coupled with the memory controller; and
a multiprocessor coupled with the memory controller, the multiprocessor having a single instruction, multiple thread (SIMT) architecture including hardware multi-threading, the multiprocessor to execute parallel threads of instructions associated with a command stream, the multiprocessor including a set of functional units to execute at least one of the parallel threads of the instructions, wherein the set of functional units include a mixed precision tensor processor to perform tensor computations to generate a scaled 16-bit floating point gradient tensor.

### Claim 2 (depends on 1)

The graphics processor as in claim 1, wherein the mixed precision tensor processor is to perform tensor computations associated with a layer of a neural network to generate the scaled 16-bit floating point gradient tensor.

### Claim 3 (depends on 2)

The graphics processor as in claim 2, wherein the mixed precision tensor processor is additionally to perform a backward propagation operation associated with the layer of the neural network.

### Claim 4 (depends on 1)

The graphics processor as in claim 1, wherein to generate the scaled 16-bit floating point gradient tensor includes to scale input data to the tensor computations by a scale factor.

### Claim 5 (depends on 4)

The graphics processor as in claim 4, wherein the multiprocessor is to determine the scale factor based on a maximum value representable by a data type of the scaled 16-bit floating point gradient tensor.

### Claim 6 (depends on 5)

The graphics processor as in claim 5, wherein scale factor is configured such that a maximum value of the scaled 16-bit floating point gradient tensor is below the maximum value representable by the data type of the scaled 16-bit floating point gradient tensor.

### Claim 7 (depends on 6)

The graphics processor as in claim 6, wherein the data type of the scaled 16-bit floating point gradient tensor is a non-IEEE floating point data type.

### Claim 8 (depends on 1)

The graphics processor as in claim 1, additionally comprising a 3D memory stack coupled to the memory controller.

### Claim 9 (depends on 8)

The graphics processor as in claim 8, wherein the 3D memory stack includes high-bandwidth memory.

### Claim 10

A non-transitory machine-readable medium to store instructions to cause one or more processors to perform operations comprising:
executing, on a graphics processor, parallel threads of instructions associated with a command stream via a multiprocessor coupled with a memory controller, the multiprocessor having a single instruction, multiple thread (SIMT) architecture including hardware multi-threading, wherein the multiprocessor includes a mixed precision tensor processor;
performing, via the mixed precision tensor processor, tensor computations associated with a layer of a neural network to generate error values, the error values stored in a floating point format;
scaling the error values generated via the tensor computations by a scale factor to generate scaled error values; and
performing a backward propagation operation associated with the layer of the neural network via the scaled error values to generate a scaled 16-bit floating point gradient tensor.

### Claim 11 (depends on 10)

The non-transitory machine-readable medium as in claim 10, the operations additionally comprising adjusting the scale factor based on output of the tensor computations associated with the layer of a neural network.

### Claim 12 (depends on 11)

The non-transitory machine-readable medium as in claim 11, the operations additionally comprising dynamically adjusting the scale factor between layers of the neural network.

### Claim 13 (depends on 12)

The non-transitory machine-readable medium as in claim 12, the operations comprising selecting a scale factor to increase a minimum value generated for the scaled 16-bit floating point gradient tensor to above the minimum value representable by a data type of the scaled 16-bit floating point gradient tensor.

### Claim 14 (depends on 12)

The non-transitory machine-readable medium as in claim 12, the operations comprising selecting a scale factor to scale a maximum value of the scaled 16-bit floating point gradient tensor to below the maximum value representable by a data type of the scaled 16-bit floating point gradient tensor.

### Claim 15

A graphics processing system comprising:
a graphics memory; and
a graphics processor including a memory controller coupled with the graphics memory, a level 2 (L2) cache memory coupled with the memory controller, and a multiprocessor coupled with the memory controller, the multiprocessor having a single instruction, multiple thread (SIMT) architecture including hardware multi-threading, the multiprocessor to execute parallel threads of instructions associated with a command stream, the multiprocessor including a set of functional units to execute at least one of the parallel threads of the instructions, wherein the set of functional units include a mixed precision tensor processor to perform tensor computations to generate a scaled 16-bit floating point gradient tensor.

### Claim 16 (depends on 15)

The graphics processing system as in claim 15, additionally comprising a host interconnect bus coupled to the graphics processor and the graphics memory.

### Claim 17 (depends on 16)

The graphics processing system as in claim 16, wherein the graphics memory includes a graphics double data rate (GDDR) memory including GDDR6 memory.

### Claim 18 (depends on 15)

The graphics processing system as in claim 15, wherein the mixed precision tensor processor is to perform tensor computations associated with a layer of a neural network to generate error values.

### Claim 19 (depends on 18)

The graphics processing system as in claim 18, wherein the mixed precision tensor processor is additionally to perform a backward propagation operation associated with the layer of the neural network.

### Claim 20 (depends on 19)

The graphics processing system as in claim 19, wherein to scale the error values includes to select a scale factor such that a maximum value of the scaled 16-bit floating point gradient tensor is below the maximum value representable by a data type of the scaled 16-bit floating point gradient tensor.
