Skip to content

Commit 0368c8f

Browse files
committed
Use cupy specific skips and xfails
1 parent c8a5a70 commit 0368c8f

File tree

3 files changed

+154
-1
lines changed

3 files changed

+154
-1
lines changed

cupy-skips.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Hangs
2+
array_api_tests/test_linalg.py::test_qr

cupy-xfails.txt

Lines changed: 151 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,151 @@
1+
# cupy doesn't have __index__ (and we cannot wrap the ndarray object)
2+
array_api_tests/test_array_object.py::test_scalar_casting[__index__(uint8)]
3+
array_api_tests/test_array_object.py::test_scalar_casting[__index__(uint16)]
4+
array_api_tests/test_array_object.py::test_scalar_casting[__index__(uint32)]
5+
array_api_tests/test_array_object.py::test_scalar_casting[__index__(uint64)]
6+
array_api_tests/test_array_object.py::test_scalar_casting[__index__(int8)]
7+
array_api_tests/test_array_object.py::test_scalar_casting[__index__(int16)]
8+
array_api_tests/test_array_object.py::test_scalar_casting[__index__(int32)]
9+
array_api_tests/test_array_object.py::test_scalar_casting[__index__(int64)]
10+
# copy=False is not yet implemented
11+
array_api_tests/test_creation_functions.py::test_asarray_arrays
12+
# finfo test is testing that the result is a float instead of float32 (see
13+
# also https://github.com/data-apis/array-api/issues/405)
14+
array_api_tests/test_data_type_functions.py::test_finfo[float32]
15+
16+
# Some array attributes are missing, and we do not wrap the array object
17+
array_api_tests/test_has_names.py::test_has_names[array_method-__array_namespace__]
18+
array_api_tests/test_has_names.py::test_has_names[array_method-__index__]
19+
array_api_tests/test_has_names.py::test_has_names[array_method-to_device]
20+
array_api_tests/test_has_names.py::test_has_names[array_attribute-mT]
21+
22+
# Some linalg tests depend on .mT instead of matrix_transpose()
23+
# and some require https://github.com/data-apis/array-api-tests/pull/101 to
24+
array_api_tests/test_linalg.py::test_eigvalsh
25+
array_api_tests/test_linalg.py::test_matrix_norm
26+
array_api_tests/test_linalg.py::test_solve
27+
array_api_tests/test_linalg.py::test_svd
28+
array_api_tests/test_linalg.py::test_svdvals
29+
# cupy uses 2023.12 trace() behavior https://github.com/data-apis/array-api/pull/502
30+
array_api_tests/test_linalg.py::test_trace
31+
# We cannot modify array methods
32+
array_api_tests/test_operators_and_elementwise_functions.py::test_divide[__truediv__(x, s)]
33+
array_api_tests/test_operators_and_elementwise_functions.py::test_remainder[__mod__(x1, x2)]
34+
array_api_tests/test_operators_and_elementwise_functions.py::test_remainder[__imod__(x1, x2)]
35+
#
36+
# array_api_tests/test_operators_and_elementwise_functions.py::test_remainder[remainder(x1, x2)]
37+
array_api_tests/test_searching_functions.py::test_argmax
38+
array_api_tests/test_signatures.py::test_func_signature[meshgrid]
39+
array_api_tests/test_signatures.py::test_array_method_signature[__array_namespace__]
40+
array_api_tests/test_signatures.py::test_array_method_signature[__index__]
41+
array_api_tests/test_signatures.py::test_array_method_signature[to_device]
42+
array_api_tests/test_sorting_functions.py::test_argsort
43+
array_api_tests/test_sorting_functions.py::test_sort
44+
array_api_tests/test_special_cases.py::test_unary[abs(x_i is -0) -> +0]
45+
array_api_tests/test_special_cases.py::test_unary[__abs__(x_i is -0) -> +0]
46+
array_api_tests/test_special_cases.py::test_unary[asin(x_i is -0) -> -0]
47+
array_api_tests/test_special_cases.py::test_unary[asinh(x_i is -0) -> -0]
48+
array_api_tests/test_special_cases.py::test_unary[atan(x_i is -0) -> -0]
49+
array_api_tests/test_special_cases.py::test_unary[atanh(x_i is -0) -> -0]
50+
array_api_tests/test_special_cases.py::test_unary[ceil(x_i is -0) -> -0]
51+
array_api_tests/test_special_cases.py::test_unary[cos(x_i is -0) -> 1]
52+
array_api_tests/test_special_cases.py::test_unary[cosh(x_i is -0) -> 1]
53+
array_api_tests/test_special_cases.py::test_unary[exp(x_i is -0) -> 1]
54+
array_api_tests/test_special_cases.py::test_unary[expm1(x_i is -0) -> -0]
55+
array_api_tests/test_special_cases.py::test_unary[floor(x_i is -0) -> -0]
56+
array_api_tests/test_special_cases.py::test_unary[log1p(x_i is -0) -> -0]
57+
array_api_tests/test_special_cases.py::test_unary[round(x_i is -0) -> -0]
58+
array_api_tests/test_special_cases.py::test_unary[sin(x_i is -0) -> -0]
59+
array_api_tests/test_special_cases.py::test_unary[sinh(x_i is -0) -> -0]
60+
array_api_tests/test_special_cases.py::test_unary[sqrt(x_i is -0) -> -0]
61+
array_api_tests/test_special_cases.py::test_unary[tan(x_i is -0) -> -0]
62+
array_api_tests/test_special_cases.py::test_unary[tanh(x_i is -0) -> -0]
63+
array_api_tests/test_special_cases.py::test_unary[trunc(x_i is -0) -> -0]
64+
array_api_tests/test_special_cases.py::test_binary[add(x1_i is -0 and x2_i is -0) -> -0]
65+
array_api_tests/test_special_cases.py::test_binary[add(x1_i is -0 and x2_i is +0) -> +0]
66+
array_api_tests/test_special_cases.py::test_binary[add(x1_i is +0 and x2_i is -0) -> +0]
67+
array_api_tests/test_special_cases.py::test_binary[add(isfinite(x1_i) and x1_i != 0 and x2_i == -x1_i) -> +0]
68+
array_api_tests/test_special_cases.py::test_binary[__add__(x1_i is -0 and x2_i is -0) -> -0]
69+
array_api_tests/test_special_cases.py::test_binary[__add__(x1_i is -0 and x2_i is +0) -> +0]
70+
array_api_tests/test_special_cases.py::test_binary[__add__(x1_i is +0 and x2_i is -0) -> +0]
71+
array_api_tests/test_special_cases.py::test_binary[atan2(x1_i > 0 and x2_i is -0) -> roughly +pi/2]
72+
array_api_tests/test_special_cases.py::test_binary[atan2(x1_i is +0 and x2_i is -0) -> roughly +pi]
73+
array_api_tests/test_special_cases.py::test_binary[atan2(x1_i is -0 and x2_i > 0) -> -0]
74+
array_api_tests/test_special_cases.py::test_binary[atan2(x1_i is -0 and x2_i is +0) -> -0]
75+
array_api_tests/test_special_cases.py::test_binary[atan2(x1_i is -0 and x2_i is -0) -> roughly -pi]
76+
array_api_tests/test_special_cases.py::test_binary[atan2(x1_i is -0 and x2_i < 0) -> roughly -pi]
77+
array_api_tests/test_special_cases.py::test_binary[atan2(x1_i < 0 and x2_i is -0) -> roughly -pi/2]
78+
array_api_tests/test_special_cases.py::test_binary[divide(x1_i is -0 and x2_i > 0) -> -0]
79+
array_api_tests/test_special_cases.py::test_binary[divide(x1_i is -0 and x2_i < 0) -> +0]
80+
array_api_tests/test_special_cases.py::test_binary[divide(x1_i > 0 and x2_i is -0) -> -infinity]
81+
array_api_tests/test_special_cases.py::test_binary[divide(x1_i < 0 and x2_i is -0) -> +infinity]
82+
array_api_tests/test_special_cases.py::test_binary[__truediv__(x1_i is -0 and x2_i > 0) -> -0]
83+
array_api_tests/test_special_cases.py::test_binary[__truediv__(x1_i is -0 and x2_i < 0) -> +0]
84+
array_api_tests/test_special_cases.py::test_binary[__truediv__(x1_i > 0 and x2_i is -0) -> -infinity]
85+
array_api_tests/test_special_cases.py::test_binary[__truediv__(x1_i < 0 and x2_i is -0) -> +infinity]
86+
array_api_tests/test_special_cases.py::test_binary[floor_divide(x1_i is -0 and x2_i > 0) -> -0]
87+
array_api_tests/test_special_cases.py::test_binary[floor_divide(x1_i is -0 and x2_i < 0) -> +0]
88+
array_api_tests/test_special_cases.py::test_binary[floor_divide(x1_i > 0 and x2_i is -0) -> -infinity]
89+
array_api_tests/test_special_cases.py::test_binary[floor_divide(x1_i < 0 and x2_i is -0) -> +infinity]
90+
array_api_tests/test_special_cases.py::test_binary[__floordiv__(x1_i is -0 and x2_i > 0) -> -0]
91+
array_api_tests/test_special_cases.py::test_binary[__floordiv__(x1_i is -0 and x2_i < 0) -> +0]
92+
array_api_tests/test_special_cases.py::test_binary[__floordiv__(x1_i > 0 and x2_i is -0) -> -infinity]
93+
array_api_tests/test_special_cases.py::test_binary[__floordiv__(x1_i < 0 and x2_i is -0) -> +infinity]
94+
array_api_tests/test_special_cases.py::test_binary[pow(x2_i is -0) -> 1]
95+
array_api_tests/test_special_cases.py::test_binary[pow(x1_i is -0 and x2_i > 0 and x2_i.is_integer() and x2_i % 2 == 1) -> -0]
96+
array_api_tests/test_special_cases.py::test_binary[pow(x1_i is -0 and x2_i > 0 and not (x2_i.is_integer() and x2_i % 2 == 1)) -> +0]
97+
array_api_tests/test_special_cases.py::test_binary[pow(x1_i is -0 and x2_i < 0 and x2_i.is_integer() and x2_i % 2 == 1) -> -infinity]
98+
array_api_tests/test_special_cases.py::test_binary[pow(x1_i is -0 and x2_i < 0 and not (x2_i.is_integer() and x2_i % 2 == 1)) -> +infinity]
99+
array_api_tests/test_special_cases.py::test_binary[__pow__(x2_i is -0) -> 1]
100+
array_api_tests/test_special_cases.py::test_binary[__pow__(x1_i is -0 and x2_i > 0 and x2_i.is_integer() and x2_i % 2 == 1) -> -0]
101+
array_api_tests/test_special_cases.py::test_binary[__pow__(x1_i is -0 and x2_i > 0 and not (x2_i.is_integer() and x2_i % 2 == 1)) -> +0]
102+
array_api_tests/test_special_cases.py::test_binary[__pow__(x1_i is -0 and x2_i < 0 and x2_i.is_integer() and x2_i % 2 == 1) -> -infinity]
103+
array_api_tests/test_special_cases.py::test_binary[__pow__(x1_i is -0 and x2_i < 0 and not (x2_i.is_integer() and x2_i % 2 == 1)) -> +infinity]
104+
array_api_tests/test_special_cases.py::test_binary[remainder(x1_i is +0 and x2_i > 0) -> +0]
105+
array_api_tests/test_special_cases.py::test_binary[remainder(x1_i is -0 and x2_i > 0) -> +0]
106+
array_api_tests/test_special_cases.py::test_binary[remainder(x1_i is +0 and x2_i < 0) -> -0]
107+
array_api_tests/test_special_cases.py::test_binary[remainder(x1_i is -0 and x2_i < 0) -> -0]
108+
array_api_tests/test_special_cases.py::test_binary[remainder(x1_i > 0 and x2_i is -0) -> NaN]
109+
array_api_tests/test_special_cases.py::test_binary[remainder(x1_i < 0 and x2_i is -0) -> NaN]
110+
array_api_tests/test_special_cases.py::test_binary[remainder(isfinite(x1_i) and x1_i > 0 and x2_i is +infinity) -> x1_i]
111+
array_api_tests/test_special_cases.py::test_binary[remainder(isfinite(x1_i) and x1_i > 0 and x2_i is -infinity) -> x2_i]
112+
array_api_tests/test_special_cases.py::test_binary[remainder(isfinite(x1_i) and x1_i < 0 and x2_i is +infinity) -> x2_i]
113+
array_api_tests/test_special_cases.py::test_binary[remainder(isfinite(x1_i) and x1_i < 0 and x2_i is -infinity) -> x1_i]
114+
array_api_tests/test_special_cases.py::test_binary[__mod__(x1_i is +0 and x2_i > 0) -> +0]
115+
array_api_tests/test_special_cases.py::test_binary[__mod__(x1_i is -0 and x2_i > 0) -> +0]
116+
array_api_tests/test_special_cases.py::test_binary[__mod__(x1_i is +0 and x2_i < 0) -> -0]
117+
array_api_tests/test_special_cases.py::test_binary[__mod__(x1_i is -0 and x2_i < 0) -> -0]
118+
array_api_tests/test_special_cases.py::test_binary[__mod__(x1_i > 0 and x2_i is -0) -> NaN]
119+
array_api_tests/test_special_cases.py::test_binary[__mod__(x1_i < 0 and x2_i is -0) -> NaN]
120+
array_api_tests/test_special_cases.py::test_binary[__mod__(isfinite(x1_i) and x1_i > 0 and x2_i is +infinity) -> x1_i]
121+
array_api_tests/test_special_cases.py::test_binary[__mod__(isfinite(x1_i) and x1_i > 0 and x2_i is -infinity) -> x2_i]
122+
array_api_tests/test_special_cases.py::test_binary[__mod__(isfinite(x1_i) and x1_i < 0 and x2_i is +infinity) -> x2_i]
123+
array_api_tests/test_special_cases.py::test_binary[__mod__(isfinite(x1_i) and x1_i < 0 and x2_i is -infinity) -> x1_i]
124+
array_api_tests/test_special_cases.py::test_iop[__iadd__(x1_i is -0 and x2_i is -0) -> -0]
125+
array_api_tests/test_special_cases.py::test_iop[__iadd__(x1_i is -0 and x2_i is +0) -> +0]
126+
array_api_tests/test_special_cases.py::test_iop[__iadd__(x1_i is +0 and x2_i is -0) -> +0]
127+
array_api_tests/test_special_cases.py::test_iop[__iadd__(isfinite(x1_i) and x1_i != 0 and x2_i == -x1_i) -> +0]
128+
array_api_tests/test_special_cases.py::test_iop[__itruediv__(x1_i is -0 and x2_i > 0) -> -0]
129+
array_api_tests/test_special_cases.py::test_iop[__itruediv__(x1_i is -0 and x2_i < 0) -> +0]
130+
array_api_tests/test_special_cases.py::test_iop[__itruediv__(x1_i > 0 and x2_i is -0) -> -infinity]
131+
array_api_tests/test_special_cases.py::test_iop[__itruediv__(x1_i < 0 and x2_i is -0) -> +infinity]
132+
array_api_tests/test_special_cases.py::test_iop[__ifloordiv__(x1_i is -0 and x2_i > 0) -> -0]
133+
array_api_tests/test_special_cases.py::test_iop[__ifloordiv__(x1_i is -0 and x2_i < 0) -> +0]
134+
array_api_tests/test_special_cases.py::test_iop[__ifloordiv__(x1_i > 0 and x2_i is -0) -> -infinity]
135+
array_api_tests/test_special_cases.py::test_iop[__ifloordiv__(x1_i < 0 and x2_i is -0) -> +infinity]
136+
array_api_tests/test_special_cases.py::test_iop[__ipow__(x2_i is -0) -> 1]
137+
array_api_tests/test_special_cases.py::test_iop[__ipow__(x1_i is -0 and x2_i > 0 and x2_i.is_integer() and x2_i % 2 == 1) -> -0]
138+
array_api_tests/test_special_cases.py::test_iop[__ipow__(x1_i is -0 and x2_i > 0 and not (x2_i.is_integer() and x2_i % 2 == 1)) -> +0]
139+
array_api_tests/test_special_cases.py::test_iop[__ipow__(x1_i is -0 and x2_i < 0 and x2_i.is_integer() and x2_i % 2 == 1) -> -infinity]
140+
array_api_tests/test_special_cases.py::test_iop[__ipow__(x1_i is -0 and x2_i < 0 and not (x2_i.is_integer() and x2_i % 2 == 1)) -> +infinity]
141+
array_api_tests/test_special_cases.py::test_iop[__imod__(x1_i is +0 and x2_i > 0) -> +0]
142+
array_api_tests/test_special_cases.py::test_iop[__imod__(x1_i is -0 and x2_i > 0) -> +0]
143+
array_api_tests/test_special_cases.py::test_iop[__imod__(x1_i is +0 and x2_i < 0) -> -0]
144+
array_api_tests/test_special_cases.py::test_iop[__imod__(x1_i is -0 and x2_i < 0) -> -0]
145+
array_api_tests/test_special_cases.py::test_iop[__imod__(x1_i > 0 and x2_i is -0) -> NaN]
146+
array_api_tests/test_special_cases.py::test_iop[__imod__(x1_i < 0 and x2_i is -0) -> NaN]
147+
array_api_tests/test_special_cases.py::test_iop[__imod__(isfinite(x1_i) and x1_i > 0 and x2_i is +infinity) -> x1_i]
148+
array_api_tests/test_special_cases.py::test_iop[__imod__(isfinite(x1_i) and x1_i > 0 and x2_i is -infinity) -> x2_i]
149+
array_api_tests/test_special_cases.py::test_iop[__imod__(isfinite(x1_i) and x1_i < 0 and x2_i is +infinity) -> x2_i]
150+
array_api_tests/test_special_cases.py::test_iop[__imod__(isfinite(x1_i) and x1_i < 0 and x2_i is -infinity) -> x1_i]
151+
array_api_tests/test_statistical_functions.py::test_min

test_cupy.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,4 @@ git checkout asmeurer/xfails-file
2323
git submodule update --init
2424

2525
export ARRAY_API_TESTS_MODULE=array_api_compat.cupy
26-
pytest ${PYTEST_ARGS} --xfails-file $SCRIPT_DIR/numpy-xfails.txt
26+
pytest ${PYTEST_ARGS} --xfails-file $SCRIPT_DIR/cupy-xfails.txt --skips-file $SCRIPT_DIR/cupy-skips.txt

0 commit comments

Comments
 (0)