fix: restore pytorch DLL replacement #3
Workflow file for this run
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: Build | |
on: | |
push: | |
tags: | |
- '*' | |
jobs: | |
build: | |
strategy: | |
fail-fast: false | |
matrix: | |
build: | |
- arch: 'x64' | |
type: 'rocm5' | |
zluda_url: 'https://github.com/lshqqytiger/ZLUDA/releases/download/rel.c0804ca624963aab420cb418412b1c7fbae3454b/ZLUDA-windows-rocm5-amd64.zip' | |
- arch: 'x64' | |
type: 'rocm6' | |
zluda_url: 'https://github.com/lshqqytiger/ZLUDA/releases/download/rel.c0804ca624963aab420cb418412b1c7fbae3454b/ZLUDA-windows-rocm6-amd64.zip' | |
runs-on: ubuntu-latest | |
env: | |
artifact_name: win32-${{ matrix.build.arch }}-${{ matrix.build.type }}.tar.br | |
steps: | |
- name: Prepare ZLUDA | |
run: | | |
mkdir -p python/Lib/site-packages/torch/lib | |
curl -L -o zluda.zip ${{ matrix.build.zluda_url }} | |
unzip zluda.zip | |
cp zluda/cublas.dll zluda/cublas64_11.dll | |
cp zluda/cusparse.dll zluda/cusparse64_11.dll | |
cp zluda/nvrtc.dll zluda/nvrtc64_112_0.dll | |
cp zluda/cublas.dll python/Lib/site-packages/torch/lib/cublas64_11.dll | |
cp zluda/cusparse.dll python/Lib/site-packages/torch/lib/cusparse64_11.dll | |
cp zluda/nvrtc.dll python/Lib/site-packages/torch/lib/nvrtc64_112_0.dll | |
cp -r zluda python/zluda | |
- name: Build artifact | |
run: | | |
cd python | |
tar -cf - * | brotli -6 > /tmp/${{ env.artifact_name }} | |
- name: Upload artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: ${{ env.artifact_name }} | |
path: /tmp/${{ env.artifact_name }} | |
compression-level: 0 | |
release: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
needs: | |
- build | |
steps: | |
- uses: actions/download-artifact@v4 | |
with: | |
merge-multiple: true | |
- uses: ncipollo/release-action@v1 | |
with: | |
artifacts: '*.br' |