Update hipDNN conv backward examples (#468) #933
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 Libraries VS | |
| on: | |
| push: | |
| branches: [ amd-staging, amd-mainline, release/** ] | |
| paths: | |
| - 'Libraries/**' | |
| - '.github/workflows/**' | |
| - 'Scripts/VisualStudio/**' | |
| pull_request: | |
| branches: [ amd-staging, amd-mainline, release/** ] | |
| paths: | |
| - 'Libraries/**' | |
| - '.github/workflows/**' | |
| - 'Scripts/VisualStudio/**' | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event.number || github.sha }} | |
| cancel-in-progress: true | |
| env: | |
| HIPSDK_INSTALLER_VERSION: 25.Q3 | |
| jobs: | |
| build: | |
| name: "Build Libraries VS" | |
| strategy: | |
| matrix: | |
| config: [Debug, Release] | |
| vsversion: [2017, 2019, 2022] | |
| runs-on: windows-2022 | |
| 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 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 }}-Win10-Win11-For-HIP.exe" | |
| Invoke-WebRequest -Uri https://download.amd.com/developer/eula/rocm-hub/AMD-Software-PRO-Edition-${{ env.HIPSDK_INSTALLER_VERSION }}-Win10-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" | |
| $hip_path = [System.Environment]::GetEnvironmentVariable('HIP_PATH', 'Machine') | |
| if (Test-Path -Path "$hip_path") { | |
| Write-Host "HIP_PATH directory exists: $hip_path" | |
| Write-Host "HIP SDK installed successfully" | |
| } else { | |
| Write-Host "HIP_PATH directory DOES NOT exist: $hip_path" | |
| Write-Host "HIP SDK installation failed" | |
| Exit 1 | |
| } | |
| $version = (Split-Path $hip_path -Leaf) | |
| Write-Host "Detected HIP SDK version: $version" | |
| echo "HIP_PATH=$hip_path" >> $env:GITHUB_ENV | |
| echo "PLATFORM_TOOLSET_VERSION=$version" >> $env:GITHUB_ENV | |
| - name: Apply patch | |
| run: | | |
| Write-Host "Applying patches $(Get-ChildItem -File Scripts\VisualStudio\0002-Revert-Rename-hipblas-dll-for-HIP-SDK-7.1.patch)" | |
| git apply (Get-ChildItem -File Scripts\VisualStudio\0002-Revert-Rename-hipblas-dll-for-HIP-SDK-7.1.patch).FullName | |
| Write-Host "Patches applied. Showing diff" | |
| git diff | |
| - name: Build ${{ matrix.config }} x64 ${{ matrix.vsversion }} | |
| run: | | |
| Write-Host "Replace toolset $((Get-ChildItem -Recurse -File | Get-Content | Select-String -Pattern 'HIP clang .\..' | Select-Object -First 1).Matches.Value) with HIP clang ${{ 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 clang ${{ env.PLATFORM_TOOLSET_VERSION }}" | Set-Content -Path $_.FullName | |
| } | |
| msbuild Scripts\VisualStudio\build.proj -maxCpuCount -detailedSummary -property:"Category=Libraries;Configuration=${{ matrix.config }};Platform=x64;VSVersion=${{ matrix.vsversion }}" -target:"Build" | |
| Write-Host "msbuild returned: $LastExitCode" | |
| Exit $LastExitCode |