Skip to content

Commit

Permalink
Merge pull request kokkos#135 from kokkos/develop
Browse files Browse the repository at this point in the history
Just update some things.
  • Loading branch information
crtrott authored Apr 5, 2022
2 parents 91b9a52 + 46d5977 commit c901382
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 5 deletions.
10 changes: 10 additions & 0 deletions profiling/nvprof-connector/kp_nvprof_connector.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,16 @@

#include "nvToolsExt.h"

struct Kokkos_Tools_ToolSettings
{
bool requires_global_fencing;
bool padding[255];
};

extern "C" void kokkosp_request_tool_settings(const uint32_t, Kokkos_Tools_ToolSettings* settings) {
settings->requires_global_fencing = false;
}

static uint64_t nextKernelID;

extern "C" void kokkosp_init_library(const int loadSeq,
Expand Down
15 changes: 10 additions & 5 deletions profiling/space-time-stack/kp_space_time_stack.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -74,17 +74,18 @@ struct KokkosPDeviceInfo {
};

struct SpaceHandle {
char name[64];
char name[64];
};

enum Space {
SPACE_HOST,
SPACE_CUDA,
SPACE_HIP,
SPACE_SYCL
SPACE_SYCL,
SPACE_OMPT
};

enum { NSPACES = 4 };
enum { NSPACES = 5 };

Space get_space(SpaceHandle const& handle) {
// check that name starts with "Cuda"
Expand All @@ -93,6 +94,9 @@ Space get_space(SpaceHandle const& handle) {
// check that name starts with "SYCL"
if (strncmp(handle.name, "SYCL", 4) == 0)
return SPACE_SYCL;
// check that name starts with "OpenMPTarget"
if (strncmp(handle.name, "OpenMPTarget", 12) == 0)
return SPACE_OMPT;
// check that name starts with "HIP"
if (strncmp(handle.name, "HIP", 3) == 0)
return SPACE_HIP;
Expand All @@ -108,6 +112,7 @@ const char* get_space_name(int space) {
case SPACE_HOST: return "HOST";
case SPACE_CUDA: return "CUDA";
case SPACE_SYCL: return "SYCL";
case SPACE_OMPT: return "OpenMPTarget";
case SPACE_HIP: return "HIP";
}
abort();
Expand Down Expand Up @@ -223,7 +228,7 @@ struct StackNode {
}
void begin() {
number_of_calls++;

// Regions are not kernels, so we don't tally those
if(kind==STACK_FOR || kind==STACK_REDUCE || kind==STACK_SCAN || kind==STACK_COPY)
total_number_of_kernel_calls++;
Expand Down Expand Up @@ -369,7 +374,7 @@ struct StackNode {
os << std::fixed << std::setprecision(1);
auto percent_kokkos = (total_kokkos_runtime / total_runtime) * 100.0;

// Sum over kids if we're a region
// Sum over kids if we're a region
if (kind==STACK_REGION) {
double child_runtime = 0.0;
for (auto& child : children) {
Expand Down

0 comments on commit c901382

Please sign in to comment.