Skip to content

Commit 9723dfc

Browse files
committed
Restructure Windows ROCm workflow
1 parent 953e648 commit 9723dfc

File tree

1 file changed

+43
-16
lines changed

1 file changed

+43
-16
lines changed

.github/workflows/build-wheel-rocm-windows.yml

Lines changed: 43 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -3,22 +3,17 @@ name: Build ROCm Windows Wheel
33
on: workflow_dispatch
44

55
jobs:
6-
build_wheels:
7-
name: Build ROCm wheel
6+
build_libs:
7+
name: Build ROCm Lib
88
runs-on: windows-latest
99
defaults:
1010
run:
1111
shell: pwsh
1212

1313
steps:
14-
- uses: actions/checkout@v3
15-
with:
16-
repository: 'abetlen/llama-cpp-python'
17-
ref: 'v0.1.77'
1814
- uses: actions/checkout@v3
1915
with:
2016
repository: 'SlyEcho/llama.cpp'
21-
path: 'vendor/llama.cpp'
2217
ref: 'hipblas'
2318

2419
- name: Install ROCm SDK
@@ -32,26 +27,58 @@ jobs:
3227
3328
- uses: actions/setup-python@v3
3429
with:
35-
python-version: ${{ matrix.pyver }}
30+
python-version: "3.10"
3631

3732
- name: Install Dependencies
3833
run: |
39-
python -m pip install build wheel cmake scikit-build ninja
34+
python -m pip install cmake ninja
4035
41-
- name: Build Wheel
36+
- name: Build Lib
4237
run: |
4338
$env:CC = 'C:\Program Files\AMD\ROCm\5.5\bin\clang.exe'
4439
$env:CXX = 'C:\Program Files\AMD\ROCm\5.5\bin\clang++.exe'
4540
$env:CMAKE_PREFIX_PATH = 'C:\Program Files\AMD\ROCm\5.5'
4641
$env:VERBOSE = '1'
47-
pushd '.\vendor\llama.cpp'
48-
cmake -B build -G "Ninja" -DLLAMA_HIPBLAS=ON "-DCMAKE_HIP_ARCHITECTURES=gfx1030;gfx1100" -DBUILD_SHARED_LIBS=ON
42+
cmake -B build -G "Ninja" -DLLAMA_HIPBLAS=ON -DCMAKE_HIP_ARCHITECTURES="gfx1030;gfx1100" -DBUILD_SHARED_LIBS=ON
4943
cmake --build build --config Release --target llama
50-
Copy-Item '.\build\bin\Release\llama.dll' '..\..\llama_cpp'
51-
popd
44+
45+
- uses: actions/upload-artifact@v3
46+
with:
47+
name: 'lib'
48+
path: ./**/llama.dll
49+
50+
build_wheel:
51+
name: Build ROCm Lib
52+
runs-on: windows-latest
53+
needs: build_libs
54+
defaults:
55+
run:
56+
shell: pwsh
57+
58+
steps:
59+
- uses: actions/checkout@v3
60+
with:
61+
repository: 'abetlen/llama-cpp-python'
62+
ref: 'v0.1.77'
63+
64+
- uses: actions/download-artifact@v3
65+
with:
66+
name: 'lib'
67+
path: ./llama_cpp
68+
69+
- uses: actions/setup-python@v3
70+
with:
71+
python-version: "3.10"
72+
73+
- name: Install Dependencies
74+
run: |
75+
python -m pip install build wheel cmake scikit-build ninja
76+
77+
- name: Build Lib
78+
run: |
5279
python setup.py --skip-cmake bdist_wheel egg_info --tag-build=+rocm5.5.1
5380
5481
- uses: actions/upload-artifact@v3
5582
with:
56-
name: 'wheels'
57-
path: ./dist/*.whl
83+
name: 'lib'
84+
path: ./**/llama.dll

0 commit comments

Comments
 (0)