Skip to content

Commit d2cfb75

Browse files
ychzhangcopybara-github
authored andcommitted
Add test for e1m2 and e0m3
PiperOrigin-RevId: 671915601
1 parent 0f7ac0e commit d2cfb75

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

aqt/jax/v2/numerics/fp_numerics_test.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -206,6 +206,20 @@ def fp_values_dtype(dtype):
206206
-0, -0.5, -1, -1.5, -2, -3, -4, -6,
207207
],
208208
),
209+
dict(
210+
nexp=1, minexp=0, nmant=2, has_subnormals=True,
211+
expected_values=[
212+
0, 0.25, 0.5, 0.75, 1, 1.25, 1.5, 1.75,
213+
-0, -0.25, -0.5, -0.75, -1, -1.25, -1.5, -1.75,
214+
],
215+
),
216+
dict(
217+
nexp=0, minexp=0, nmant=3, has_subnormals=True,
218+
expected_values=[
219+
0, 0.125, 0.25, 0.375, 0.5, 0.625, 0.75, 0.875,
220+
-0, -0.125, -0.25, -0.375, -0.5, -0.625, -0.75, -0.875,
221+
],
222+
),
209223
]) # pyformat: disable
210224
def test_fp_some_fp_values(
211225
self,

0 commit comments

Comments
 (0)