Skip to content

Commit

Permalink
rename.
Browse files Browse the repository at this point in the history
  • Loading branch information
trivialfis committed Jul 18, 2024
1 parent 5c41634 commit 48355a5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions src/common/cuda_rt_utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,14 @@ struct NvtxDomain {
};

#if defined(XGBOOST_USE_NVTX)
using ScopedRange = ::nvtx3::scoped_range_in<NvtxDomain>;
using NvtxScopedRange = ::nvtx3::scoped_range_in<NvtxDomain>;
using NvtxEventAttr = ::nvtx3::event_attributes;
using NvtxRgb = nvtx3::rgb;
using NvtxRgb = ::nvtx3::rgb;
#else
class ScopedRange {
class NvtxScopedRange {
public:
template <typename... Args>
explicit ScopedRange(Args &&...) {}
explicit NvtxScopedRange(Args &&...) {}
};
class NvtxEventAttr {
public:
Expand Down
4 changes: 2 additions & 2 deletions src/data/ellpack_page_raw_format.cu
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ template <typename T>
// 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) {
Expand Down Expand Up @@ -129,7 +129,7 @@ template <typename T>

// 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);

Expand Down

0 comments on commit 48355a5

Please sign in to comment.