Skip to content

Commit 5f83081

Browse files
committed
Test a case observed on some GPUs.
1 parent c60d40c commit 5f83081

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

ml-proto/test/float_exprs.wast

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1247,3 +1247,15 @@
12471247
(assert_return (invoke "thepast0" (f64.const 0x1p-1021) (f64.const 0x1.fffffffffffffp-1) (f64.const 0x1p1) (f64.const 0x1p-1)) (f64.const 0x1.fffffffffffffp-1022))
12481248
(assert_return (invoke "thepast1" (f64.const 0x1p-54) (f64.const 0x1.fffffffffffffp-1) (f64.const 0x1p-54)) (f64.const -0x1p-107))
12491249
(assert_return (invoke "thepast2" (f32.const 0x1p-125) (f32.const 0x1p-1) (f32.const 0x1p0)) (f32.const 0x1p-126))
1250+
1251+
;; Test for floating point tolerances observed in some GPUs.
1252+
;; https://community.amd.com/thread/145582
1253+
1254+
(module
1255+
(func $inverse (param $x f32) (result f32)
1256+
(f32.div (f32.const 1.0) (get_local $x))
1257+
)
1258+
(export "inverse" $inverse)
1259+
)
1260+
1261+
(assert_return (invoke "inverse" (f32.const 96.0)) (f32.const 0x1.555556p-7))

0 commit comments

Comments
 (0)