- CMake 3.22 or higher
- NVIDIA CUDA Toolkit 12.2 or higher
- A CUDA-capable GPU device
To build the GPU core code, execute the following commands in your terminal:
mkdir build && cd build
cmake -DCMAKE_BUILD_TYPE=Release .. && cmake --build . && make
For a better performance, you need to change the set(CMAKE_CUDA_ARCHITECTURES 86)
in CMakeLists.txt
file.
The value of CMAKE_CUDA_ARCHITECTURES
can be obtained from the output of GPU device info (Compute Capability):
./core --device 0 --device_info
----------------------------------------------------------------
| Property | Info |
----------------------------------------------------------------
...
| Compute Capability | 86 |
...
----------------------------------------------------------------
Set the appropriate CMAKE_CUDA_ARCHITECTURES
according to the output, then rebuild the code.