# US 2023/0273791 A1 · Floating Point Norm Instruction

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

- Number: US 2023/0273791 A1
- Document ID: US20230273791A1
- Status: Published application
- Kind: A1
- Application number: 18/163,472
- Filed: 2023-02-02
- Published: 2023-08-31
- Earliest claimed: 2022-02-28
- Assignees: Graphcore Limited
- Applicants: Graphcore Limited
- Inventors: Alan ALEXANDER; Mrudula GORE
- Web page: https://patentgrep.com/patent/US20230273791A1

## CPC

- G06F 9/3001: {Arithmetic instructions}
- G06F 9/3013: {according to data content, e.g. floating-point registers, address registers}
- G06F 9/30014: {with variable precision}
- G06F 9/30043: {LOAD or STORE instructions; Clear instruction}
- G06F 9/30101: {Special purpose registers}
- G06F 9/30123: {according to context, e.g. thread buffers}
- G06F 9/30145: {Instruction analysis, e.g. decoding, instruction word fields}
- G06F 9/3016: {Decoding the operand specifier, e.g. specifier format}
- G06F 9/3851: {from multiple instruction streams, e.g. multistreaming}
- G06F 9/3885: {using a plurality of independent parallel functional units}
- G06F 9/3887: {controlled by a single instruction for multiple data lanes [SIMD]}
- G06N 3/098: Distributed learning, e.g. federated learning
- G06N 3/063: using electronic means
- G06N 3/08: Learning methods
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)
- G06N: COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS

## Abstract

A hardware module is provided in an execution unit and is responsive to execution of multiple instances of a new type of instruction to perform a plurality of reductions in parallel. The hardware module comprises: a first accumulator storing first state associated with a first of the reductions; and a second accumulator storing second state associated with a second of the reductions. Upon execution of each of the multiple instances of the first type of instruction: an input value for the respective instance is provided to a first processing circuit of the hardware module such that the first processing circuit performs a first type of operation to update the first state; and the same input value is provided to the second processing circuit of the hardware module such that the second processing circuit performs a second type of operation to update the second state.

## Claims

### Claim 1

A processing device comprising an execution unit, wherein the execution unit comprises a hardware module responsive to execution of multiple instances of a first type of instruction to perform a plurality of reductions in parallel, each of the multiple instances configured to take a different operand comprising a respective first input value for a respective instance, wherein the hardware module comprises:
a first accumulator, wherein the first accumulator is configured to store first state associated with a first of the reductions;
a second accumulator, wherein the second accumulator is configured to store second state associated with a second of the reductions;
a plurality of processing circuits comprising:
a first of the processing circuits, which is associated with the first accumulator and is configured to update the first state; and
a second of the processing circuits, which is associated with the second accumulator and is configured to update the second state,
wherein circuitry of the execution unit is configured to, upon execution of each of the multiple instances of the first type of instruction:
provide to the first of the processing circuits, the respective first input value for the respective instance such that the first of the processing circuits performs a first type of operation to update the first state held in the first accumulator; and
provide to the second of the processing circuits, the respective first input value for the respective instance such that the second of the processing circuits performs a second type of operation to update the second state held in the second accumulator.

### Claim 2 (depends on 1)

The processing device of claim 1, comprising at least one control register, wherein the at least one control register is configured to store a first indication of the first type of operation and a second indication of the second type of operation, wherein the circuitry of the execution unit is configured to:
cause the first of the processing circuits to perform the first type of operation responsive to the first indication; and
cause the second of the processing circuits to perform the second type of operation responsive to the second indication.

### Claim 3 (depends on 2)

The processing device of claim 2, wherein the at least one control register is configured to:
subsequently store a third indication indicating that one of the first of the processing circuits and the second of the processing circuits is configured to perform no operation in response to execution of further multiple instances of the first type of instruction.

### Claim 4 (depends on 1)

The processing device of claim 1, wherein for each of the instances of the first type of instruction, the first type of operation comprises one of:
determining an updated value of the first state by adding the respective first input value for the respective instance to a current value of the first state;
determining the updated value of the first state by adding a square of the respective first input value of the respective instance to the current value of the first state; or
determining the updated value of the first state by adding a number representing an absolute value of the respective first input value of the respective instance to the current value of the first state.

### Claim 5 (depends on 1)

The processing device of claim 1, wherein for each of the instances of the first type of instruction, the second type of operation comprises one of:
determining an updated value of the second state by adding the respective first input value for the respective instance to a current value of the second state; or
determining the updated value of the second state by adding a number representing an absolute value of the respective first input value for the respective instance to the current value of the second state.

### Claim 6 (depends on 1)

The processing device of claim 1, wherein the execution unit is configured to, prior to execution of the multiple instances of the first type of instruction, execute at least one initialization instruction to initialize the first state and the second state.

### Claim 7 (depends on 6)

The processing device of claim 6, wherein the initialization of the first state and the second state comprises writing zeros to the first accumulator and to the second accumulator.

### Claim 8 (depends on 1)

The processing device of claim 1, wherein the execution unit is configured to, following execution of the multiple instances of the first type of instruction, execute at least one further instruction to:
read out the first state from the first accumulator to provide a result for the first of the reductions; and
read out the second state from the second accumulator to provide a result for the second of the reductions.

### Claim 9 (depends on 8)

The processing device of claim 8, wherein the execution unit comprises floating-point conversion and rounding circuitry configured to:
truncate and round a mantissa of the first state to provide the result for the first of the reductions in a first floating-point format; and
truncate and round a mantissa of the second state to provide the result for the second of the reductions in the first floating-point format.

### Claim 10 (depends on 1)

The processing device of claim 1, wherein the hardware module comprises a plurality of units, wherein for each of the multiple instances of the first type of instruction, each of the respective different operands comprises a plurality of input values, wherein each of the units comprises an instance of:
the first of the processing circuits;
the second of the processing circuits;
the first accumulator; and
the second accumulator,
wherein the circuitry of the execution unit is configured to, in response to execution of each of the multiple instances of the first type of instruction:
provide to each of the units, a different one of the input values of the operand of the respective instance.

### Claim 11 (depends on 1)

The processing device of claim 1, wherein the hardware module comprises a plurality of units, wherein for each of the multiple instances of the first type of instruction, the respective operand comprises a plurality of input values, each being for provision to a different one of the plurality of units, wherein a first of the units comprises:
the first of the processing circuits;
the second of the processing circuits;
the first accumulator; and
the second accumulator,
wherein each of further ones of the units comprises:
a respective pair of accumulators, each of the accumulators configured to store state for a respective one of the plurality of reductions; and
processing circuitry configured to, in response to each of the multiple instances of the first type of instruction:
update the state in a first of the respective pair of accumulators by performing the first type of operation using one of the plurality of input values for the respective instance provided to the respective unit; and
update the state in a second of its respective pair of accumulators by performing the second type of operation using the one of the plurality of input values for the respective instance provided to the respective unit.

### Claim 12 (depends on 1)

The processing device of claim 1, wherein for each of the multiple instances, the respective input value comprises a floating-point value.

### Claim 13 (depends on 1)

The processing device of claim 1, wherein the execution unit supports multiple subtypes of the first type of instruction, wherein different ones of the multiple subtypes operate on different floating-point number formats.

### Claim 14 (depends on 1)

The processing device of claim 1, wherein the first processing circuitry comprises different circuitry to the second processing circuitry, the different circuitry configured to support one or more different types of operation for updating accumulator state that are not supported by the second processing circuitry.

### Claim 15 (depends on 14)

The processing device of claim 14, wherein the different circuitry comprises a multiplier and the one or more different types of operation comprise a multiplication operation.

### Claim 16

A method for performing a plurality of reductions in parallel, wherein the method comprises:
initializing first state held in a first accumulator and associated with a first of the reductions;
initializing second state held in a second accumulator and associated with a second of the reductions; and
upon execution of each of multiple instances of a first type of instruction:
performing a first type of operation on a respective first input value for a respective instance of the first type of instruction so as to update the first state held in the first accumulator; and
in parallel with performing the first type of operation, performing a second type of operation on the respective first input value for the respective instance of the first type of instruction so as to update the second state held in the second accumulator.

### Claim 17 (depends on 16)

The method of claim 16, further comprising:
storing a first indication of the first type of operation and a second indication of the second type of operation in at least one control register;
causing a first processing circuit to perform the first type of operation responsive to the first indication; and
causing a second processing circuit to perform the second type of operation responsive to the second indication.

### Claim 18 (depends on 17)

The method of claim 17, further comprising:
subsequently storing in the at least one control register a third indication indicating that the first processing circuit is configured to perform no operation in response to execution of further multiple instances of the first type of instruction.

### Claim 19

A non-transitory computer readable medium storing a computer program comprising a set of execution instructions, which when executed by at least one processor causes a method for performing a plurality of reductions in parallel to be performed, the method comprising:
initializing first state held in a first accumulator and associated with a first of the reductions;
initializing second state held in a second accumulator and associated with a second of the reductions; and
upon execution of each of multiple instances of a first type of instruction:
performing a first type of operation on a respective first input value for a respective instance of the first type of instruction so as to update the first state held in the first accumulator; and
in parallel with performing the first type of operation, performing a second type of operation on the respective first input value for the respective instance of the first type of instruction so as to update the second state held in the second accumulator.

### Claim 20 (depends on 19)

The non-transitory computer readable medium of claim 19, wherein the method further comprises:
storing a first indication of the first type of operation and a second indication of the second type of operation in at least one control register;
causing a first processing circuit to perform the first type of operation responsive to the first indication; and
causing a second processing circuit to perform the second type of operation responsive to the second indication.
