Skip to content

Commit 795dbea

Browse files
committed
Merge branch 'pytorch' of github.com:asmeurer/array-api-compat into pytorch
2 parents 7261dae + c8a5a70 commit 795dbea

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

test_cupy.sh

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# We cannot test cupy on CI so this script will test it manually. Assumes it
2+
# is being run in an environment that has cupy and the array-api-tests
3+
# dependencies installed
4+
set -x
5+
set -e
6+
7+
tmpdir=$(mktemp -d)
8+
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
9+
export PYTHONPATH=$SCRIPT_DIR
10+
11+
PYTEST_ARGS="--max-examples 200 -v -rxXfE --ci"
12+
13+
cd $tmpdir
14+
git clone https://github.com/data-apis/array-api-tests
15+
cd array-api-tests
16+
17+
# Remove this once https://github.com/data-apis/array-api-tests/pull/157 is
18+
# merged
19+
git remote add asmeurer https://github.com/asmeurer/array-api-tests
20+
git fetch asmeurer
21+
git checkout asmeurer/xfails-file
22+
23+
git submodule update --init
24+
25+
export ARRAY_API_TESTS_MODULE=array_api_compat.cupy
26+
pytest ${PYTEST_ARGS} --xfails-file $SCRIPT_DIR/numpy-xfails.txt

0 commit comments

Comments
 (0)