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

Fixed invocation of tools init callbacks #4061

Merged
merged 2 commits into from
Jun 2, 2021

Conversation

jrmadsen
Copy link
Contributor

@jrmadsen jrmadsen commented May 27, 2021

  • Fixes scenario where Kokkos::Tools::Experimental::set_init_callback is configured before Kokkos::initialize(...) and there is no library loaded from environment, e.g.:
extern "C"
void init_library(const int loadSeq, const uint64_t interfaceVer,
                  const uint32_t devInfoCount, void* deviceInfo) {
    // ...
}

int main()
{
    Kokkos::Tools::Experimental::set_init_callback(&init_library);
    Kokkos::initialize();
    // ...
    Kokkos::finalize();
}

Will also apply to:

  • Experimental::current_callbacks.request_tool_settings
  • Experimental::current_callbacks.provide_tool_programming_interface

when the @DavidPoliakoff remembers to create set callback functions for those features ;)

Copy link
Contributor

@DavidPoliakoff DavidPoliakoff left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've literally just been running into this. Good stuff

@crtrott
Copy link
Member

crtrott commented Jun 2, 2021

@DavidPoliakoff can you (or someone else) add a test for this?

@crtrott crtrott added the Bug Broken / incorrect code; it could be Kokkos' responsibility, or others’ (e.g., Trilinos) label Jun 2, 2021
@crtrott crtrott merged commit f381f07 into kokkos:develop Jun 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Broken / incorrect code; it could be Kokkos' responsibility, or others’ (e.g., Trilinos)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants