Skip to content

Update GH actions to 6.4, set GPU_TARGETS (#239) #87

Update GH actions to 6.4, set GPU_TARGETS (#239)

Update GH actions to 6.4, set GPU_TARGETS (#239) #87

name: Build Libraries CUDA
on:
push:
branches: [ amd-staging, amd-mainline, release/** ]
paths:
- 'Libraries/**'
- '.github/workflows/**'
pull_request:
branches: [ amd-staging, amd-mainline, release/** ]
paths:
- 'Libraries/**'
- '.github/workflows/**'
env:
ROCM_VERSION: 6.4
AMDGPU_INSTALLER_VERSION: 6.4.60400-1
jobs:
build:
name: "Build Libraries with CUDA"
runs-on: self-hosted
container:
image: nvidia/cuda:12.6.3-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 cuda 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
# Clean the workspace here since other jobs may not have the permissions to do so later
# (needed for self-hosted runners)
- name: Clean the workspace
run: find $GITHUB_WORKSPACE -mindepth 1 -delete