Skip to content

Commit

Permalink
putting numeric limits for kernelSampleSkip back in
Browse files Browse the repository at this point in the history
  • Loading branch information
vlkale committed Sep 7, 2023
1 parent 687bdd2 commit b606098
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion common/kokkos-sampler/Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
CXX = clang++
CXX = g++

CXXFLAGS = -O3 -std=c++17 -g

Expand Down
5 changes: 2 additions & 3 deletions common/kokkos-sampler/kp_sampler_skip.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
namespace KokkosTools {
namespace Sampler {
static uint64_t uniqID = 0;
static int64_t kernelSampleSkip = 0;
static int64_t kernelSampleSkip = std::numeric_limits<uint64_t>::max();
static float tool_prob_num =
-1.0; // Default probability of undefined percent of all invocations
static int tool_verbosity = 0;
Expand Down Expand Up @@ -44,7 +44,6 @@ void kokkosp_init_library(const int loadSeq, const uint64_t interfaceVer,
const uint32_t devInfoCount, void* deviceInfo) {
const char* tool_verbose_str = getenv("KOKKOS_TOOLS_SAMPLER_VERBOSE");
const char* tool_globFence_str = getenv("KOKKOS_TOOLS_GLOBALFENCES");
kernelSampleSkip = 0; // use min for undefined skip rate

if (NULL != tool_verbose_str) {
tool_verbosity = atoi(tool_verbose_str);
Expand Down Expand Up @@ -171,7 +170,7 @@ void kokkosp_init_library(const int loadSeq, const uint64_t interfaceVer,
tool_prob_num = 0.0;
}
}
if ((tool_prob_num < 0.0) && (kernelSampleSkip == 0)) {
if ((tool_prob_num < 0.0) && (kernelSampleSkip == std::numeric_limits<uint64_t>::max())) {
if (tool_verbosity > 0) {
printf(
"KokkosP: Neither sampling utility's probability for sampling "
Expand Down

0 comments on commit b606098

Please sign in to comment.