Skip to content

Commit

Permalink
update connector with limits include to compile on perlmutter
Browse files Browse the repository at this point in the history
  • Loading branch information
vlkale committed Aug 18, 2023
1 parent 1df325c commit 503f66f
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions profiling/nvtx-connector/kp_nvtx_connector.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@
#include <cstdint>
#include <vector>
#include <string>

#include <limits>
#include "nvToolsExt.h"

#include "kp_core.hpp"

static int tool_globfences; // use an integer

static int tool_globfences; // use an integer for other options
using namespace std;
namespace KokkosTools {
namespace NVTXConnector {

Expand Down Expand Up @@ -130,7 +130,7 @@ void kokkosp_begin_fence(const char* name, const uint32_t deviceId,
if (std::strstr(name, "Kokkos Profile Tool Fence")) {
// set the dereferenced execution identifier to be the maximum value of
// uint64_t, which is assumed to never be assigned
*handle = std::numeric_limits<uint64_t>::max();
*handle = numeric_limits<uint64_t>::max();
} else {
nvtxRangeId_t id = nvtxRangeStartA(name);
*handle = id; // handle will be provided back to end_fence
Expand All @@ -139,7 +139,7 @@ void kokkosp_begin_fence(const char* name, const uint32_t deviceId,

void kokkosp_end_fence(uint64_t handle) {
nvtxRangeId_t id = handle;
if (handle != std::numeric_limits<uint64_t>::max()) {
if (handle != numeric_limits<uint64_t>::max()) {
nvtxRangeEnd(id);
}
}
Expand Down

0 comments on commit 503f66f

Please sign in to comment.