mirror of
https://github.com/NVIDIA/nvbench.git
synced 2026-04-20 14:58:54 +00:00
Locking clocks is currently only implemented for Volta+ devices. Example usage: my_bench -d [0,1,3] --persistence-mode 1 --lock-gpu-clocks base See the cli_help.md docs for more info.
49 lines
1.3 KiB
CMake
49 lines
1.3 KiB
CMake
# 3.20.1 required for rapids-cmake
|
|
# 3.21.0 required for NVBench_ADD_DEPENDENT_DLLS_TO_* (MSVC only)
|
|
cmake_minimum_required(VERSION 3.20.1)
|
|
|
|
set(CMAKE_CXX_STANDARD 17)
|
|
set(CMAKE_CUDA_STANDARD 17)
|
|
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
|
|
|
|
include(cmake/NVBenchRapidsCMake.cmake)
|
|
nvbench_load_rapids_cmake()
|
|
|
|
project(NVBench
|
|
LANGUAGES CUDA CXX # CXX to work around issues with CUDA-only CMake projects.
|
|
VERSION 0.1.0
|
|
)
|
|
|
|
nvbench_init_rapids_cmake()
|
|
|
|
option(NVBench_ENABLE_NVML "Build with NVML support from the Cuda Toolkit." ON)
|
|
|
|
option(NVBench_ENABLE_TESTING "Build NVBench testing suite." OFF)
|
|
option(NVBench_ENABLE_EXAMPLES "Build NVBench examples." OFF)
|
|
|
|
include(cmake/NVBenchConfigTarget.cmake)
|
|
include(cmake/NVBenchDependentDlls.cmake)
|
|
include(cmake/NVBenchExports.cmake)
|
|
include(cmake/NVBenchWriteConfigHeader.cmake)
|
|
include(cmake/NVBenchDependencies.cmake)
|
|
include(cmake/NVBenchInstallRules.cmake)
|
|
include(cmake/NVBenchUtilities.cmake)
|
|
|
|
message(STATUS "NVBench CUDA architectures: ${CMAKE_CUDA_ARCHITECTURES}")
|
|
|
|
add_subdirectory(nvbench)
|
|
|
|
if (NVBench_ENABLE_EXAMPLES OR NVBench_ENABLE_TESTING)
|
|
enable_testing()
|
|
endif()
|
|
|
|
if (NVBench_ENABLE_EXAMPLES)
|
|
add_subdirectory(examples)
|
|
endif()
|
|
|
|
if (NVBench_ENABLE_TESTING)
|
|
add_subdirectory(testing)
|
|
endif()
|
|
|
|
nvbench_generate_exports()
|