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

Renaming nvtx focused connector #200

Closed
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
17 changes: 9 additions & 8 deletions common/kokkos-sampler/kp_sampler_skip.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

namespace KokkosTools {
namespace Sampler {
static uint64_t uniqID = 0;
static uint64_t uniqID = 0;
static uint64_t kernelSampleSkip = 101;
static int tool_verbosity = 0;
static int tool_globFence = 0;
Expand Down Expand Up @@ -152,16 +152,17 @@ void kokkosp_finalize_library() {

void kokkosp_begin_parallel_for(const char* name, const uint32_t devID,
uint64_t* kID) {
*kID = uniqID++;

if (((*kID) % kernelSampleSkip) == 0) {
if (tool_verbosity > 0) {
printf("KokkosP: sample %llu calling child-begin function...\n",
(unsigned long long)(*kID));
}

if (NULL != beginForCallee) {
(*beginForCallee)(name, devID, kID);
if (NULL != beginForCallee) {
uint64_t nestedID;
(*beginForCallee)(name, devID, nestedID);
// map.insert(kID, nestedID);
}
}
}
Expand All @@ -174,22 +175,21 @@ void kokkosp_end_parallel_for(const uint64_t kID) {
}

if (NULL != endForCallee) {
(*endForCallee)(kID);
(*endForCallee)(kID);
}
}
}

void kokkosp_begin_parallel_scan(const char* name, const uint32_t devID,
uint64_t* kID) {
*kID = uniqID++;

if (((*kID) % kernelSampleSkip) == 0) {
if (tool_verbosity > 0) {
printf("KokkosP: sample %llu calling child-begin function...\n",
(unsigned long long)(*kID));
}

if (NULL != beginScanCallee) {
uint64_t nestedID = 0;
(*beginScanCallee)(name, devID, kID);
}
}
Expand Down Expand Up @@ -219,7 +219,8 @@ void kokkosp_begin_parallel_reduce(const char* name, const uint32_t devID,
}

if (NULL != beginReduceCallee) {
(*beginReduceCallee)(name, devID, kID);
(*beginReduceCallee)(name, devID, kID);

}
}
}
Expand Down
Loading