File tree Expand file tree Collapse file tree 1 file changed +62
-0
lines changed Expand file tree Collapse file tree 1 file changed +62
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : Build ROCm 5.4.2 Wheels
2
+
3
+ on : workflow_dispatch
4
+
5
+ jobs :
6
+ build_wheels :
7
+ name : Build ROCm wheel
8
+ runs-on : ubuntu-20.04
9
+ defaults :
10
+ run :
11
+ shell : pwsh
12
+
13
+ steps :
14
+ - name : Free Disk Space
15
+ uses : jlumbroso/free-disk-space@v1.2.0
16
+ with :
17
+ tool-cache : false
18
+ android : true
19
+ dotnet : true
20
+ haskell : true
21
+ large-packages : false
22
+ swap-storage : false
23
+
24
+ - uses : actions/checkout@v3
25
+ with :
26
+ repository : ' abetlen/llama-cpp-python'
27
+ ref : ' v0.1.72'
28
+ submodules : ' recursive'
29
+
30
+ - name : Install ROCm SDK
31
+ run : |
32
+ [ ! -d /etc/apt/keyrings ] && sudo mkdir --parents --mode=0755 /etc/apt/keyrings
33
+ wget https://repo.radeon.com/rocm/rocm.gpg.key -O - | gpg --dearmor | sudo tee /etc/apt/keyrings/rocm.gpg > /dev/null
34
+ echo "deb [arch=amd64 signed-by=/etc/apt/keyrings/rocm.gpg] https://repo.radeon.com/rocm/apt/5.4.2 focal main" | sudo tee --append /etc/apt/sources.list.d/rocm.list
35
+ echo -e 'Package: *\nPin: release o=repo.radeon.com\nPin-Priority: 600' | sudo tee /etc/apt/preferences.d/rocm-pin-600
36
+ sudo apt update
37
+ sudo apt install rocm-dev rocsparse-dev rocprim-dev rocthrust-dev rocblas-dev hipblas-dev hipcub-dev hipsparse-dev -y
38
+ echo "/opt/rocm/bin" >> $GITHUB_PATH
39
+ echo "ROCM_PATH=/opt/rocm" >> $GITHUB_ENV
40
+ echo "ROCM_VERSION=5.4.2" >> $GITHUB_ENV
41
+ shell : bash
42
+
43
+ - uses : actions/setup-python@v3
44
+ with :
45
+ python-version : ${{ matrix.pyver }}
46
+
47
+ - name : Install Dependencies
48
+ run : |
49
+ pip3 install build wheel cmake
50
+
51
+ - name : Build Wheel
52
+ run : |
53
+ $env:VERBOSE = '1'
54
+ $env:FORCE_CMAKE = '1'
55
+ $env:CMAKE_ARGS = '-DLLAMA_CUBLAS=on -DCMAKE_HIP_ARCHITECTURES=gfx900:xnack-;gfx906:xnack-;gfx908:xnack-;gfx90a:xnack-;gfx90a:xnack+;gfx1030'
56
+ $env:CXX = '/opt/rocm/bin/hipcc'
57
+ python3 -m build -n --wheel -C--build-option=egg_info "-C--build-option=--tag-build=+rocm5.4.2"
58
+
59
+ - uses : actions/upload-artifact@v3
60
+ with :
61
+ name : ' wheels'
62
+ path : ./dist/*.whl
You can’t perform that action at this time.
0 commit comments