Skip to content

[Backport] Test against CUDA wheels #378

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jan 12, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 24 additions & 13 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -158,14 +158,17 @@ jobs:
cuda-version:
# Note: this is for test-time only.
- "11.8.0"
local-ctk:
- 1 # use mini CTK
- 0 # use CTK wheels
runner:
- default
include:
- host-platform: linux-64
python-version: "3.12"
cuda-version: "11.8.0"
runner: H100
name: Test (${{ matrix.host-platform }}, Python ${{ matrix.python-version }}, CUDA ${{ matrix.cuda-version }}, Runner ${{ matrix.runner }})
name: Test (${{ matrix.host-platform }}, Python ${{ matrix.python-version }}, CUDA ${{ matrix.cuda-version }}, Runner ${{ matrix.runner }}, ${{ (matrix.local-ctk == '1' && 'local CTK') || 'CTK wheels' }})
# The build stage could fail but we want the CI to keep moving.
if: ${{ github.repository_owner == 'nvidia' && always() }}
permissions:
Expand Down Expand Up @@ -239,6 +242,7 @@ jobs:
AGENT_TOOLSDIRECTORY: "/opt/hostedtoolcache"

- name: Set up mini CTK
if: ${{ matrix.local-ctk == '1' }}
uses: ./.github/actions/fetch_ctk
continue-on-error: false
with:
Expand All @@ -249,24 +253,31 @@ jobs:
if: ${{ env.SKIP_CUDA_BINDINGS_TEST == '0' }}
shell: bash --noprofile --norc -xeuo pipefail {0}
run: |
ls $CUDA_PATH

pushd "${CUDA_BINDINGS_ARTIFACTS_DIR}"
pip install *.whl
if [[ "${{ matrix.local-ctk }}" == 1 ]]; then
ls $CUDA_PATH
pip install *.whl
else
pip install $(ls *.whl)[all]
fi
popd

pushd ./cuda_bindings
pip install -r requirements.txt
pytest -rxXs tests/
if [[ "${{ matrix.host-platform }}" == linux* ]]; then
# cython tests require gcc
apt install -y build-essential
bash tests_cython/build_tests.sh
elif [[ "${{ matrix.host-platform }}" == win* ]]; then
# TODO: enable this once win-64 runners are up
exit 1
fi
pytest -rxXs tests_cython
# It is a bit convoluted to run the Cython tests against CTK wheels,
# so let's just skip them.
if [[ "${{ matrix.local-ctk }}" == 1 ]]; then
if [[ "${{ matrix.host-platform }}" == linux* ]]; then
# cython tests require gcc
apt install -y build-essential
bash tests_cython/build_tests.sh
elif [[ "${{ matrix.host-platform }}" == win* ]]; then
# TODO: enable this once win-64 runners are up
exit 1
fi
pytest -rxXs tests_cython
fi
popd

checks:
Expand Down
Loading