Add lane masks bit-shift example, update to CUDA 12.9.1 and HIP SDK 7.1 #606
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Build HIP nvcc Portable Solution | |
| on: | |
| push: | |
| branches: [ amd-staging, amd-mainline, release/** ] | |
| paths: | |
| - 'Applications/**' | |
| - 'HIP-Basic/**' | |
| - 'HIP-Doc/**' | |
| - 'Libraries/hip**' | |
| - 'Programming-Guide/**' | |
| - '.github/workflows/**' | |
| - 'Scripts/VisualStudio/**' | |
| pull_request: | |
| branches: [ amd-staging, amd-mainline, release/** ] | |
| paths: | |
| - 'Applications/**' | |
| - 'HIP-Basic/**' | |
| - 'HIP-Doc/**' | |
| - 'Libraries/hip**' | |
| - 'Programming-Guide/**' | |
| - '.github/workflows/**' | |
| - 'Scripts/VisualStudio/**' | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event.number || github.sha }} | |
| cancel-in-progress: true | |
| env: | |
| PLATFORM_TOOLSET_VERSION: 7.1 | |
| HIP_PATH: C:\Program Files\AMD\ROCm\7.1\ | |
| HIPSDK_INSTALLER_VERSION: 26.Q1 | |
| CUDA_VERSION: 12.9.1 | |
| CUDA_INSTALLER_VERSION: 576.57 | |
| CUDA_PATH: C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.9 | |
| GLFW_DIR: C:\glfw-3.4.bin.WIN64\ | |
| VULKAN_SDK: C:\VulkanSDK\1.4.313.2\ | |
| jobs: | |
| build: | |
| name: "Build HIP nvcc Portable Solution" | |
| strategy: | |
| matrix: | |
| config: [Debug, Release] | |
| runs-on: windows-2025 | |
| defaults: | |
| run: | |
| shell: pwsh | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: microsoft/setup-msbuild@v2 | |
| - name: Install Python dependencies | |
| run: | | |
| python3 -m pip install rich | |
| - name: Check GUID | |
| run: | | |
| python3 Scripts/VisualStudio/check_vs_files.py | |
| - name: Install additional dependencies | |
| run: | | |
| $ProgressPreference = 'SilentlyContinue' | |
| Write-Host "Downloading GLFW 3.4" | |
| Invoke-WebRequest -Uri https://github.com/glfw/glfw/releases/download/3.4/glfw-3.4.bin.WIN64.zip -OutFile glfw-3.4.bin.WIN64.zip | |
| Expand-Archive -Path glfw-3.4.bin.WIN64.zip -DestinationPath C:\ -PassThru | |
| Write-Host "Downloading Vulkan SDK 1.4.313.2" | |
| Invoke-WebRequest -Uri https://sdk.lunarg.com/sdk/download/1.4.313.2/windows/vulkansdk-windows-X64-1.4.313.2.exe -OutFile vulkansdk-windows-X64-1.4.313.2.exe | |
| Write-Host "Installing Vulkan SDK" | |
| Start-Process vulkansdk-windows-X64-1.4.313.2.exe -ArgumentList '--accept-licenses','--default-answer','--confirm-command','install' -NoNewWindow -Wait | |
| - name: Install CUDA Toolkit | |
| run: | | |
| $ProgressPreference = 'SilentlyContinue' | |
| Write-Host "Downloading installer https://developer.download.nvidia.com/compute/cuda/${{ env.CUDA_VERSION }}/local_installers/cuda_${{ env.CUDA_VERSION }}_${{ env.CUDA_INSTALLER_VERSION }}_windows.exe" | |
| Invoke-WebRequest -Uri https://developer.download.nvidia.com/compute/cuda/${{ env.CUDA_VERSION }}/local_installers/cuda_${{ env.CUDA_VERSION }}_${{ env.CUDA_INSTALLER_VERSION }}_windows.exe -OutFile CUDAToolkit.exe | |
| Write-Host "Installing CUDA Toolkit" | |
| Start-Process CUDAToolkit.exe -ArgumentList '-s cuda_profiler_api_12.9 cudart_12.9 nvcc_12.9 nvrtc_dev_12.9 cublas_dev_12.9 cufft_dev_12.9 curand_dev_12.9 cusolver_dev_12.9 cusparse_dev_12.9 visual_studio_integration_12.9','-n' -NoNewWindow -Wait | |
| if (Test-Path -Path "${{ env.CUDA_PATH }}") { | |
| Write-Host "CUDA_PATH directory exists: ${{ env.CUDA_PATH }}" | |
| Write-Host "CUDA Toolkit installed successfully" | |
| } else { | |
| Write-Host "CUDA_PATH directory DOES NOT exist: ${{ env.CUDA_PATH }}" | |
| Write-Host "CUDA Toolkit installation failed" | |
| Exit 1 | |
| } | |
| - name: Install HIP SDK | |
| run: | | |
| $ProgressPreference = 'SilentlyContinue' | |
| Write-Host "Downloading installer https://download.amd.com/developer/eula/rocm-hub/AMD-Software-PRO-Edition-${{ env.HIPSDK_INSTALLER_VERSION }}-Win11-For-HIP.exe" | |
| Invoke-WebRequest -Uri https://download.amd.com/developer/eula/rocm-hub/AMD-Software-PRO-Edition-${{ env.HIPSDK_INSTALLER_VERSION }}-Win11-For-HIP.exe -OutFile HIPSDK.exe | |
| Write-Host "Installing HIP SDK" | |
| Start-Process HIPSDK.exe -ArgumentList '-install','-log',"$((Get-Location).Path)\installer_log.txt" -NoNewWindow -Wait | |
| Write-Host "Installer log:" | |
| Get-Content "installer_log.txt" | |
| if (Test-Path -Path "${{ env.HIP_PATH }}") { | |
| Write-Host "HIP_PATH directory exists: ${{ env.HIP_PATH }}" | |
| Write-Host "HIP SDK installed successfully" | |
| } else { | |
| Write-Host "HIP_PATH directory DOES NOT exist: ${{ env.HIP_PATH }}" | |
| Write-Host "HIP SDK installation failed" | |
| Exit 1 | |
| } | |
| - name: Apply patch | |
| run: | | |
| Write-Host "Applying patches $(Get-ChildItem -File Scripts\VisualStudio\*.patch)" | |
| git apply (Get-ChildItem -File Scripts\VisualStudio\*.patch).FullName | |
| Write-Host "Patches applied. Showing diff" | |
| git diff | |
| - name: Build HIP nvcc ${{ matrix.config }} x64 | |
| run: | | |
| Write-Host "Replace toolset $((Get-ChildItem -Recurse -File | Get-Content | Select-String -Pattern 'HIP clang .\..' | Select-Object -First 1).Matches.Value) with HIP nvcc ${{ env.PLATFORM_TOOLSET_VERSION }}" | |
| Get-ChildItem -Recurse -File | Where-Object { Select-String -Pattern 'HIP clang .\..' -Path $_ } | ForEach-Object { | |
| (Get-Content -Path $_.FullName) -replace 'HIP clang .\..', "HIP nvcc ${{ env.PLATFORM_TOOLSET_VERSION }}" | Set-Content -Path $_.FullName | |
| } | |
| msbuild ROCm-Examples-Portable-VS2022.sln -maxCpuCount -detailedSummary -property:"Configuration=${{ matrix.config }};Platform=x64" | |
| Write-Host "msbuild returned: $LastExitCode" | |
| Exit $LastExitCode |