Overflow event counter
Abstract
A processing device comprises a register configured to store a count value indicating a number of times overflow events have resulted from arithmetic operations performed by the processing device. An execution unit of the device, in response to performing an arithmetic operation having a result which extends beyond one of the predefined limit values for the floating-point format, stores a result value that is within the predefined limit values, and cause the count value to be incremented. The count value provides a performant way of determining the number of overflow events that have occurred during the arithmetic processing performed by the execution unit. The count value provides a metric that provides a measure of the inaccuracy imparted into the results of the application processing by overflow events.
Interactive Citation Constellation Global Citation Ranking
Interactive SVG Citation Constellation renders in Rust/WebAssembly. Prior art cited: 7 · Forward citations: 0.
Claims (17 — 4 Independent, 13 Dependent)
- Claim 1Independent Claim
A processing device comprising: an execution unit configured to execute instructions to perform arithmetic operations on input values represented according to a format, the format having a range of representable values extending between predefined limit values, the predefined limit values comprising a maximum positive value and a minimum negative value; and a first register configured to store a count value indicating a number of times overflow events have occurred when the processing device performs the arithmetic operations, wherein the execution unit is configured to, in response to performing a first of the arithmetic operations having a result which extends beyond one of the predefined limit values: store a result value that is within the predefined limit values; and cause the count value to be incremented.
- Claim 2Depends on #1
The processing device as claimed in claim 1, wherein the stored result value is equal to one of the predefined limit values.
- Claim 3Depends on #1
The processing device as claimed in claim 1, wherein each of the instructions is associated with a respective thread of a plurality of worker threads, wherein the execution unit is configured to, for each of the plurality of worker threads: cause the count value to be incremented in response to a respective one of the arithmetic operations associated with the respective thread, the respective one of the arithmetic operations having a result which extends beyond one of the predefined limit values.
- Claim 4Depends on #3
The processing device as claimed in claim 3, wherein the execution unit is further configured to interleave execution of a supervisor thread with the plurality of worker threads, wherein the first register is a status register of the supervisor thread.
- Claim 5Depends on #1
The processing device as claimed in claim 1, wherein the format is a first floating-point format consisting of one of: an 8-bit floating point format; a 16-bit floating point format; and a 32-bit floating point format.
- Claim 6Depends on #1
The processing device as claimed in claim 1, wherein the execution unit is configured to: execute further instructions to perform further arithmetic operations using values represented according to a further format, the further format having a further range of representable values extending between further predefined limit values; in response to performing a first of the further arithmetic operations having a further result which extends beyond one of the further predefined limit values: store a further result value that is within the further predefined limit values; and cause the count value to be incremented.
- Claim 7Depends on #6
The processing device as claimed in claim 6, wherein the further format is a second floating point format consisting of one of: an 8-bit floating point format; a 16-bit floating point format; and a 32-bit floating point format.
- Claim 8Depends on #1
The processing device as claimed in claim 1, wherein the instructions are part of an application for performing training of a neural network.
- Claim 9Depends on #1
The processing device as claimed in claim 1, comprising a second register, wherein the execution unit is configured to: support a thread configured to write to the second register; and in response to the write to the second register, clear the count value.
- Claim 10Depends on #1
The processing device as claimed in claim 1, comprising a third register, wherein the execution unit is configured to: support a thread configured to write to the third register; and in response to the thread writing to the third register, enabling the incrementation of the count value in response to the arithmetic operations producing results which extend beyond the predefined limit values.
- Claim 11Independent Claim
A processing system comprising a plurality of instances of a processing device, each processing device comprising: an execution unit configured to execute instructions to perform arithmetic operations on input values represented according to a format, the format having a range of representable values extending between predefined limit values; and a first register configured to store a count value indicating a number of times overflow events have occurred when the processing device performs the arithmetic operations, wherein the execution unit is configured to, in response to performing a first of the arithmetic operations having a result which extends beyond one of the predefined limit values: store a result value that is within the predefined limit values; and cause the count value to be incremented, wherein for each of the instances: the execution unit of the respective instance is configured to cause a current value of the respective count value to be exported from the respective instance of the processing device.
- Claim 12Depends on #11
The processing system as claimed in claim 11, comprising a further processing device comprising: an interface configured to receive from each of the instances of the processing device, the respective count value for that instance; and at least one processor configured to sum the count values of the instances to determine a count of the number of overflow events in the processing system.
- Claim 13Depends on #12
The processing system as claimed in claim 12, wherein the at least one processor is configured to compare the count of the number of overflow events in the processing system to a threshold.
- Claim 14Depends on #12
The processing system as claimed in claim 12, wherein the further processing device is a host device.
- Claim 15Depends on #11
The processing system as claimed in claim 11, wherein the plurality of instances of the processing device are configured to run an application to perform training of a neural network.
- Claim 16Independent Claim
A method comprising: executing instructions to perform arithmetic operations on input values represented according to a format, the format having a range of representable values extending between predefined limit values, the predefined limit values comprising a maximum positive value and a minimum negative value; and storing in a first register, a count value indicating a number of times overflow events have occurred when the processing device performs the arithmetic operations, in response to performing a first of the arithmetic operations having a result which extends beyond one of the predefined limit values: storing a result value that is within the predefined limit values; and causing the count value to be incremented.
- Claim 17Independent Claim
A non-transitory computer readable medium storing a set of computer readable instructions, which when executed by at least one processor causes a method to be carried out, the method comprising: executing instructions to perform arithmetic operations on input values represented according to a format, the format having a range of representable values extending between predefined limit values, the predefined limit values comprising a maximum positive value and a minimum negative value; and storing in a first register, a count value indicating a number of times overflow events have occurred when the processing device performs the arithmetic operations, in response to performing a first of the arithmetic operations having a result which extends beyond one of the predefined limit values: storing a result value that is within the predefined limit values; and causing the count value to be incremented.
Technical Overview & Description
CROSS-REFERENCE TO RELATED APPLICATIONS The present application claims priority to United Kingdom Patent Application No. GB2214877.9, filed Oct. 10, 2022, the disclosure of which is hereby incorporated herein by reference in its entirety. TECHNICAL FIELD The present disclosure relates to a processing device and in particular to a processing device having an execution unit configured to perform arithmetic operations using values represented according to a format having predefined limit values. BACKGROUND In computing, bit sequences of predefined sizes are used to represent numbers. The particular representation of the bit sequence determines how a bit sequence is interpreted. One form of representation is the floating-point representation, which is often used to approximately represent real numbers. Floating-point representations are laid out in IEEE Standard 754. The floating-point representation comprises 3 separate components, i.e. a sign component, a mantissa component, and an exponent component. In the so-called single-precision (i.e. 32-bit) floating point representation (according to IEEE Standard 754), the sign component consists of a single bit, the exponent consists of 8 bits, and the mantissa consists of 23 bits. In the so-called half-precision (i.e. 16-bit) floating-point representation (according to IEEE standard 754), the sign component consists of a single bit, the mantissa consists of 10 bits, and the exponent consists of 5 bits. In most cases, a number is given from these 3 components by the following formula: ( − 1) signbit × I · mantissa × 2 exponentbits-offset The displayed “ offset ” to the exponent is dependent upon the range of values required. IEEE 754 has chosen values as follows. In the single-precision representation, the offset is equal to 127. In the half-precision format, the offset is equal to 15. Here “ I ” is an implicit bit, which is derived from the exponent. In the case that the exponent bit sequence consists of anything other than
Cited By — Indexed Forward Citations (0 of 0 total)
No indexed citing patents in this generation yet. Ingest USPTO/PatentsView bulk citation tables via patents-ingest to expand the local forward citation graph.
References Cited — Backward Prior Art (7)
Non-Patent Literature (1)
- Search Report dated Jun. 6, 2023 for United Kingdom Patent Application No. GB2214877.9.