IP Library › Granted Patent US 9,477,477
Granted Patent B2
US 9,477,477 · App. 14/161,628 · Granted Oct 25, 2016

System, method, and computer program product for executing casting-arithmetic instructions

Inventor: William J. Dally (Los Altos Hills, CA)
Assignee: NVIDIA Corporation
G06F9/30185G06F8/437G06F8/447G06F9/3001G06F9/30025
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 9,477,477
App. No.
14/161,628
Granted
Oct 25, 2016
Kind
B2
Abstract

A system, method, and computer program product are provided for executing casting-arithmetic instructions. The method comprises receiving a casting-arithmetic instruction that specifies an arithmetic operation to be performed on input data and at least one casting operation of an input casting operation and an output casting operation. Upon determining that the casting-arithmetic instruction specifies the input casting operation, the input casting operation is performed on identified terms comprising the input data. Then the arithmetic operation is performed on the input data to generate an arithmetic result. Upon determining that the casting-arithmetic instruction specifies the output casting operation, the output casting operation is performed on the arithmetic result.

Claims (31)

1. A method, comprising:

receiving, by a processing unit, a single instruction that specifies an arithmetic operation to be performed on input data to generate an intermediate output value of a first numeric type and an output casting operation that specifies a second numeric type, wherein the first numeric type corresponds to a first numeric resolution and a first dynamic range and the second numeric type corresponds to a second numeric resolution and a second dynamic range;

performing the arithmetic operation on the input data by the processing unit to generate the intermediate output value; and

upon determining that the single instruction specifies the output casting operation, casting the intermediate output value of the first numeric type into an output value of the second numeric type.

2. The method of claim 1 , wherein the input data comprises one or more scalar terms or one or more vector terms.

3. The method of claim 1 , wherein the input data comprises one or more fixed-point numbers or one or more floating-point numbers.

4. The method of claim 1 , wherein the arithmetic operation comprises an addition operation or a multiplication operation.

5. The method of claim 1 , wherein the first numeric type specifies a floating-point representation and the second numeric type specifies a fixed-point representation.

6. The method of claim 1 , wherein the first numeric resolution is higher than the second numeric resolution.

7. The method of claim 1 , wherein the first dynamic range is lower than the second dynamic range number.

8. The method of claim 1 , wherein the first dynamic range is higher than the second dynamic range.

9. The method of claim 1 , wherein the first numeric resolution is lower than the second numeric resolution.

10. The method of claim 1 , wherein the processing unit comprises a math function unit that is configured to perform the arithmetic operation and an output casting unit that is coupled to the math function unit and configured to perform the output casting operation.

11. The method of claim 1 , wherein the first numeric type specifies a fixed-point representation and the second numeric type specifies a floating-point representation.

12. The method of claim 1 , wherein the input data is read from a data storage circuit.

13. The method of claim 1 , wherein the single instruction specifies an input casting operation that specifies a third numeric type, wherein the third numeric type corresponds to a third numeric resolution and a third dynamic range.

14. The method of claim 13 , further comprising, prior to performing the arithmetic operation, casting the input data of the third numeric type into input data of the first numeric type.

15. The method of claim 13 , wherein the processing unit comprises a math function unit that is configured to perform the arithmetic operation and an input casting unit that is coupled to the math function unit and configured to perform the input casting operation.

16. The method of claim 1 , wherein the single instruction is generated by applying set of propagation rules to a graph representation of arithmetic operations to produce a transformed graph representation comprising the arithmetic operation and the output casting operation.

17. The method of claim 16 , wherein a node within the transformed graph representation includes a specification for the arithmetic operation, a first edge within the transformed graph representation includes first attributes specifying the first numeric resolution and the first dynamic range, and a second edge within the transformed graph representation includes second attributes specifying the second numeric resolution and the second dynamic range.

18. The method of claim 16 , wherein a first propagation rule in the set of propagation rules propagates the second dynamic range from an output edge of a first node in the graph representation to an input edge of a second node in the graph representation.

19. A non-transitory computer-readable storage medium storing instructions that, when executed by a processor, cause the processor to perform steps comprising:

receiving a single instruction that specifies an arithmetic operation to be performed on input data to generate an intermediate output value of a first numeric type and an output casting operation that specifies a second numeric type, wherein the first numeric type corresponds to a first numeric resolution and a first dynamic range and the second numeric type corresponds to a second numeric resolution and a second dynamic range;

performing the arithmetic operation on the input data to generate the intermediate output value; and

upon determining that the single instruction specifies the output casting operation, casting the intermediate output value of the first numeric type into an output value of the second numeric type.

20. A system comprising:

a memory configured to store input code comprising a single instruction that specifies an arithmetic operation to be performed on input data to generate an intermediate output value of a first numeric type and an output casting operation that specifies a second numeric type, wherein the first numeric type corresponds to a first numeric resolution and a first dynamic range and the second numeric type corresponds to a second numeric resolution and a second dynamic range; and

a processing unit coupled to the memory and configured to:

receive the instruction;

perform the arithmetic operation on the input data to generate the intermediate output value; and

upon determining that the single instruction specifies the output casting operation, casting the intermediate output value of the first numeric type into an output value of the second numeric type.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Feb 3, 2015
From: DALLY, WILLIAM J.
To: NVIDIA CORPORATION
Reel/Frame 034876/0487 →
Continuity (1)
Related Publication 20150205757A1 · Jul 23, 2015