@@ -3,22 +3,17 @@ name: Build ROCm Windows Wheel
3
3
on : workflow_dispatch
4
4
5
5
jobs :
6
- build_wheels :
7
- name : Build ROCm wheel
6
+ build_libs :
7
+ name : Build ROCm Lib
8
8
runs-on : windows-latest
9
9
defaults :
10
10
run :
11
11
shell : pwsh
12
12
13
13
steps :
14
- - uses : actions/checkout@v3
15
- with :
16
- repository : ' abetlen/llama-cpp-python'
17
- ref : ' v0.1.77'
18
14
- uses : actions/checkout@v3
19
15
with :
20
16
repository : ' SlyEcho/llama.cpp'
21
- path : ' vendor/llama.cpp'
22
17
ref : ' hipblas'
23
18
24
19
- name : Install ROCm SDK
@@ -32,26 +27,58 @@ jobs:
32
27
33
28
- uses : actions/setup-python@v3
34
29
with :
35
- python-version : ${{ matrix.pyver }}
30
+ python-version : " 3.10 "
36
31
37
32
- name : Install Dependencies
38
33
run : |
39
- python -m pip install build wheel cmake scikit-build ninja
34
+ python -m pip install cmake ninja
40
35
41
- - name : Build Wheel
36
+ - name : Build Lib
42
37
run : |
43
38
$env:CC = 'C:\Program Files\AMD\ROCm\5.5\bin\clang.exe'
44
39
$env:CXX = 'C:\Program Files\AMD\ROCm\5.5\bin\clang++.exe'
45
40
$env:CMAKE_PREFIX_PATH = 'C:\Program Files\AMD\ROCm\5.5'
46
41
$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
49
43
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 : |
52
79
python setup.py --skip-cmake bdist_wheel egg_info --tag-build=+rocm5.5.1
53
80
54
81
- uses : actions/upload-artifact@v3
55
82
with :
56
- name : ' wheels '
57
- path : ./dist/*.whl
83
+ name : ' lib '
84
+ path : ./**/llama.dll
0 commit comments