Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch to nvtxRangePush() and nvtxRangePop() in TinyProfiler #1177

Merged
merged 1 commit into from
Jul 23, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions Src/Base/AMReX_TinyProfiler.H
Original file line number Diff line number Diff line change
Expand Up @@ -89,10 +89,6 @@ private:
static std::map<std::string,std::map<std::string, Stats> > statsmap;
static double t_init;

#ifdef AMREX_USE_CUDA
nvtxRangeId_t nvtx_id;
#endif

static void PrintStats (std::map<std::string,Stats>& regstats, double dt_max);
};

Expand Down
6 changes: 3 additions & 3 deletions Src/Base/AMReX_TinyProfiler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ TinyProfiler::start () noexcept
global_depth = ttstack.size();

#ifdef AMREX_USE_CUDA
nvtx_id = nvtxRangeStartA(fname.c_str());
nvtxRangePush(fname.c_str());
#endif

for (auto const& region : regionstack)
Expand Down Expand Up @@ -162,7 +162,7 @@ TinyProfiler::stop () noexcept
}

#ifdef AMREX_USE_CUDA
nvtxRangeEnd(nvtx_id);
nvtxRangePop();
#endif
} else {
improperly_nested_timers.insert(fname);
Expand Down Expand Up @@ -230,7 +230,7 @@ TinyProfiler::stop (unsigned boxUintID) noexcept
}

#ifdef AMREX_USE_CUDA
nvtxRangeEnd(nvtx_id);
nvtxRangePop();
#endif
} else
{
Expand Down