Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Kokkos - Define empty functions when profiling disabled #1424

Closed
ndellingwood opened this issue Feb 19, 2018 · 4 comments
Closed

Kokkos - Define empty functions when profiling disabled #1424

ndellingwood opened this issue Feb 19, 2018 · 4 comments
Assignees
Labels
Feature Request Create new capability; will potentially require voting
Milestone

Comments

@ndellingwood
Copy link
Contributor

@crtrott requested the following functions be defined when profiling is disabled so that Trilinos codes (e.g. kokkos-kernels, tpetra) do not need to #if guard when profiling is disabled:


void beginParallelFor(const std::string& kernelPrefix, const uint32_t devID, uint64_t* kernelID);
void endParallelFor(const uint64_t kernelID);
void beginParallelScan(const std::string& kernelPrefix, const uint32_t devID, uint64_t* kernelID);
void endParallelScan(const uint64_t kernelID);
void beginParallelReduce(const std::string& kernelPrefix, const uint32_t devID, uint64_t* kernelID);
void endParallelReduce(const uint64_t kernelID);

void pushRegion(const std::string& kName);
void popRegion();

void createProfileSection(const std::string& sectionName, uint32_t* secID);
void startSection(const uint32_t secID);
void stopSection(const uint32_t secID);
void destroyProfileSection(const uint32_t secID);

void markEvent(const std::string* evName);

void allocateData(const SpaceHandle space, const std::string label, const void* ptr, const uint64_t size);
void deallocateData(const SpaceHandle space, const std::string label, const void* ptr, const uint64_t size);
@ndellingwood ndellingwood added this to the 2018 February milestone Feb 19, 2018
@ndellingwood ndellingwood self-assigned this Feb 19, 2018
@ndellingwood ndellingwood added the Feature Request Create new capability; will potentially require voting label Feb 19, 2018
@nmhamster
Copy link
Contributor

This function signature looks wrong:

void markEvent(const std::string* evName);

Why isn't it std::string&?

@ndellingwood
Copy link
Contributor Author

@nmhamster Good catch, the signature for the declaration in the .hpp does not match that of the impl in the .cpp. I'll fix that.

@ndellingwood
Copy link
Contributor Author

Will get this in today (Tuesday)

ndellingwood added a commit to ndellingwood/kokkos that referenced this issue Feb 21, 2018
This commit to address issue kokkos#1424
Requested so user codes that include profiling hooks so user
codes/packages do not need to if-guard
@ndellingwood
Copy link
Contributor Author

Have PR #1427 in, will test more extensively tomorrow with spotchecks and in Trilinos.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature Request Create new capability; will potentially require voting
Projects
None yet
Development

No branches or pull requests

3 participants