1212)
1313
1414
15- @pytest .mark .fmod
15+ @pytest .mark .fmod_tensor
1616@pytest .mark .parametrize ("shape" , POINTWISE_SHAPES )
1717@pytest .mark .parametrize ("dtype" , FLOAT_DTYPES )
18- def test_accuracy_fmod (shape , dtype ):
18+ def test_fmod_tensor (shape , dtype ):
1919 inp1 = torch .randn (shape , dtype = dtype , device = flag_gems .device )
2020 inp2 = torch .randn (shape , dtype = dtype , device = flag_gems .device )
2121 inp2 = torch .where (inp2 == 0 , torch .ones_like (inp2 ), inp2 )
@@ -27,11 +27,11 @@ def test_accuracy_fmod(shape, dtype):
2727 gems_assert_close (res_out , ref_out , dtype )
2828
2929
30- @pytest .mark .fmod
30+ @pytest .mark .fmod_scalar
3131@pytest .mark .parametrize ("shape" , POINTWISE_SHAPES )
3232@pytest .mark .parametrize ("scalar" , SCALARS )
3333@pytest .mark .parametrize ("dtype" , FLOAT_DTYPES )
34- def test_accuracy_fmod_tensor_scalar (shape , scalar , dtype ):
34+ def test_fmod_scalar (shape , scalar , dtype ):
3535 inp1 = torch .randn (shape , dtype = dtype , device = flag_gems .device )
3636 inp2 = scalar if scalar != 0 else 1.0
3737 ref_inp1 = to_reference (inp1 , True )
@@ -42,11 +42,10 @@ def test_accuracy_fmod_tensor_scalar(shape, scalar, dtype):
4242 gems_assert_close (res_out , ref_out , dtype , atol = atol )
4343
4444
45- @pytest .mark .inplace
46- @pytest .mark .fmod_
45+ @pytest .mark .fmod_tensor_
4746@pytest .mark .parametrize ("shape" , POINTWISE_SHAPES )
4847@pytest .mark .parametrize ("dtype" , FLOAT_DTYPES )
49- def test_accuracy_fmod_ (shape , dtype ):
48+ def test_fmod_tensor_inplace (shape , dtype ):
5049 inp1 = torch .randn (shape , dtype = dtype , device = flag_gems .device )
5150 inp2 = torch .randn (shape , dtype = dtype , device = flag_gems .device )
5251 inp2 = torch .where (inp2 == 0 , torch .ones_like (inp2 ), inp2 )
@@ -58,12 +57,11 @@ def test_accuracy_fmod_(shape, dtype):
5857 gems_assert_close (res_out , ref_out , dtype )
5958
6059
61- @pytest .mark .inplace
62- @pytest .mark .fmod_
60+ @pytest .mark .fmod_scalar_
6361@pytest .mark .parametrize ("shape" , POINTWISE_SHAPES )
6462@pytest .mark .parametrize ("scalar" , SCALARS )
6563@pytest .mark .parametrize ("dtype" , FLOAT_DTYPES )
66- def test_accuracy_fmod_tensor_scalar_ (shape , scalar , dtype ):
64+ def testy_fmod_scalar_inplace (shape , scalar , dtype ):
6765 inp1 = torch .randn (shape , dtype = dtype , device = flag_gems .device )
6866 inp2 = scalar if scalar != 0 else 1.0
6967 ref_inp1 = to_reference (inp1 .clone (), True )
0 commit comments