-
Notifications
You must be signed in to change notification settings - Fork 0
/
08.rocrand.sh
executable file
·38 lines (28 loc) · 1005 Bytes
/
08.rocrand.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
36
37
#!/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/rocRAND $ROCM_TMP_DIR/rocrand
git clone -b rocm-$ROCM_VERSION --depth 1 https://github.com/ROCm/hipRAND $ROCM_TMP_DIR/hiprand
source $HOME/softwares/init/bash
module load rocm/$ROCM_VERSION
pushd $ROCM_TMP_DIR/rocrand
git submodule update --init
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
cmake --build build
cmake --build build -t install
popd
# https://github.com/ROCm/hipRAND/wiki/Build
pushd $ROCM_TMP_DIR/hiprand
rm -rf build
cmake -S . -B build -G Ninja \
-DROCM_PATH=$ROCM_INSTALL_PREFIX \
-DCMAKE_CXX_COMPILER=$ROCM_INSTALL_PREFIX/bin/hipcc \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=$ROCM_INSTALL_PREFIX
cmake --build build
cmake --build build -t install
popd