Skip to content

Commit

Permalink
feat: Add build release for rocm on windows/ linux
Browse files Browse the repository at this point in the history
  • Loading branch information
hiro-v committed Jun 19, 2024
1 parent b2d06b4 commit 483decf
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,23 @@ jobs:
vulkan: false
sccache: true
sccache-conf-path: 'C:\sccache.conf'
- os: "windows"
name: "amd64-avx2-rocm"
runs-on: "windows-2019" # windows-amd
cmake-flags: -DLLAMA_NATIVE=OFF -DLLAMA_BUILD_SERVER=ON -DBUILD_SHARED_LIBS=OFF -DCMAKE_BUILD_TYPE=RELEASE -DCMAKE_C_COMPILER="${env:HIP_PATH}\bin\clang.exe" -DCMAKE_CXX_COMPILER="${env:HIP_PATH}\bin\clang++.exe" -DLLAMA_HIPBLAS=ON
run-e2e: false
vulkan: false
rocm: true
sccache: true
sccache-conf-path: 'C:\sccache.conf'
- os: "linux"
name: "amd64-avx2-rocm"
runs-on: "ubuntu-18-04"
cmake-flags: -DLLAMA_NATIVE=OFF -DLLAMA_BUILD_SERVER=ON -DBUILD_SHARED_LIBS=OFF -DCMAKE_BUILD_TYPE=RELEASE -DCMAKE_HIP_COMPILER="$(hipconfig -l)/clang" -DLLAMA_HIPBLAS=ON
run-e2e: false
vulkan: false
sccache: true
sccache-conf-path: 'C:\sccache.conf'

steps:
- name: Clone
Expand All @@ -261,6 +278,27 @@ jobs:
echo 'server_side_encryption = false' >> ${{ matrix.sccache-conf-path }}
echo 'no_credentials = false' >> ${{ matrix.sccache-conf-path }}
- name: Install HIP SDK and ROCM - Windows
if: ${{ matrix.rocm }} && runner.os == 'Windows'
run: |
$ErrorActionPreference = "Stop"
write-host "Downloading AMD HIP SDK Installer"
Invoke-WebRequest -Uri "https://download.amd.com/developer/eula/rocm-hub/AMD-Software-PRO-Edition-23.Q4-WinSvr2022-For-HIP.exe" -OutFile "${env:RUNNER_TEMP}\rocm-install.exe"
write-host "Installing AMD HIP SDK"
Start-Process "${env:RUNNER_TEMP}\rocm-install.exe" -ArgumentList '-install' -NoNewWindow -Wait
write-host "Completed AMD HIP SDK installation"
& 'C:\Program Files\AMD\ROCm\*\bin\clang.exe' --version
$env:HIP_PATH=$(Resolve-Path 'C:\Program Files\AMD\ROCm\*\bin\clang.exe' | split-path | split-path)
$env:CMAKE_PREFIX_PATH="${env:HIP_PATH}"
- name: Install HIP SDK and ROCM - Linux
if: ${{ matrix.rocm }} && runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install -y build-essential git cmake rocblas-dev hipblas-dev
- name: Get Cer for code signing
if: runner.os == 'macOS'
run: base64 -d <<< "$CODE_SIGN_P12_BASE64" > /tmp/codesign.p12
Expand Down

0 comments on commit 483decf

Please sign in to comment.