https://github.com/cwsmith/kokkosrelocatabledevicecode
example of kokkos using CUDA rdc
https://github.com/cwsmith/kokkosrelocatabledevicecode
Last synced: 10 months ago
JSON representation
example of kokkos using CUDA rdc
- Host: GitHub
- URL: https://github.com/cwsmith/kokkosrelocatabledevicecode
- Owner: cwsmith
- License: bsd-3-clause
- Created: 2024-03-11T20:01:47.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-03-11T20:12:30.000Z (over 2 years ago)
- Last Synced: 2025-03-01T00:39:14.593Z (over 1 year ago)
- Language: C++
- Size: 2.93 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# kokkosRelocatableDeviceCode
example of kokkos using CUDA rdc
more info:
https://docs.nvidia.com/cuda/cuda-compiler-driver-nvcc/index.html#nvcc-options-for-separate-compilation
## install kokkos
set `cudaArch` for your GPU
see https://kokkos.org/kokkos-core-wiki/keywords.html#architectures
```
cudaArch="Kokkos_ARCH_AMPERE86"
d=buildKokkosCUDA
cmake -S kokkos -B $d \
-DCMAKE_CXX_COMPILER=g++ \
-DKokkos_ARCH_AMPERE86=ON \
-D${cudaArch}=ON \
-DKokkos_ENABLE_CUDA=on \
-DKokkos_ENABLE_CUDA_LAMBDA=on \
-DBUILD_SHARED_LIBS=OFF \
-DKokkos_ENABLE_CUDA_RELOCATABLE_DEVICE_CODE=ON \
-DKokkos_ENABLE_SERIAL=ON \
-DKokkos_ENABLE_DEBUG=on \
-DKokkos_ENABLE_TESTS=off \
-DCMAKE_INSTALL_PREFIX=$d/install
cmake --build $d -j 12 --target install
```
## install rdc example
```
kk=$PWD/buildKokkosCUDA/install/lib64/cmake/Kokkos
cmake -S kkRdc -B buildRdc -DKokkos_DIR=$kk
cmake --build buildRdc
```