Skip to content

Commit

Permalink
Update debugging/kernel-logger/kp_kernel_logger.cpp
Browse files Browse the repository at this point in the history
Co-authored-by: Daniel Arndt <[email protected]>
  • Loading branch information
csiefer2 and masterleinad authored Oct 17, 2024
1 parent 62a39a1 commit 21d6359
Showing 1 changed file with 5 additions and 12 deletions.
17 changes: 5 additions & 12 deletions debugging/kernel-logger/kp_kernel_logger.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -74,25 +74,18 @@ std::string deviceIdToString(const uint32_t deviceId) {
}

bool suppressCounts() {
static bool value = false;
static bool initialized = false;

if (initialized)
return value;
else {
static bool value = [](){
const char* varVal = std::getenv("KOKKOS_PROFILE_SUPPRESS_COUNTS");
if (varVal) {
std::string v = std::string(varVal);
// default to false
if (v == "1" || v == "ON" || v == "on" || v == "TRUE" || v == "true" ||
v == "YES" || v == "yes")
value = true;
else
value = false;
return true;
}
initialized = true;
return value;
}
return false;
}();
return value;
}

void kokkosp_print_region_stack_indent(const int level) {
Expand Down

0 comments on commit 21d6359

Please sign in to comment.