Skip to content
Snippets Groups Projects
Commit 45115a8b authored by Jacques Xing's avatar Jacques Xing Committed by Chris Cantwell
Browse files

Update readme cmake

parent 810fb15e
No related branches found
No related tags found
1 merge request!33Update readme cmake
......@@ -11,7 +11,9 @@ set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
if(NOT DEFINED CMAKE_CUDA_ARCHITECTURES)
set(CMAKE_CUDA_ARCHITECTURES 86)
set(CMAKE_CUDA_ARCHITECTURES 75 80 86)
# CMake 3.24
# set(CMAKE_CUDA_ARCHITECTURES native)
endif()
# Default install location: build/dist
......
......@@ -35,6 +35,24 @@ To build the redesign project with CUDA:
This can be obtained by using the following command
```bash
cmake ../ -DNektar++_DIR=~/code/nektarMaster/build/dist/lib64/nektar++/cmake -DCMAKE_BUILD_TYPE=Debug -DNEKTAR_USE_CUDA=ON -DNEKTAR_USE_SIMD=OFF
cmake ../ -DNektar++_DIR=~/code/nektarMaster/build/dist/lib64/nektar++/cmake -DCMAKE_BUILD_TYPE=Debug -DNEKTAR_USE_CUDA=ON -DNEKTAR_USE_SIMD=OFF -DCMAKE_CUDA_ARCHITECTURES=86
make
```
NOTE: The `CMAKE_CUDA_ARCHITECTURES` parameter must be set to the appropriate compute capability of the GPU. On Linux, the compute capbability can be obtained by using the following command
```bash
nvidia-smi --query-gpu=compute_cap --format=csv
```
Here is a list of CUDA compute capability:
- 6.0 -> `-DCMAKE_CUDA_ARCHITECTURES=60`
- 6.1 -> `-DCMAKE_CUDA_ARCHITECTURES=61`
- 6.2 -> `-DCMAKE_CUDA_ARCHITECTURES=62`
- 7.0 -> `-DCMAKE_CUDA_ARCHITECTURES=70`
- 7.2 -> `-DCMAKE_CUDA_ARCHITECTURES=72`
- 7.5 -> `-DCMAKE_CUDA_ARCHITECTURES=75`
- 8.0 -> `-DCMAKE_CUDA_ARCHITECTURES=80`
- 8.6 -> `-DCMAKE_CUDA_ARCHITECTURES=86`
- 8.7 -> `-DCMAKE_CUDA_ARCHITECTURES=87`
- 8.9 -> `-DCMAKE_CUDA_ARCHITECTURES=89`
- 9.0 -> `-DCMAKE_CUDA_ARCHITECTURES=90`
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment