Support for ROCm 6.3 - add thrust macro #624
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: "Pre-review Tests" | |
on: [push, pull_request] | |
jobs: | |
static-checks: | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
# Checkout using commit hash to make "no-commit-to-branch" test pass. | |
ref: ${{ github.sha }} | |
- name: Setup Python | |
uses: actions/setup-python@v4 | |
id: setup-python | |
with: | |
python-version: '3.9' | |
- name: Setup cache | |
uses: actions/cache@v3 | |
with: | |
path: ~/.cache | |
key: | |
static-checks-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('.pre-commit-config.yaml') }} | |
restore-keys: | |
static-checks- | |
- name: Setup pre-commit | |
run: | | |
pip install pre-commit | |
- name: Install hipify-torch | |
run: | | |
pip install git+https://github.com/ROCmSoftwarePlatform/hipify_torch.git | |
- name: Check | |
run: | | |
pre-commit run -a --show-diff-on-failure | |
- name: Type Check | |
run: | | |
# TODO: Test against various NumPy/SciPy versions. | |
pip install 'numpy==1.25.*' 'scipy==1.10.*' | |
pip install 'mypy==1.5.*' 'types-setuptools==57.4.14' 'pytest>=7.2' | |
pytest -v tests/typing_tests/test_typing.py | |
build-cuda: | |
runs-on: ubuntu-22.04 | |
env: | |
CUPY_CI: GitHub | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
submodules: recursive | |
- name: Setup Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.9' | |
- name: Setup cache | |
uses: actions/cache@v3 | |
with: | |
path: ~/.cache | |
key: build-cuda-${{ github.sha }} | |
restore-keys: | | |
build-cuda-${{ github.event_name == 'pull_request' && github.event.pull_request.base.sha || github.event.before }} | |
build-cuda- | |
- name: Setup ccache | |
run: | | |
sudo apt-get update -y | |
sudo apt-get install -y ccache | |
echo "PATH=/usr/lib/ccache:${PATH}" >> "${GITHUB_ENV}" | |
ccache --show-stats -v | |
- name: Build | |
run: | | |
pip install git+https://github.com/ROCmSoftwarePlatform/hipify_torch.git | |
pip install -U pip wheel | |
READTHEDOCS=True pip install -v -e . | |
ccache --max-size 0.5Gi --cleanup --show-stats | |
- name: Docs Build | |
run: | | |
# Test to detect invalid escape sequences in docstrings (#1619) | |
python -Werror::DeprecationWarning -m compileall -f -q cupy cupyx examples tests docs | |
pushd docs | |
pip install -r requirements.txt | |
SPHINXOPTS="-W --keep-going -j 4" make html | |
popd | |
- name: Import Test | |
run: | | |
python -c 'import cupy, cupyx' | |
# Test lazy-imported CUDA Toolkit library. | |
rm cupy/cuda/cufft.*.so | |
rm cupy/random/_generator_api.*.so | |
rm cupy_backends/cuda/libs/cusolver.*.so | |
rm cupy_backends/cuda/libs/cusparse.*.so | |
rm cupy_backends/cuda/libs/curand.*.so | |
rm cupy_backends/cuda/libs/cublas.*.so | |
python -c 'import cupy, cupyx' | |
build-rocm: | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
submodules: recursive | |
- name: Build & Test | |
run: | | |
docker run --rm -v "${PWD}:/src" -w /src "rocm/dev-ubuntu-20.04:5.0-complete" bash .github/workflows/pretest-rocm-test.sh |