Skip to content

Commit e953c71

Browse files
author
Ewan Crawford
authored
Define cross/dot error in terms of HALF_EPSILON (#893)
The error for geometric cl_khr_fp16 builtins `cross` & `dot` is currently defined in terms of `HLF_EPSILON`. However `HLF_EPSILON` isn't defined, the OpenCL language macro defined by cl_khr_fp16 is `HALF_EPSILON`.
1 parent 28bd8e1 commit e953c71

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

env/numerical_compliance.asciidoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,7 @@ devices given as ULP values.
285285

286286
// 3 operations from the 2 multiplications and 1 subtraction per component
287287
| *OpExtInst* *cross*
288-
| absolute error tolerance of 'max * max * (3 * HLF_EPSILON)' per vector component, where _max_ is the maximum input operand magnitude
288+
| absolute error tolerance of 'max * max * (3 * HALF_EPSILON)' per vector component, where _max_ is the maximum input operand magnitude
289289
| absolute error tolerance of 'max * max * (3 * FLT_EPSILON)' per vector component, where _max_ is the maximum input operand magnitude
290290
| absolute error tolerance of 'max * max * (3 * FLT_EPSILON)' per vector component, where _max_ is the maximum input operand magnitude
291291

@@ -305,7 +305,7 @@ devices given as ULP values.
305305
// n + n-1 Number of operations from n multiples and (n-1) additions
306306
// 2n - 1
307307
| *OpExtInst* *dot*
308-
| absolute error tolerance of 'max * max * (2n - 1) * HLF_EPSILON', for vector width _n_ and maximum input operand magnitude _max_ across all vector components
308+
| absolute error tolerance of 'max * max * (2n - 1) * HALF_EPSILON', for vector width _n_ and maximum input operand magnitude _max_ across all vector components
309309
| absolute error tolerance of 'max * max * (2n - 1) * FLT_EPSILON', for vector width _n_ and maximum input operand magnitude _max_ across all vector components
310310
| absolute error tolerance of 'max * max * (2n - 1) * FLT_EPSILON', for vector width _n_ and maximum input operand magnitude _max_ across all vector components
311311

ext/cl_khr_fp16.asciidoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1513,7 +1513,7 @@ is the infinitely precise result.
15131513

15141514
// 3 operations from the 2 multiplications and 1 subtraction per component
15151515
| *cross*
1516-
| absolute error tolerance of 'max * max * (3 * HLF_EPSILON)' per vector component, where _max_ is the maximum input operand magnitude
1516+
| absolute error tolerance of 'max * max * (3 * HALF_EPSILON)' per vector component, where _max_ is the maximum input operand magnitude
15171517
| Implementation-defined
15181518

15191519
| *degrees*
@@ -1534,7 +1534,7 @@ is the infinitely precise result.
15341534
// n + n-1 Number of operations from n multiples and (n-1) additions
15351535
// 2n - 1
15361536
| *dot*
1537-
| absolute error tolerance of 'max * max * (2n - 1) * HLF_EPSILON', for vector width _n_ and maximum input operand magnitude _max_ across all vector components
1537+
| absolute error tolerance of 'max * max * (2n - 1) * HALF_EPSILON', for vector width _n_ and maximum input operand magnitude _max_ across all vector components
15381538
| Implementation-defined
15391539

15401540
| *erfc*

0 commit comments

Comments
 (0)