|
4 | 4 |
|
5 | 5 | import arrayfire_wrapper.dtypes as dtype |
6 | 6 | import arrayfire_wrapper.lib as wrapper |
7 | | -from tests.utility_functions import check_type_supported, get_all_types |
| 7 | +from tests.utility_functions import check_type_supported, get_all_types, get_real_types |
8 | 8 |
|
9 | 9 |
|
10 | 10 | @pytest.mark.parametrize( |
@@ -62,10 +62,12 @@ def test_and_shapes_invalid(invdtypes: dtype.Dtype) -> None: |
62 | 62 | (random.randint(1, 10), random.randint(1, 10), random.randint(1, 10), random.randint(1, 10)), |
63 | 63 | ], |
64 | 64 | ) |
65 | | -@pytest.mark.parametrize("dtype_name", get_all_types()) |
| 65 | +@pytest.mark.parametrize("dtype_name", get_real_types()) |
66 | 66 | def test_bitand_shape_dtypes(shape: tuple, dtype_name: dtype.Dtype) -> None: |
67 | 67 | """Test bitand operation between two arrays of the same shape""" |
68 | 68 | check_type_supported(dtype_name) |
| 69 | + if dtype_name == dtype.f16 or dtype_name == dtype.f32: |
| 70 | + pytest.skip() |
69 | 71 | lhs = wrapper.randu(shape, dtype_name) |
70 | 72 | rhs = wrapper.randu(shape, dtype_name) |
71 | 73 |
|
@@ -102,10 +104,12 @@ def test_bitand_shapes_invalid(invdtypes: dtype.Dtype) -> None: |
102 | 104 | (random.randint(1, 10), random.randint(1, 10), random.randint(1, 10), random.randint(1, 10)), |
103 | 105 | ], |
104 | 106 | ) |
105 | | -@pytest.mark.parametrize("dtype_name", get_all_types()) |
| 107 | +@pytest.mark.parametrize("dtype_name", get_real_types()) |
106 | 108 | def test_bitnot_shape_dtypes(shape: tuple, dtype_name: dtype.Dtype) -> None: |
107 | 109 | """Test bitnot operation between two arrays of the same shape""" |
108 | 110 | check_type_supported(dtype_name) |
| 111 | + if dtype_name == dtype.f16 or dtype_name == dtype.f32: |
| 112 | + pytest.skip() |
109 | 113 | out = wrapper.randu(shape, dtype_name) |
110 | 114 |
|
111 | 115 | result = wrapper.bitnot(out) |
@@ -140,10 +144,12 @@ def test_bitnot_shapes_invalid(invdtypes: dtype.Dtype) -> None: |
140 | 144 | (random.randint(1, 10), random.randint(1, 10), random.randint(1, 10), random.randint(1, 10)), |
141 | 145 | ], |
142 | 146 | ) |
143 | | -@pytest.mark.parametrize("dtype_name", get_all_types()) |
| 147 | +@pytest.mark.parametrize("dtype_name", get_real_types()) |
144 | 148 | def test_bitor_shape_dtypes(shape: tuple, dtype_name: dtype.Dtype) -> None: |
145 | 149 | """Test bitor operation between two arrays of the same shape""" |
146 | 150 | check_type_supported(dtype_name) |
| 151 | + if dtype_name == dtype.f16 or dtype_name == dtype.f32: |
| 152 | + pytest.skip() |
147 | 153 | lhs = wrapper.randu(shape, dtype_name) |
148 | 154 | rhs = wrapper.randu(shape, dtype_name) |
149 | 155 |
|
@@ -180,10 +186,12 @@ def test_bitor_shapes_invalid(invdtypes: dtype.Dtype) -> None: |
180 | 186 | (random.randint(1, 10), random.randint(1, 10), random.randint(1, 10), random.randint(1, 10)), |
181 | 187 | ], |
182 | 188 | ) |
183 | | -@pytest.mark.parametrize("dtype_name", get_all_types()) |
| 189 | +@pytest.mark.parametrize("dtype_name", get_real_types()) |
184 | 190 | def test_bitxor_shape_dtypes(shape: tuple, dtype_name: dtype.Dtype) -> None: |
185 | 191 | """Test bitxor operation between two arrays of the same shape""" |
186 | 192 | check_type_supported(dtype_name) |
| 193 | + if dtype_name == dtype.f16 or dtype_name == dtype.f32: |
| 194 | + pytest.skip() |
187 | 195 | lhs = wrapper.randu(shape, dtype_name) |
188 | 196 | rhs = wrapper.randu(shape, dtype_name) |
189 | 197 |
|
|
0 commit comments