Enhance nvtx support. (#5636)
This commit is contained in:
@@ -40,9 +40,9 @@ if (USE_CUDA)
|
||||
endif (USE_NCCL)
|
||||
|
||||
if (USE_NVTX)
|
||||
target_include_directories(testxgboost PRIVATE "${NVTX_HEADER_DIR}")
|
||||
target_compile_definitions(testxgboost PRIVATE -DXGBOOST_USE_NVTX=1)
|
||||
enable_nvtx(testxgboost)
|
||||
endif (USE_NVTX)
|
||||
|
||||
if (MSVC)
|
||||
target_compile_options(testxgboost PRIVATE
|
||||
$<$<COMPILE_LANGUAGE:CUDA>:-Xcompiler=/utf-8>
|
||||
|
||||
@@ -94,7 +94,7 @@ TEST(SparsePageDMatrix, ThreadSafetyException) {
|
||||
|
||||
bool exception = false;
|
||||
int threads = 1000;
|
||||
#pragma omp parallel for
|
||||
#pragma omp parallel for num_threads(threads)
|
||||
for (auto i = 0; i < threads; i++) {
|
||||
try {
|
||||
auto iter = dmat->GetBatches<SparsePage>().begin();
|
||||
|
||||
Reference in New Issue
Block a user