IP Library › Granted Patent US 10,146,533
Granted Patent B2
US 10,146,533 · App. 15/280,564 · Granted Dec 4, 2018

Instruction and logic for detecting numeric accumulation error

Inventors: Ilan Pardo (Ramat-Hasharon, IL); Oren Ben-Kiki (Tel-Aviv, IL)
Assignee: Intel Corporation
G06F9/3001G06F7/483G06F9/3016G06F9/30101G06F9/38G06F9/3865
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 10,146,533
App. No.
15/280,564
Granted
Dec 4, 2018
Kind
B2
Abstract

A processor includes circuitry to decode at least one instruction and an execution unit. The decoded instruction may compute a floating point result. The execution unit includes circuitry to execute the instruction to determine the floating point result, compute the amount of precision lost in a mantissa of the floating point result, compare the amount of precision lost to a numeric accumulation error precision threshold, determine whether a numeric accumulation error occurred based on the comparison, and write a value to a flag. The amount of precision lost corresponds to a plurality of bits lost in the mantissa of the floating point result. The value to be written to the flag may be based on the determination that the numeric accumulation error occurred. The flag may be for notification that the numeric accumulation error occurred.

Claims (82)

1. A processor, comprising:

circuitry to decode at least one instruction, the instruction to compute a floating point result associated with a floating point operation;

an execution unit including circuitry to:

execute the instruction to determine the floating point result;

compute an amount of precision lost in a mantissa of the floating point result relative to an actual result of the floating point operation, the amount of precision lost corresponding to a plurality of bits lost in the mantissa of the floating point result;

compare the amount of precision lost in the mantissa of the floating point result to a numeric accumulation error precision threshold;

determine whether a numeric accumulation error occurred based on the comparison between the amount of precision lost in the mantissa of the floating point result and the numeric accumulation error precision threshold; and

write a value to a flag for notification that the numeric accumulation error occurred, the value based on a determination that the numeric accumulation error occurred.

2. The processor of claim 1 , wherein:

the execution unit further includes circuitry to determine the numeric accumulation error precision threshold based on the instruction, a previous instruction, or a floating point control register; and

the comparison between the amount of precision lost and the numeric accumulation error precision threshold is based on the numeric accumulation error precision threshold that is determined.

3. The processor of claim 1 , wherein the execution unit further includes circuitry to:

determine whether a mask bit is set to prevent signaling of the numeric accumulation error; and

signal an exception based on a determination that the mask bit is not set and based on the determination that the numeric accumulation error occurred.

4. The processor of claim 1 , wherein:

the execution unit further includes circuitry to:

round the floating point result;

store the rounded floating point result; and

the amount of precision lost in the mantissa of the floating point result represents a percentage of bits in the mantissa of the floating point result that is lost, the percentage of bits that is lost includes:

a percentage of bits that is lost when the floating point result is rounded; or

a percentage of bits that is lost when the rounded floating point result is stored.

5. The processor of claim 1 , the execution unit further comprising circuitry to:

determine a numeric accumulation error non-zero precision flag based on the instruction, a previous instruction, or a floating point control register; and

control, using the numeric accumulation error non-zero precision flag, whether to ignore at least one trailing bit of the mantissa of the floating point result with a value of zero, wherein the computation of the amount of precision lost in the mantissa of the floating point result is based on the numeric accumulation error non-zero precision flag.

6. The processor of claim 1 , the execution unit further includes circuitry to:

determine a numeric accumulation error non-zero precision flag based on the instruction, a previous instruction, or a floating point control register; and

control, using the numeric accumulation error non-zero precision flag, whether to ignore bits of the mantissa of the floating point result with a value of zero, wherein the computation of the amount of precision lost in the mantissa of the floating point result is based on the numeric accumulation error non-zero precision flag.

7. The processor of claim 1 , wherein:

the floating point result is computed from source values;

the instruction is a fused multiply-add instruction; and

the execution of the instruction includes circuitry to:

compute a sum based on the source values; and

compute the floating point result based on the sum and at least one of the source values.

8. A method for detecting numeric accumulation error, comprising:

decoding at least one instruction, the instruction for computing a floating point result associated with a floating point operation;

executing the instruction to determine the floating point result;

computing the amount of precision lost in a mantissa of the floating point result relative to an actual result of the floating point operation, the amount of precision lost corresponding to a plurality of bits lost in the mantissa of the floating point result;

comparing the amount of precision lost in the mantissa of the floating point result to a numeric accumulation error precision threshold;

determining whether a numeric accumulation error occurred based on the comparison between the amount of precision lost in the mantissa of the floating point result and the numeric accumulation error precision threshold; and

writing a value to a flag for notification that the numeric accumulation error occurred, the value based on a determination that the numeric accumulation error occurred.

9. The method of claim 8 , further comprising:

determining the numeric accumulation error precision threshold based on the instruction, a previous instruction, or a floating point control register.

10. The method of claim 8 , further comprising:

determining whether a mask bit is set to prevent signaling of the numeric accumulation error; and

signaling an exception based on a determination that the mask bit is not set and based on the determination that the numeric accumulation error occurred.

11. The method of claim 8 , further comprising:

rounding the floating point result; and

storing the rounded floating point result;

wherein the amount of precision lost in the mantissa of the floating point result represents a percentage of bits in the mantissa of the floating point result that is lost, the percentage of bits that is lost including:

a percentage of bits that is lost when rounding the floating point result; or

a percentage of bits that is lost when storing the rounded floating point result.

12. The method of claim 8 , further comprising:

determining a numeric accumulation error non-zero precision flag based on the instruction, a previous instruction, or a floating point control register; and

controlling, using the numeric accumulation error non-zero precision flag, whether to ignore at least one trailing bit of the mantissa of the floating point result with a value of zero, wherein computing the amount of precision lost in the mantissa of the floating point result is based on the numeric accumulation error non-zero precision flag.

13. The method of claim 8 , further comprising:

determining a numeric accumulation error non-zero precision flag based on the instruction, a previous instruction, or a floating point control register; and

controlling, using the numeric accumulation error non-zero precision flag, whether to ignore bits of the mantissa of the floating point result with a value of zero, wherein computing the amount of precision lost in the mantissa of the floating point result is based on the numeric accumulation error non-zero precision flag.

14. An execution unit, comprising circuitry to:

execute at least one instruction to determine a floating point result associated with a floating point operation;

compute an amount of precision lost in a mantissa of the floating point result relative to an actual result of the floating point operation, the amount of precision lost corresponding to a plurality of bits lost in the mantissa of the floating point result;

compare the amount of precision lost in the mantissa of the floating point result to a numeric accumulation error precision threshold;

determine whether a numeric accumulation error occurred based on the comparison between the amount of precision lost in the mantissa of the floating point result and the numeric accumulation error precision threshold; and

write a value to a flag for notification that the numeric accumulation error occurred, the value based on a determination that the numeric accumulation error occurred.

15. The execution unit of claim 14 , the execution unit further comprising circuitry to determine the numeric accumulation error precision threshold based on the instruction, a previous instruction, or a floating point control register, wherein the comparison between the amount of precision lost and the numeric accumulation error precision threshold is based on the numeric accumulation error precision threshold that is determined.

16. The execution unit of claim 14 , further comprising circuitry to:

determine whether a mask bit is set to prevent signaling of the numeric accumulation error; and

signal an exception based on a determination that the mask bit is not set and based on the determination that the numeric accumulation error occurred.

17. The execution unit of claim 14 , further comprising circuitry to round the floating point result and store the rounded floating point result, wherein the amount of precision lost in the mantissa of the floating point result represents a percentage of bits in the mantissa of the floating point result that is lost, the percentage of bits that is lost includes:

a percentage of bits that is lost when the floating point result is rounded; or

a percentage of bits that is lost when the rounded floating point result is stored.

18. The execution unit of claim 14 , further comprising circuitry to:

determine a numeric accumulation error non-zero precision flag based on the instruction, a previous instruction, or a floating point control register; and

control, using the numeric accumulation error non-zero precision flag, whether to ignore at least one trailing bit of the mantissa of the floating point result with a value of zero, wherein the computation of the amount of precision lost in the mantissa of the floating point result is based on the numeric accumulation error non-zero precision flag.

19. The execution unit of claim 14 , further comprising circuitry to:

determine a numeric accumulation error non-zero precision flag based on the instruction, a previous instruction, or a floating point control register; and

control, using the numeric accumulation error non-zero precision flag, whether to ignore bits of the mantissa of the floating point result with a value of zero, wherein the computation of the amount of precision lost in the mantissa of the floating point result is based on the numeric accumulation error non-zero precision flag.

20. The execution unit of claim 14 , wherein:

the floating point result is computed from source values;

the instruction is a fused multiply-add instruction; and

the execution of the instruction includes circuitry to:

compute a sum based on the source values; and

compute the floating point result based on the sum and at least one of the source values.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Oct 10, 2016
From: PARDO, ILAN; BEN-KIKI, OREN
To: INTEL CORPORATION
Reel/Frame 040299/0908 →
Continuity (1)
Related Publication 20180088941A1 · Mar 29, 2018