Skip to content

Commit

Permalink
feat: add support for zluda
Browse files Browse the repository at this point in the history
  • Loading branch information
mat-sz committed Nov 27, 2024
1 parent e20f878 commit 0b152ff
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
13 changes: 13 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -111,11 +111,15 @@ jobs:
- arch: 'x64'
type: 'cpu'
pip_args: ''
- arch: 'x64'
type: 'zluda'
pip_args: ''
runs-on: windows-latest
env:
artifact_name: win32-${{ matrix.build.arch }}-${{ matrix.build.type }}.tar.br
python_url: 'https://github.com/indygreg/python-build-standalone/releases/download/20241016/cpython-3.11.10+20241016-x86_64-pc-windows-msvc-shared-install_only_stripped.tar.gz'
pip_args: ${{ matrix.build.pip_args }} -r requirements.${{ matrix.build.type }}.txt
zluda_url: 'https://github.com/lshqqytiger/ZLUDA/releases/download/rel.c0804ca624963aab420cb418412b1c7fbae3454b/ZLUDA-windows-rocm5-amd64.zip'
steps:
- uses: actions/checkout@v4

Expand Down Expand Up @@ -143,6 +147,15 @@ jobs:
- name: Install packages
run: .\python\python.exe -m pip install --no-compile ${{ env.pip_args }}

- name: Patch for ZLUDA
if: matrix.build.type == 'zluda'
run: |
curl -L -o zluda.zip ${{ env.zluda_url }}
unzip zluda.zip
Copy-Item -Force zluda/cublas.dll python/Lib/site-packages/torch/lib/cublas64_11.dll
Copy-Item -Force zluda/cusparse.dll python/Lib/site-packages/torch/lib/cusparse64_11.dll
Copy-Item -Force zluda/nvrtc.dll python/Lib/site-packages/torch/lib/nvrtc64_112_0.dll
- name: Clean up
run: |
rm -r -fo python/Lib/site-packages/torch/include
Expand Down
5 changes: 5 additions & 0 deletions requirements.zluda.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
--extra-index-url https://download.pytorch.org/whl/cu118
-r requirements.txt
torch==2.3.0
torchvision==0.18.0
torchaudio==2.3.0

0 comments on commit 0b152ff

Please sign in to comment.