diff --git a/src/common/cuda_rt_utils.h b/src/common/cuda_rt_utils.h index 133791c1b3f8..210f1e07d7f8 100644 --- a/src/common/cuda_rt_utils.h +++ b/src/common/cuda_rt_utils.h @@ -29,14 +29,14 @@ struct NvtxDomain { }; #if defined(XGBOOST_USE_NVTX) -using ScopedRange = ::nvtx3::scoped_range_in; +using NvtxScopedRange = ::nvtx3::scoped_range_in; using NvtxEventAttr = ::nvtx3::event_attributes; -using NvtxRgb = nvtx3::rgb; +using NvtxRgb = ::nvtx3::rgb; #else -class ScopedRange { +class NvtxScopedRange { public: template - explicit ScopedRange(Args &&...) {} + explicit NvtxScopedRange(Args &&...) {} }; class NvtxEventAttr { public: diff --git a/src/data/ellpack_page_raw_format.cu b/src/data/ellpack_page_raw_format.cu index e55ef47edcdf..86d1ac6da7eb 100644 --- a/src/data/ellpack_page_raw_format.cu +++ b/src/data/ellpack_page_raw_format.cu @@ -99,7 +99,7 @@ template // Read vector Context ctx = Context{}.MakeCUDA(common::CurrentDevice()); auto read_vec = [&] { - common::ScopedRange range{common::NvtxEventAttr{"read-vec", common::NvtxRgb{127, 255, 0}}}; + common::NvtxScopedRange range{common::NvtxEventAttr{"read-vec", common::NvtxRgb{127, 255, 0}}}; bst_idx_t n{0}; RET_IF_NOT(fi->Read(&n)); if (n == 0) { @@ -129,7 +129,7 @@ template // Write vector auto write_vec = [&] { - common::ScopedRange range{common::NvtxEventAttr{"write-vec", common::NvtxRgb{127, 255, 0}}}; + common::NvtxScopedRange range{common::NvtxEventAttr{"write-vec", common::NvtxRgb{127, 255, 0}}}; bst_idx_t n = impl->gidx_buffer.size(); bytes += fo->Write(n);