Skip to content

Commit 68d34af

Browse files
committed
add option for per-thread default stream
1 parent ae88d9c commit 68d34af

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

CMakeLists.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,13 @@ if(USE_NVTX)
161161
set(CMAKE_CUDA_FLAGS "${CMAKE_CUDA_FLAGS} --define-macro USE_NVTX")
162162
endif(USE_NVTX)
163163

164+
option(PER_THREAD_DEFAULT_STREAM "Build with per-thread default stream" OFF)
165+
if(PER_THREAD_DEFAULT_STREAM)
166+
message(STATUS "Using per-thread default stream")
167+
add_compile_definitions(CUDA_API_PER_THREAD_DEFAULT_STREAM)
168+
set(CMAKE_CUDA_FLAGS "${CMAKE_CUDA_FLAGS} --default-stream per-thread")
169+
endif(PER_THREAD_DEFAULT_STREAM)
170+
164171
###################################################################################################
165172
# - link libraries --------------------------------------------------------------------------------
166173

0 commit comments

Comments
 (0)