-
Notifications
You must be signed in to change notification settings - Fork 638
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Initial addition of GPU runner workflow
- Loading branch information
1 parent
723e216
commit 37173ad
Showing
1 changed file
with
72 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
on: | ||
workflow_dispatch: | ||
#pull_request: | ||
# branches: [main, multi-backend-refactor] | ||
|
||
jobs: | ||
run-tests: | ||
runs-on: [CUDA-Linux-x64] | ||
needs: build-cuda | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
torch_version: [ | ||
# "2.0.1", | ||
# "2.1.2", | ||
# "2.2.2", | ||
"2.3.1", | ||
"2.4.1" | ||
] | ||
python_version: | ||
["3.8", "3.9", "3.10", "3.11", "3.12"] | ||
|
||
steps: | ||
- name: Checkout repo | ||
uses: actions/checkout@v4 | ||
- name: Download build artifact | ||
uses: actions/download-artifact@v4 | ||
with: | ||
pattern: shared_cuda* | ||
merge-multiple: true | ||
path: bitsandbytes/ | ||
- name: Show directory structure | ||
run: ls -lR | ||
- name: Show GPU information | ||
run: nvidia-smi | ||
- name: Set up Python ${{ matrix.python_version }} | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ matrix.python_version }} | ||
- name: Install testing dependencies | ||
run: | | ||
pip install -r requirements-ci.txt | ||
pip install -e . | ||
pip install torch==${{ matrix.torch_version }} | ||
- name: Show installed packages | ||
run: pip freeze | ||
- name: Run tests | ||
run: pytest | ||
|
||
build-cuda: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: true | ||
matrix: | ||
cuda_version: | ||
["11.8.0", "12.1.1", "12.4.1"] | ||
|
||
steps: | ||
- name: Checkout repo | ||
uses: actions/checkout@v4 | ||
- name: Build CUDA backend | ||
run: bash .github/scripts/build-cuda.sh | ||
env: | ||
build_os: ubuntu | ||
build_arch: x86_64 | ||
cuda_version: ${{ matrix.cuda_version }} | ||
- name: Upload build artifact | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: shared_cuda${{ matrix.cuda_version }} | ||
path: output/* | ||
retention-days: 7 |