Skip to content

[pre-commit.ci] pre-commit autoupdate #372

[pre-commit.ci] pre-commit autoupdate

[pre-commit.ci] pre-commit autoupdate #372

Workflow file for this run

name: build
on:
push:
workflow_dispatch:
jobs:
linting:
name: run
runs-on: ubuntu-22.04
env:
cuda-version: "12.2.0"
hip-version: "6.1.3"
amdgpu-version: "6.1.60103-1_all"
steps:
- name: Check out a copy of the repository
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Show some relevant env vars
run: |
echo "GITHUB_BASE_REF = $GITHUB_BASE_REF"
echo "GITHUB_HEAD_REF = $GITHUB_HEAD_REF"
echo "GITHUB_REF_NAME = $GITHUB_REF_NAME"
- name: Install cuda
uses: Jimver/[email protected]
with:
cuda: ${{ env.cuda-version }}
method: "network"
sub-packages: '["runtime", "nvcc", "nvml-dev", "nvrtc-dev", "nvtx"]'
non-cuda-sub-packages: '["libcufft-dev"]'
linux-local-args: '["--toolkit"]'
- name: Install ROCm and HIP
shell: bash -el {0}
run: |
wget https://repo.radeon.com/amdgpu-install/${{ env.hip-version }}/ubuntu/jammy/amdgpu-install_${{ env.amdgpu-version }}.deb
sudo apt -y install ./amdgpu-install_${{ env.amdgpu-version }}.deb
sudo apt update
sudo apt -y install rocm-hip-runtime-dev hipfft-dev
- name: Show tool versions
run: |
echo "nvcc: $(nvcc --version)"
echo "hipcc: $(/opt/rocm/bin/hipcc --version)"
echo "g++: $(g++ --version)"
echo "cmake: $(cmake --version)"
- name: Build the code in CUDA mode
shell: bash -el {0}
run: |
cmake -DCUDAWRAPPERS_BUILD_TESTING=True -S . -B build
make -C build -j
- name: Build the code in HIP mode
shell: bash -el {0}
run: |
cmake -DCUDAWRAPPERS_BUILD_TESTING=True -DCUDAWRAPPERS_BACKEND=HIP -DAMDGPU_TARGETS=gfx1101 -S . -B build
make -C build -j