

set -ex



export MATRIX_GPU_ARCH_VERSION="13.3"
export MATRIX_GPU_ARCH_TYPE="mps"
export MATRIX_CHANNEL="defaults"
export MATRIX_STABLE_VERSION="2.5.1"
export MATRIX_PACKAGE_TYPE="conda"
export TARGET_OS="macos-arm64"
export OMP_NUM_THREADS=4
python ./smoke_test/smoke_test.py --package torchonly
python ./test/run_test.py --core --continue-through-error || true
python ./test/run_test.py --mps --continue-through-error || true
pip check
python -c "import torch; print(torch.__version__)"
python -c "import torch; import numpy"
python -c "import numpy; import torch"
python -c "import torch; assert torch.distributed.is_available()"
python -c "import torch; assert torch.backends.mps.is_built()"
python -c "import torch; torch.tensor(1).to('cpu').numpy(); print('numpy support enabled!!!')"
test -f $PREFIX/lib/libtorch_python${SHLIB_EXT}
exit 0
