Skip to content

Commit 33559d8

Browse files
authored
Update build.yml windows-latest-cmake-hip-release-gfx1100-gfx1101-gfx1102-gfx1030-gfx906
windows-latest-cmake-hip-release-gfx1100-gfx1101-gfx1102-gfx1030-gfx906
1 parent 4e59a1d commit 33559d8

File tree

1 file changed

+66
-1
lines changed

1 file changed

+66
-1
lines changed

.github/workflows/build.yml

+66-1
Original file line numberDiff line numberDiff line change
@@ -1010,7 +1010,7 @@ jobs:
10101010

10111011
strategy:
10121012
matrix:
1013-
gpu_target: [gfx1100, gfx1101, gfx1030, '"gfx1100;gfx1101;gfx1102;gfx1030;gfx906"']
1013+
gpu_target: [gfx1100, gfx1101, gfx1030]
10141014

10151015
steps:
10161016
- name: Clone
@@ -1068,6 +1068,70 @@ jobs:
10681068
path: llama-${{ steps.tag.outputs.name }}-bin-win-hip-x64-${{ matrix.gpu_target }}.zip
10691069
name: llama-bin-win-hip-x64-${{ matrix.gpu_target }}.zip
10701070

1071+
windows-latest-cmake-hip-release-gfx1100-gfx1101-gfx1102-gfx1030-gfx906:
1072+
if: ${{ ( github.event_name == 'push' && github.ref == 'refs/heads/master' ) || github.event.inputs.create_release == 'true' }}
1073+
runs-on: windows-latest
1074+
1075+
strategy:
1076+
matrix:
1077+
gpu_target: [gfx1100-gfx1101-gfx1102-gfx1030-gfx906]
1078+
1079+
steps:
1080+
- name: Clone
1081+
id: checkout
1082+
uses: actions/checkout@v4
1083+
1084+
- name: Install
1085+
id: depends
1086+
run: |
1087+
$ErrorActionPreference = "Stop"
1088+
write-host "Downloading AMD HIP SDK Installer"
1089+
Invoke-WebRequest -Uri "https://download.amd.com/developer/eula/rocm-hub/AMD-Software-PRO-Edition-24.Q3-WinSvr2022-For-HIP.exe" -OutFile "${env:RUNNER_TEMP}\rocm-install.exe"
1090+
write-host "Installing AMD HIP SDK"
1091+
Start-Process "${env:RUNNER_TEMP}\rocm-install.exe" -ArgumentList '-install' -NoNewWindow -Wait
1092+
write-host "Completed AMD HIP SDK installation"
1093+
1094+
- name: Verify ROCm
1095+
id: verify
1096+
run: |
1097+
& 'C:\Program Files\AMD\ROCm\*\bin\clang.exe' --version
1098+
1099+
- name: Build
1100+
id: cmake_build
1101+
run: |
1102+
$env:HIP_PATH=$(Resolve-Path 'C:\Program Files\AMD\ROCm\*\bin\clang.exe' | split-path | split-path)
1103+
$env:CMAKE_PREFIX_PATH="${env:HIP_PATH}"
1104+
cmake -G "Unix Makefiles" -B build -S . -DCMAKE_C_COMPILER="${env:HIP_PATH}\bin\clang.exe" -DCMAKE_CXX_COMPILER="${env:HIP_PATH}\bin\clang++.exe" -DGGML_HIPBLAS=ON -DCMAKE_BUILD_TYPE=Release -DAMDGPU_TARGETS="gfx1100;gfx1101;gfx1102;gfx1030;gfx906" -DGGML_RPC=ON
1105+
cmake --build build -j ${env:NUMBER_OF_PROCESSORS}
1106+
md "build\bin\rocblas\library\"
1107+
cp "${env:HIP_PATH}\bin\hipblas.dll" "build\bin\"
1108+
cp "${env:HIP_PATH}\bin\rocblas.dll" "build\bin\"
1109+
cp "${env:HIP_PATH}\bin\rocblas\library\*" "build\bin\rocblas\library\"
1110+
1111+
- name: Determine tag name
1112+
id: tag
1113+
shell: bash
1114+
run: |
1115+
BUILD_NUMBER="$(git rev-list --count HEAD)"
1116+
SHORT_HASH="$(git rev-parse --short=7 HEAD)"
1117+
if [[ "${{ env.BRANCH_NAME }}" == "master" ]]; then
1118+
echo "name=b${BUILD_NUMBER}" >> $GITHUB_OUTPUT
1119+
else
1120+
SAFE_NAME=$(echo "${{ env.BRANCH_NAME }}" | tr '/' '-')
1121+
echo "name=${SAFE_NAME}-b${BUILD_NUMBER}-${SHORT_HASH}" >> $GITHUB_OUTPUT
1122+
fi
1123+
1124+
- name: Pack artifacts
1125+
id: pack_artifacts
1126+
run: |
1127+
7z a llama-${{ steps.tag.outputs.name }}-bin-win-hip-x64-${{ matrix.gpu_target }}.zip .\build\bin\*
1128+
1129+
- name: Upload artifacts
1130+
uses: actions/upload-artifact@v4
1131+
with:
1132+
path: llama-${{ steps.tag.outputs.name }}-bin-win-hip-x64-${{ matrix.gpu_target }}.zip
1133+
name: llama-bin-win-hip-x64-${{ matrix.gpu_target }}.zip
1134+
10711135
ios-xcode-build:
10721136
runs-on: macos-latest
10731137

@@ -1132,6 +1196,7 @@ jobs:
11321196
- windows-latest-cmake
11331197
- windows-latest-cmake-cuda
11341198
- windows-latest-cmake-hip-release
1199+
- windows-latest-cmake-hip-release-gfx1100-gfx1101-gfx1102-gfx1030-gfx906
11351200
- macOS-latest-cmake-arm64
11361201
- macOS-latest-cmake-x64
11371202

0 commit comments

Comments
 (0)