Enhance nvtx support. (#5636)

This commit is contained in:
Jiaming Yuan
2020-05-06 22:54:24 +08:00
committed by GitHub
parent 67d267f9da
commit eaf2a00b5c
13 changed files with 98 additions and 87 deletions

View File

@@ -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>

View File

@@ -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();