-
Notifications
You must be signed in to change notification settings - Fork 0
/
07.rocthrust.sh
executable file
·35 lines (29 loc) · 1.01 KB
/
07.rocthrust.sh
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
#!/bin/bash
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
source $SCRIPT_DIR/common.sh
git clone -b rocm-$ROCM_VERSION --depth 1 https://github.com/ROCm/rocPRIM $ROCM_TMP_DIR/rocPRIM
git clone -b rocm-$ROCM_VERSION --depth 1 https://github.com/ROCm/rocThrust $ROCM_TMP_DIR/rocThrust
source $HOME/softwares/init/bash
module load rocm/$ROCM_VERSION
pushd $ROCM_TMP_DIR/rocPRIM
rm -rf build
cmake -S . -B build -G "Ninja" \
-DCMAKE_CXX_COMPILER=$ROCM_INSTALL_PREFIX/bin/hipcc \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=$ROCM_INSTALL_PREFIX \
-DAMDGPU_TARGETS=$ROCM_GPU_ARCH
cmake --build build
cmake --build build -t install
popd
pushd $ROCM_TMP_DIR/rocThrust
rm -rf build
cmake -S . -B build -G "Ninja" -DCMAKE_BUILD_TYPE=Release \
-DCMAKE_CXX_COMPILER=$ROCM_INSTALL_PREFIX/bin/hipcc \
-DCMAKE_INSTALL_PREFIX=$ROCM_INSTALL_PREFIX \
-DROCM_PATH=$ROCM_INSTALL_PREFIX \
-DAMDGPU_TARGETS=$ROCM_GPU_ARCH \
-DBUILD_TEST=OFF
cmake --build build
cmake --build build -t install
popd
module purge