diff --git a/CHANGELOG.md b/CHANGELOG.md index 7350d72b1..1ccd2caf5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,8 @@ - PR #343 Add in option to statically link against cudart ## Improvements + +- PR #354 Add CMake option for per-thread default stream - PR #350 Add .clang-format file & format all files ## Bug Fixes diff --git a/CMakeLists.txt b/CMakeLists.txt index 31462ccfb..cc5e1e214 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -86,6 +86,16 @@ include(FeatureSummary) include(CheckIncludeFiles) include(CheckLibraryExists) +################################################################################################### +# - per-thread default stream option -------------------------------------------------------------- +# This needs to be defined first so tests and benchmarks can inherit it. + +option(PER_THREAD_DEFAULT_STREAM "Build with per-thread default stream" OFF) +if(PER_THREAD_DEFAULT_STREAM) + message(STATUS "Using per-thread default stream") + add_compile_definitions(CUDA_API_PER_THREAD_DEFAULT_STREAM) +endif(PER_THREAD_DEFAULT_STREAM) + ################################################################################################### # - add gtest -------------------------------------------------------------------------------------