Added CI for CUDA backends #1
Workflow file for this run
This file contains 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 CUDA | |
on: | |
push: | |
branches: [ develop, release/** ] | |
paths: | |
- 'Libraries/**' | |
- '.github/workflows/**' | |
pull_request: | |
branches: [ develop, release/** ] | |
paths: | |
- 'Libraries/**' | |
- '.github/workflows/**' | |
env: | |
ROCM_VERSION: 6.3 | |
AMDGPU_INSTALLER_VERSION: 6.3.60300-1 | |
jobs: | |
build: | |
name: "Build Libraries with CUDA" | |
runs-on: ubuntu-latest | |
container: | |
image: nvidia/cuda:12.8.0-cudnn-devel-ubuntu22.04 | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v4 | |
- name: Install System Dependencies | |
run: | | |
apt-get update -qq && | |
apt-get install -y build-essential g++ glslang-tools python3 python3-pip libglfw3-dev libvulkan-dev locales wget git | |
python3 -m pip install --upgrade pip | |
python3 -m pip install cmake | |
- name: Install Hip for CUDA | |
run: | | |
export DEBIAN_FRONTEND=noninteractive | |
wget https://repo.radeon.com/amdgpu-install/${{ env.ROCM_VERSION }}/ubuntu/jammy/amdgpu-install_${{ env.AMDGPU_INSTALLER_VERSION }}_all.deb | |
apt-get -y install ./amdgpu-install_${{ env.AMDGPU_INSTALLER_VERSION }}_all.deb && | |
apt-get update -qq && | |
apt-get install -y hip-runtime-nvidia hip-dev | |
- name: Build and install hipCUB | |
run: | | |
mkdir tmp && cd tmp | |
git clone https://github.com/ROCm/hipCUB.git | |
cd hipCUB; mkdir build; cd build | |
HIP_PLATFORM=nvidia cmake -DCMAKE_CXX_COMPILER=nvcc .. | |
make -j4 | |
make install | |
cd ../ && rm -rf tmp | |
- name: Build hipCUB example | |
shell: bash | |
run: | | |
cd Libraries/hipCUB | |
make GPU_RUNTIME=CUDA -j4 | |
- name: Build and install hipFFT | |
run: | | |
mkdir tmp && cd tmp | |
git clone https://github.com/ROCm/hipFFT.git | |
cd hipFFT; mkdir build; cd build | |
HIP_PLATFORM=nvidia ROCM_PATH=/opt/rocm cmake -LH -DBUILD_WITH_LIB=cuda .. | |
make -j4 | |
make install | |
cd ../ && rm -rf tmp | |
- name: Build hipFFT example | |
shell: bash | |
run: | | |
cd Libraries/hipFFT | |
make GPU_RUNTIME=CUDA -j4 | |
- name: Build and install rocRAND | |
run: | | |
mkdir tmp && cd tmp | |
git clone https://github.com/ROCm/rocRAND.git | |
cd rocRAND; mkdir build; cd build | |
HIP_PLATFORM=nvidia CXX=g++ cmake -DCMAKE_CUDA_COMPILER=/usr/local/cuda/bin/nvcc -DCMAKE_PREFIX_PATH=/opt/rocm -DCMAKE_MODULE_PATH=/opt/rocm/hip/cmake -DHIP_CUDA_lowest_cc=60 .. | |
make -j4 | |
make install | |
cd ../ && rm -rf tmp | |
- name: Build rocRAND example | |
shell: bash | |
run: | | |
cd Libraries/rocRAND | |
make GPU_RUNTIME=CUDA -j4 | |