-
Notifications
You must be signed in to change notification settings - Fork 52
92 lines (79 loc) · 2.86 KB
/
build_libraries_cuda.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
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.3
AMDGPU_INSTALLER_VERSION: 6.3.60303-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