Skip to content

ZLUDA 3.8.4 (#46)

ZLUDA 3.8.4 (#46) #69

Workflow file for this run

name: Rust
on:
push:
branches: [master]
env:
CARGO_TERM_COLOR: always
ROCM_VERSION: "6.1.3"
jobs:
release:
runs-on: ubuntu-latest
outputs:
upload_url: ${{ steps.create_release.outputs.upload_url }}
permissions:
contents: write
pull-requests: write
repository-projects: write
steps:
- name: Create Release
uses: actions/create-release@v1
id: create_release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: rel.${{ github.sha }}
release_name: Generated release
body: |
This release is automatically generated by GitHub Actions.
draft: false
prerelease: true
build_lin:
name: Build and publish (Linux)
runs-on: ubuntu-20.04
needs: release
steps:
- uses: jlumbroso/free-disk-space@main
- name: Install ROCm
run: |
sudo mkdir --parents --mode=0755 /etc/apt/keyrings
sudo sh -c 'wget https://repo.radeon.com/rocm/rocm.gpg.key -O - | gpg --dearmor | tee /etc/apt/keyrings/rocm.gpg > /dev/null'
sudo sh -c 'echo deb [arch=amd64 signed-by=/etc/apt/keyrings/rocm.gpg] https://repo.radeon.com/rocm/apt/${{ env.ROCM_VERSION }} focal main > /etc/apt/sources.list.d/rocm.list'
sudo apt-get update
sudo DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends rocm-smi-lib hip-runtime-amd comgr hipblaslt-dev hipfft-dev rocblas-dev rocsolver-dev rocsparse-dev miopen-hip-dev rocm-device-libs
echo 'export PATH="$PATH:/opt/rocm/bin"' | sudo tee /etc/profile.d/rocm.sh
echo '/opt/rocm/lib' | sudo tee /etc/ld.so.conf.d/rocm.conf
sudo ldconfig
- uses: actions/checkout@v4
with:
submodules: true
- uses: Swatinem/rust-cache@v2
- name: Build
# We use tar to unpack .tar.gz we've created because Github actions/upload-artifact
# is broken and will _always_ zip your artifact (even if it is a single file).
# See here: https://github.com/actions/upload-artifact/issues/39
# and here: https://github.com/actions/upload-artifact/issues/109
run: |
cargo xtask zip -r
tar -xzf target/release/zluda.tar.gz -C target/release
# https://stackoverflow.com/a/64195658
- name: Set revision hash
run: echo "SHORT_SHA=$(git rev-parse --short HEAD)" >> $GITHUB_ENV
- name: Upload (artifact)
uses: actions/upload-artifact@v4
with:
name: zluda-linux-${{ env.SHORT_SHA }}
path: target/release/zluda
- name: Upload (release)
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ needs.release.outputs.upload_url }}
asset_path: target/release/zluda.tar.gz
asset_name: ZLUDA-linux-amd64.tar.gz
asset_content_type: application/gzip
build_win_5:
name: Build and publish (Windows)
runs-on: windows-2019
needs: release
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Install AMD HIP SDK 5.7
run: |
C:\msys64\usr\bin\wget.exe https://download.amd.com/developer/eula/rocm-hub/AMD-Software-PRO-Edition-23.Q4-Win10-Win11-For-HIP.exe -O "amdgpu-install.exe"
.\amdgpu-install.exe -Install -View:1
Start-Sleep -Seconds 60
$setupId = (Get-Process ATISetup).id
Wait-Process -Id $setupId
- uses: Swatinem/rust-cache@v2
- name: Build for ROCm 5.x
run: |
$ROCm_PATH = "C:\Program Files\AMD\ROCm"
$Env:HIP_PATH = "$ROCm_PATH\$(Get-ChildItem -Path $ROCm_PATH -Name)"
$Env:PATH = "$Env:HIP_PATH\bin;$Env:PATH"
$Env:HIP_PATH = "$Env:HIP_PATH\"
cargo xtask zip -r --rocm5
Expand-Archive -Path target/release/zluda.zip -DestinationPath target/release
# https://stackoverflow.com/a/74033027
- name: Set revision hash
run: echo "SHORT_SHA=$("${{ github.sha }}".SubString(0, 7))" >> $env:GITHUB_ENV
- name: Upload (artifact)
uses: actions/upload-artifact@v4
with:
name: zluda-windows-rocm5-${{ env.SHORT_SHA }}
path: target/release/zluda
- name: Upload (release)
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ needs.release.outputs.upload_url }}
asset_path: target/release/zluda.zip
asset_name: ZLUDA-windows-rocm5-amd64.zip
asset_content_type: application/zip
build_win_6:
name: Build and publish (Windows)
runs-on: windows-2019
needs: release
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Install AMD HIP SDK 6.1
run: |
C:\msys64\usr\bin\wget.exe https://download.amd.com/developer/eula/rocm-hub/AMD-Software-PRO-Edition-24.Q3-Win10-Win11-For-HIP.exe -O "amdgpu-install.exe"
.\amdgpu-install.exe -Install -View:1
Start-Sleep -Seconds 60
$setupId = (Get-Process ATISetup).id
Wait-Process -Id $setupId
- uses: Swatinem/rust-cache@v2
- name: Build for ROCm 6.x
run: |
$ROCm_PATH = "C:\Program Files\AMD\ROCm"
$Env:HIP_PATH = "$ROCm_PATH\$(Get-ChildItem -Path $ROCm_PATH -Name)"
$Env:PATH = "$Env:HIP_PATH\bin;$Env:PATH"
$Env:HIP_PATH = "$Env:HIP_PATH\"
cargo xtask zip -r
Expand-Archive -Path target/release/zluda.zip -DestinationPath target/release
# https://stackoverflow.com/a/74033027
- name: Set revision hash
run: echo "SHORT_SHA=$("${{ github.sha }}".SubString(0, 7))" >> $env:GITHUB_ENV
- name: Upload (artifact)
uses: actions/upload-artifact@v4
with:
name: zluda-windows-rocm6-${{ env.SHORT_SHA }}
path: target/release/zluda
- name: Upload (release)
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ needs.release.outputs.upload_url }}
asset_path: target/release/zluda.zip
asset_name: ZLUDA-windows-rocm6-amd64.zip
asset_content_type: application/zip