Skip to content

Commit

Permalink
Rollback erroneous change to kp sampler
Browse files Browse the repository at this point in the history
mistakenly made this change in this PR but it is part of PR #194
  • Loading branch information
vlkale authored Aug 5, 2023
1 parent 3becbe2 commit 5066ced
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions common/kokkos-sampler/kp_sampler_skip.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -133,14 +133,11 @@ void kokkosp_init_library(const int loadSeq, const uint64_t interfaceVer,
}

free(envBuffer);

uniqID = 1;

const char* tool_sample = getenv("KOKKOS_TOOLS_SAMPLER_SKIP");
if (NULL != tool_sample) {
kernelSampleSkip = atoi(tool_sample) + 1;
}

if (tool_verbosity > 0) {
printf("KokkosP: Sampling rate set to: %s\n", tool_sample);
}
Expand All @@ -152,17 +149,13 @@ void kokkosp_finalize_library() {

void kokkosp_begin_parallel_for(const char* name, const uint32_t devID,
uint64_t* kID) {

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

if (NULL != beginForCallee) {
uint64_t nestedID;
(*beginForCallee)(name, devID, nestedID);
// map.insert(kID, nestedID);
if (NULL != beginForCallee) {
(*beginForCallee)(name, devID, kID);
}
}
}
Expand Down

0 comments on commit 5066ced

Please sign in to comment.