Skip to content

Commit f600eff

Browse files
committed
Convert Windows ROCm job to use tarball distribution
- Update from HIPSDK 25.Q3 to ROCm 7.11.0 tarball format - Download gfx1151 tarball from AMD repository instead of using EXE installer - Configure environment variables for extracted ROCm installation - Update GPU_TARGETS to match Linux job (7.11.0 targets) - Cache extracted tarball directory instead of installer directory - Simplify installation by removing EXE installer verification step - Align Windows and Linux ROCm build configurations
1 parent e212912 commit f600eff

File tree

1 file changed

+20
-31
lines changed

1 file changed

+20
-31
lines changed

.github/workflows/build.yml

Lines changed: 20 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -391,8 +391,8 @@ jobs:
391391
runs-on: windows-2022
392392

393393
env:
394-
HIPSDK_INSTALLER_VERSION: "25.Q3"
395-
GPU_TARGETS: "gfx1151;gfx1200;gfx1201;gfx1100;gfx1101;gfx1102;gfx1030;gfx1031;gfx1032"
394+
ROCM_VERSION: "7.11.0"
395+
GPU_TARGETS: "gfx906;gfx908;gfx90a;gfx942;gfx950;gfx1100;gfx1101;gfx1102;gfx1150;gfx1151;gfx1152;gfx1200;gfx1201"
396396

397397
steps:
398398
- uses: actions/checkout@v3
@@ -403,46 +403,35 @@ jobs:
403403
id: cache-rocm
404404
uses: actions/cache@v4
405405
with:
406-
path: C:\Program Files\AMD\ROCm
407-
key: rocm-${{ env.HIPSDK_INSTALLER_VERSION }}-${{ runner.os }}
406+
path: C:\TheRock\build
407+
key: rocm-${{ env.ROCM_VERSION }}-gfx1151-${{ runner.os }}
408408

409409
- name: ccache
410410
uses: ggml-org/ccache-action@v1.2.16
411411
with:
412-
key: windows-latest-cmake-hip-${{ env.HIPSDK_INSTALLER_VERSION }}-x64
412+
key: windows-latest-cmake-hip-${{ env.ROCM_VERSION }}-x64
413413
evict-old-files: 1d
414414

415415
- name: Install ROCm
416416
if: steps.cache-rocm.outputs.cache-hit != 'true'
417417
run: |
418418
$ErrorActionPreference = "Stop"
419-
write-host "Downloading AMD HIP SDK Installer"
420-
Invoke-WebRequest -Uri "https://download.amd.com/developer/eula/rocm-hub/AMD-Software-PRO-Edition-${{ env.HIPSDK_INSTALLER_VERSION }}-WinSvr2022-For-HIP.exe" -OutFile "${env:RUNNER_TEMP}\rocm-install.exe"
421-
write-host "Installing AMD HIP SDK"
422-
$proc = Start-Process "${env:RUNNER_TEMP}\rocm-install.exe" -ArgumentList '-install' -NoNewWindow -PassThru
423-
$completed = $proc.WaitForExit(600000)
424-
if (-not $completed) {
425-
Write-Error "ROCm installation timed out after 10 minutes. Killing the process"
426-
$proc.Kill()
427-
exit 1
428-
}
429-
if ($proc.ExitCode -ne 0) {
430-
Write-Error "ROCm installation failed with exit code $($proc.ExitCode)"
431-
exit 1
432-
}
433-
write-host "Completed AMD HIP SDK installation"
434-
435-
- name: Verify ROCm
419+
write-host "Downloading AMD ROCm ${{ env.ROCM_VERSION }} tarball"
420+
Invoke-WebRequest -Uri "https://repo.amd.com/rocm/tarball/therock-dist-windows-gfx1151-${{ env.ROCM_VERSION }}.tar.gz" -OutFile "${env:RUNNER_TEMP}\rocm.tar.gz"
421+
write-host "Extracting ROCm tarball"
422+
mkdir C:\TheRock\build -Force
423+
tar -xzf "${env:RUNNER_TEMP}\rocm.tar.gz" -C C:\TheRock\build
424+
write-host "Completed ROCm extraction"
425+
426+
- name: Setup ROCm Environment
436427
run: |
437-
# Find and test ROCm installation
438-
$clangPath = Get-ChildItem 'C:\Program Files\AMD\ROCm\*\bin\clang.exe' | Select-Object -First 1
439-
if (-not $clangPath) {
440-
Write-Error "ROCm installation not found"
441-
exit 1
442-
}
443-
& $clangPath.FullName --version
444-
# Set HIP_PATH environment variable for later steps
445-
echo "HIP_PATH=$(Resolve-Path 'C:\Program Files\AMD\ROCm\*\bin\clang.exe' | split-path | split-path)" >> $env:GITHUB_ENV
428+
$rocmPath = "C:\TheRock\build"
429+
echo "HIP_PATH=$rocmPath" >> $env:GITHUB_ENV
430+
echo "HIP_DEVICE_LIB_PATH=$rocmPath\lib\llvm\amdgcn\bitcode" >> $env:GITHUB_ENV
431+
echo "HIP_PLATFORM=amd" >> $env:GITHUB_ENV
432+
echo "LLVM_PATH=$rocmPath\lib\llvm" >> $env:GITHUB_ENV
433+
echo "$rocmPath\bin" >> $env:GITHUB_PATH
434+
echo "$rocmPath\lib\llvm\bin" >> $env:GITHUB_PATH
446435
447436
- name: Build
448437
run: |

0 commit comments

Comments
 (0)