Skip to content

Commit 01a344b

Browse files
committed
Build AVX and basic ROCm wheels
1 parent 2045cf8 commit 01a344b

File tree

4 files changed

+52
-29
lines changed

4 files changed

+52
-29
lines changed

.github/workflows/build-wheels-batch-rocm.yml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,19 @@ on:
55
inputs:
66
versions:
77
description: 'Comma-seperated version tags of llama-cpp-python to build'
8-
default: 'v0.1.83,v0.1.82,v0.1.81,v0.1.80'
8+
default: 'v0.2.11,v0.2.10,v0.2.9,v0.2.8'
99
required: true
1010
type: string
11+
config:
12+
description: 'Override configurations to build: key1:item1-1,item1-2;key2:item2-1,item2-2'
13+
default: 'Default'
14+
required: false
15+
type: string
16+
exclude:
17+
description: 'Exclude build configurations: key1-1:item1-1,key1-2:item1-2;key2-1:item2-1,key2-2:item2-2'
18+
default: 'Default'
19+
required: false
20+
type: string
1121

1222
permissions:
1323
contents: write
@@ -45,3 +55,5 @@ jobs:
4555
uses: ./.github/workflows/build-wheels-rocm-full.yml
4656
with:
4757
version: ${{ matrix.version }}
58+
config: ${{ inputs.config }}
59+
exclude: ${{ inputs.exclude }}

.github/workflows/build-wheels-full-release.yml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ on:
44
workflow_dispatch:
55
inputs:
66
version:
7-
description: 'Version tag of llama-cpp-python to build: v0.2.9'
8-
default: 'v0.2.9'
7+
description: 'Version tag of llama-cpp-python to build: v0.2.11'
8+
default: 'v0.2.11'
99
required: true
1010
type: string
1111

@@ -34,16 +34,16 @@ jobs:
3434
with:
3535
version: ${{ inputs.version }}
3636

37-
run_rocm:
38-
name: Build ROCm Wheels
37+
run_macos:
38+
name: Build MacOS Metal Wheels
3939
needs: run_cpu
40-
uses: ./.github/workflows/build-wheels-rocm-full.yml
40+
uses: ./.github/workflows/build-wheels-macos.yml
4141
with:
4242
version: ${{ inputs.version }}
4343

44-
run_macos:
45-
name: Build MacOS Metal Wheels
46-
needs: run_rocm
47-
uses: ./.github/workflows/build-wheels-macos.yml
44+
run_rocm:
45+
name: Build ROCm Wheels
46+
needs: run_macos
47+
uses: ./.github/workflows/build-wheels-rocm-full.yml
4848
with:
4949
version: ${{ inputs.version }}

.github/workflows/build-wheels-prioritized-release.yml

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ on:
44
workflow_dispatch:
55
inputs:
66
version:
7-
description: 'Version tag of llama-cpp-python to build: v0.2.9'
8-
default: 'v0.2.9'
7+
description: 'Version tag of llama-cpp-python to build: v0.2.11'
8+
default: 'v0.2.11'
99
required: true
1010
type: string
1111

@@ -40,7 +40,7 @@ jobs:
4040
uses: ./.github/workflows/build-wheels-rocm-full.yml
4141
with:
4242
version: ${{ inputs.version }}
43-
config: 'os:ubuntu-20.04;pyver:3.10;rocm:5.4.2;rename:1'
43+
config: 'os:ubuntu-20.04;pyver:3.10;rocm:5.6.1;rename:1'
4444
exclude: 'None'
4545

4646
build_wheels_macos_prio:
@@ -75,18 +75,18 @@ jobs:
7575
version: ${{ inputs.version }}
7676
exclude: 'pyver:3.10,avx:basic'
7777

78-
build_wheels_rocm:
79-
name: ROCm Wheels
80-
needs: build_wheels_cpu
81-
uses: ./.github/workflows/build-wheels-rocm-full.yml
82-
with:
83-
version: ${{ inputs.version }}
84-
exclude: 'os:ubuntu-20.04,pyver:3.10,rocm:5.4.2,rename:1'
85-
8678
build_wheels_macos:
8779
name: MacOS Metal Wheels
88-
needs: build_wheels_rocm
80+
needs: build_wheels_cpu
8981
uses: ./.github/workflows/build-wheels-macos.yml
9082
with:
9183
version: ${{ inputs.version }}
9284
exclude: 'pyver:3.10'
85+
86+
build_wheels_rocm:
87+
name: ROCm Wheels
88+
needs: build_wheels_macos
89+
uses: ./.github/workflows/build-wheels-rocm-full.yml
90+
with:
91+
version: ${{ inputs.version }}
92+
exclude: 'os:ubuntu-20.04,pyver:3.10,rocm:5.6.1,rename:1'

.github/workflows/build-wheels-rocm-full.yml

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ on:
44
workflow_dispatch:
55
inputs:
66
version:
7-
description: 'Version tag of llama-cpp-python to build: v0.2.9'
8-
default: 'v0.2.9'
7+
description: 'Version tag of llama-cpp-python to build: v0.2.11'
8+
default: 'v0.2.11'
99
required: true
1010
type: string
1111
config:
@@ -21,8 +21,8 @@ on:
2121
workflow_call:
2222
inputs:
2323
version:
24-
description: 'Version tag of llama-cpp-python to build: v0.2.9'
25-
default: 'v0.2.9'
24+
description: 'Version tag of llama-cpp-python to build: v0.2.11'
25+
default: 'v0.2.11'
2626
required: true
2727
type: string
2828
config:
@@ -60,6 +60,7 @@ jobs:
6060
'os' = 'ubuntu-20.04', 'windows-latest'
6161
'pyver' = "3.10", "3.8", "3.9", "3.11"
6262
'rocm' = '5.4.2', '5.5', '5.5.1', '5.6.1'
63+
'avx' = "AVX", "AVX2", "basic"
6364
'rename' = '0', '1'
6465
'exclude' = @(
6566
@{'os' = 'windows-latest';'rocm' = '5.4.2'},
@@ -81,7 +82,7 @@ jobs:
8182
Write-Output ('matrix=' + $matrixOut) >> $env:GITHUB_OUTPUT
8283
8384
build_wheels:
84-
name: Build ${{ matrix.os }} ROCm ${{ matrix.rocm }} ${{ matrix.rename == '1' && 'Textgen Wheel' || 'Wheel' }} ${{ matrix.pyver }}
85+
name: Build ${{ matrix.os }} ${{ matrix.avx }} ROCm ${{ matrix.rocm }} ${{ matrix.rename == '1' && 'Textgen Wheel' || 'Wheel' }} ${{ matrix.pyver }}
8586
needs: define_matrix
8687
runs-on: ${{ matrix.os }}
8788
strategy:
@@ -92,6 +93,7 @@ jobs:
9293
env:
9394
PCKGVER: ${{ inputs.version }}
9495
ROCM_VERSION: ${{ matrix.rocm }}
96+
AVXVER: ${{ matrix.avx }}
9597

9698
steps:
9799
- name: Free Disk Space
@@ -190,10 +192,19 @@ jobs:
190192
}
191193
$env:VERBOSE = '1'
192194
$packageVersion = [version]$env:PCKGVER.TrimStart('v')
195+
193196
$gputargets = 'gfx803;gfx900;gfx906:xnack-;gfx908:xnack-;gfx90a:xnack+;gfx90a:xnack-;gfx1010;gfx1012;gfx1030;gfx1100;gfx1101;gfx1102'
194197
if ([version]$env:ROCM_VERSION -lt [version]'5.5') {$gputargets = 'gfx803;gfx900;gfx906:xnack-;gfx908:xnack-;gfx90a:xnack+;gfx90a:xnack-;gfx1010;gfx1012;gfx1030'}
195-
$env:CMAKE_ARGS = "-GNinja -DLLAMA_HIPBLAS=ON -DGPU_TARGETS=$gputargets"
196-
$buildtag = "+rocm$env:ROCM_VERSION"
198+
199+
if ($env:AVXVER -eq 'AVX') {$env:CMAKE_ARGS = "-GNinja -DLLAMA_HIPBLAS=ON -DLLAMA_AVX2=off -DLLAMA_FMA=off -DLLAMA_F16C=off -DGPU_TARGETS=$gputargets"}
200+
if ($env:AVXVER -eq 'AVX512') {$env:CMAKE_ARGS = "-GNinja -DLLAMA_HIPBLAS=ON -DLLAMA_AVX512=on -DGPU_TARGETS=$gputargets"}
201+
if ($env:AVXVER -eq 'basic') {$env:CMAKE_ARGS = "-GNinja -DLLAMA_HIPBLAS=ON -DLLAMA_AVX=off -DLLAMA_AVX2=off -DLLAMA_FMA=off -DLLAMA_F16C=off -DGPU_TARGETS=$gputargets"}
202+
if ($env:AVXVER -eq 'AVX2')
203+
{
204+
$env:CMAKE_ARGS = "-GNinja -DLLAMA_HIPBLAS=ON -DGPU_TARGETS=$gputargets"
205+
$buildtag = "+rocm$env:ROCM_VERSION"
206+
} else {$buildtag = "+rocm$env:ROCM_VERSION$env:AVXVER"}
207+
197208
if ($packageVersion -lt [version]'0.2.0') {
198209
python -m build --wheel -C--build-option=egg_info "-C--build-option=--tag-build=$buildtag"
199210
} else {

0 commit comments

Comments
 (0)