Skip to content

Commit

Permalink
add @testing.skip_when_disabled_cl_khr_fp16 to 8bit integer test cases
Browse files Browse the repository at this point in the history
  • Loading branch information
vorj committed Feb 3, 2020
1 parent 04b5f9b commit 7f7b2d5
Show file tree
Hide file tree
Showing 9 changed files with 21 additions and 0 deletions.
9 changes: 9 additions & 0 deletions tests/clpy_tests/core_tests/test_fusion.py
Original file line number Diff line number Diff line change
Expand Up @@ -178,13 +178,15 @@ def check_binary(self, name, xp, dtype):
b = testing.shaped_reverse_arange((2, 3), xp, dtype)
return a, b

@testing.skip_when_disabled_cl_khr_fp16
@testing.for_8bit_integer_dtypes()
@testing.numpy_clpy_allclose(atol=1e-5)
@fusion_default_array_equal()
def check_unary_8bit(self, name, xp, dtype):
a = testing.shaped_arange((2, 3), xp, dtype)
return (a,)

@testing.skip_when_disabled_cl_khr_fp16
@testing.for_8bit_integer_dtypes()
@testing.numpy_clpy_allclose(atol=1e-5)
@fusion_default_array_equal()
Expand Down Expand Up @@ -251,6 +253,7 @@ def check_unary(self, name, xp, dtype):
a = testing.shaped_arange((2, 3), xp, dtype)
return (a,)

@testing.skip_when_disabled_cl_khr_fp16
@testing.for_8bit_integer_dtypes()
@testing.numpy_clpy_allclose(atol=1e-5)
@fusion_default_array_equal()
Expand Down Expand Up @@ -314,13 +317,15 @@ def check_unary_negative(self, name, xp, dtype):
a = xp.array([-3, -2, -1, 1, 2, 3], dtype=dtype)
return (a,)

@testing.skip_when_disabled_cl_khr_fp16
@testing.for_8bit_integer_dtypes()
@testing.numpy_clpy_allclose(atol=1e-5)
@fusion_default_array_equal()
def check_unary_8bit(self, name, xp, dtype):
a = testing.shaped_arange((2, 3), xp, dtype)
return (a,)

@testing.skip_when_disabled_cl_khr_fp16
@testing.for_dtypes(['?', 'b'])
@testing.numpy_clpy_allclose(atol=1e-5)
@fusion_default_array_equal()
Expand Down Expand Up @@ -373,13 +378,15 @@ def check_binary(self, name, xp, dtype):
b = testing.shaped_reverse_arange((2, 3), xp, dtype)
return a, b

@testing.skip_when_disabled_cl_khr_fp16
@testing.for_8bit_integer_dtypes()
@testing.numpy_clpy_allclose(atol=1e-5)
@fusion_default_array_equal()
def check_unary_8bit(self, name, xp, dtype):
a = testing.shaped_arange((2, 3), xp, dtype)
return (a,)

@testing.skip_when_disabled_cl_khr_fp16
@testing.for_8bit_integer_dtypes()
@testing.numpy_clpy_allclose(atol=1e-5)
@fusion_default_array_equal()
Expand Down Expand Up @@ -448,6 +455,7 @@ def check_binary(self, name, xp, dtype):
b = testing.shaped_reverse_arange((2, 3), xp, dtype)
return a, b

@testing.skip_when_disabled_cl_khr_fp16
@testing.for_8bit_integer_dtypes()
@testing.numpy_clpy_allclose(atol=1e-5)
@fusion_default_array_equal()
Expand Down Expand Up @@ -947,6 +955,7 @@ def g(x):

return g(a)

@testing.skip_when_disabled_cl_khr_fp16
@testing.for_8bit_integer_dtypes()
@testing.numpy_clpy_allclose(atol=1e-5)
def check_unary_8bit(self, name, xp, dtype, no_bool=False):
Expand Down
1 change: 1 addition & 0 deletions tests/clpy_tests/core_tests/test_ndarray_complex_ops.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ def test_angle(self, xp, dtype):
x = testing.shaped_arange((2, 3), xp, dtype)
return xp.angle(x)

@testing.skip_when_disabled_cl_khr_fp16
@testing.for_8bit_integer_dtypes()
@testing.numpy_clpy_array_almost_equal()
def test_angle_8bit(self, xp, dtype):
Expand Down
2 changes: 2 additions & 0 deletions tests/clpy_tests/math_tests/test_arithmetic.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ def check_unary_without_8bit(self, name, xp, dtype):
a = testing.shaped_arange((2, 3), xp, dtype)
return getattr(xp, name)(a)

@testing.skip_when_disabled_cl_khr_fp16
@testing.for_8bit_integer_dtypes()
@testing.numpy_clpy_allclose(atol=1e-5)
def check_unary_8bit(self, name, xp, dtype):
Expand Down Expand Up @@ -52,6 +53,7 @@ def check_unary_negative_without_8bit(self, name, xp, dtype):
a = xp.array([-3, -2, -1, 1, 2, 3], dtype=dtype)
return getattr(xp, name)(a)

@testing.skip_when_disabled_cl_khr_fp16
@testing.for_dtypes(['?', 'b'])
@testing.numpy_clpy_allclose(atol=1e-5)
def check_unary_negative_8bit(self, name, xp, dtype):
Expand Down
2 changes: 2 additions & 0 deletions tests/clpy_tests/math_tests/test_explog.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,14 @@ def check_binary(self, name, xp, dtype, no_complex=False):
b = testing.shaped_reverse_arange((2, 3), xp, dtype)
return getattr(xp, name)(a, b)

@testing.skip_when_disabled_cl_khr_fp16
@testing.for_8bit_integer_dtypes()
@testing.numpy_clpy_allclose(atol=1e-5)
def check_unary_8bit(self, name, xp, dtype):
a = testing.shaped_arange((2, 3), xp, dtype)
return getattr(xp, name)(a)

@testing.skip_when_disabled_cl_khr_fp16
@testing.for_8bit_integer_dtypes()
@testing.numpy_clpy_allclose(atol=1e-5)
def check_binary_8bit(self, name, xp, dtype):
Expand Down
1 change: 1 addition & 0 deletions tests/clpy_tests/math_tests/test_floating.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ def check_binary(self, name, xp, dtype):
b = testing.shaped_reverse_arange((2, 3), xp, dtype)
return getattr(xp, name)(a, b)

@testing.skip_when_disabled_cl_khr_fp16
@testing.for_8bit_integer_dtypes()
@testing.numpy_clpy_allclose(atol=1e-5)
def check_binary_8bit(self, name, xp, dtype):
Expand Down
1 change: 1 addition & 0 deletions tests/clpy_tests/math_tests/test_hyperbolic.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ def check_unary(self, name, xp, dtype):
a = testing.shaped_arange((2, 3), xp, dtype)
return getattr(xp, name)(a)

@testing.skip_when_disabled_cl_khr_fp16
@testing.for_8bit_integer_dtypes()
@testing.numpy_clpy_allclose(atol=1e-5)
def check_unary_8bit(self, name, xp, dtype):
Expand Down
1 change: 1 addition & 0 deletions tests/clpy_tests/math_tests/test_misc.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ def check_unary_without_8bit(self, name, xp, dtype):
a = testing.shaped_arange((2, 3), xp, dtype)
return getattr(xp, name)(a)

@testing.skip_when_disabled_cl_khr_fp16
@testing.for_8bit_integer_dtypes()
@testing.numpy_clpy_allclose(atol=1e-5)
def check_unary_8bit(self, name, xp, dtype):
Expand Down
2 changes: 2 additions & 0 deletions tests/clpy_tests/math_tests/test_rounding.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,14 @@ def check_unary_negative(self, name, xp, dtype):
a = xp.array([-3, -2, -1, 1, 2, 3], dtype=dtype)
return getattr(xp, name)(a)

@testing.skip_when_disabled_cl_khr_fp16
@testing.for_8bit_integer_dtypes()
@testing.numpy_clpy_allclose(atol=1e-5)
def check_unary_8bit(self, name, xp, dtype):
a = testing.shaped_arange((2, 3), xp, dtype)
return getattr(xp, name)(a)

@testing.skip_when_disabled_cl_khr_fp16
@testing.for_dtypes(['?', 'b'])
@testing.numpy_clpy_allclose(atol=1e-5)
def check_unary_negative_8bit(self, name, xp, dtype):
Expand Down
2 changes: 2 additions & 0 deletions tests/clpy_tests/math_tests/test_trigonometric.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,14 @@ def check_binary(self, name, xp, dtype):
b = testing.shaped_reverse_arange((2, 3), xp, dtype)
return getattr(xp, name)(a, b)

@testing.skip_when_disabled_cl_khr_fp16
@testing.for_8bit_integer_dtypes()
@testing.numpy_clpy_allclose(atol=1e-5)
def check_unary_8bit(self, name, xp, dtype):
a = testing.shaped_arange((2, 3), xp, dtype)
return getattr(xp, name)(a)

@testing.skip_when_disabled_cl_khr_fp16
@testing.for_8bit_integer_dtypes()
@testing.numpy_clpy_allclose(atol=1e-5)
def check_binary_8bit(self, name, xp, dtype):
Expand Down

0 comments on commit 7f7b2d5

Please sign in to comment.