Skip to content

Commit 612fac1

Browse files
committed
Upload experimental Windows ROCm workflow
1 parent 606ff6e commit 612fac1

File tree

1 file changed

+49
-0
lines changed

1 file changed

+49
-0
lines changed
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: Build ROCm Windows Wheel
2+
3+
on: workflow_dispatch
4+
5+
jobs:
6+
build_wheels:
7+
name: Build ROCm wheel
8+
runs-on: windows-latest
9+
defaults:
10+
run:
11+
shell: pwsh
12+
13+
steps:
14+
- uses: actions/checkout@v3
15+
with:
16+
repository: 'abetlen/llama-cpp-python'
17+
ref: 'v0.1.77'
18+
- uses: actions/checkout@v3
19+
with:
20+
repository: 'SlyEcho/llama.cpp'
21+
path: 'vendor/llama.cpp'
22+
23+
- name: Install ROCm SDK
24+
run: |
25+
curl -LO https://download.amd.com/developer/eula/rocm-hub/AMD-Software-PRO-Edition-23.Q3-Win10-Win11-For-HIP.exe
26+
Start-Process 'AMD-Software-PRO-Edition-23.Q3-Win10-Win11-For-HIP.exe' -ArgumentList '-install' -NoNewWindow -Wait
27+
echo "C:\Program Files\AMD\ROCm\5.5\bin" >> $env:GITHUB_PATH
28+
echo "ROCM_PATH=C:\Program Files\AMD\ROCm\5.5" >> $env:GITHUB_ENV
29+
echo "ROCM_VERSION=5.5.1" >> $env:GITHUB_ENV
30+
31+
- uses: actions/setup-python@v3
32+
with:
33+
python-version: ${{ matrix.pyver }}
34+
35+
- name: Install Dependencies
36+
run: |
37+
pip3 install build wheel cmake scikit-build ninja
38+
39+
- name: Build Wheel
40+
run: |
41+
$env:VERBOSE = '1'
42+
$env:FORCE_CMAKE = '1'
43+
$env:CMAKE_ARGS = '-DLLAMA_HIPBLAS=on -DCMAKE_HIP_ARCHITECTURES=gfx1030;gfx1100 -DCMAKE_PREFIX_PATH="C:\Program Files\AMD\ROCm\5.5"'
44+
python3 -m build -n --wheel -C--build-option=egg_info "-C--build-option=--tag-build=+rocm5.5.1"
45+
46+
- uses: actions/upload-artifact@v3
47+
with:
48+
name: 'wheels'
49+
path: ./dist/*.whl

0 commit comments

Comments
 (0)