-
Notifications
You must be signed in to change notification settings - Fork 407
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
KokkosTools: Don't call callbacks before backends are initialized #6114
KokkosTools: Don't call callbacks before backends are initialized #6114
Conversation
975ee2a
to
1ac17c1
Compare
Please discuss why this is not just a precondition violation. Why we should support setting a callback before initialization. |
We need to set the initializer callback before calling
when the tools already provide a |
I do not understand. |
The tools provide an |
Kokkos::deep_copy(dst_view, src_view); | ||
Kokkos::parallel_for("parallel_for", | ||
Kokkos::RangePolicy<execution_space>(0, 1), | ||
[=](int i) { (void)i; }); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[=](int i) { (void)i; }); | |
KOKKOS_LAMBDA(int i) { (void)i; }); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Proposed cleaner comment
Co-authored-by: Christian Trott <crtrott@sandia.gov>
Retest this please. |
…t__ __device__ lambda cannot have private or protected access within its class
3ce5887
to
ec79d9c
Compare
Retest this please. |
Plz make sure you add to the changelog |
…kkos#6114) * KokkosTools: Don't call callbacks before backends are initialized * [=]->KOKKOS_LAMBDA * Improve comment Co-authored-by: Christian Trott <crtrott@sandia.gov> * Fix: The enclosing parent function ("TestBody") for an extended __host__ __device__ lambda cannot have private or protected access within its class --------- Co-authored-by: Christian Trott <crtrott@sandia.gov>
Fixes the issue seen in kokkos/kokkos-tools#188 (comment).
In short, the test there sets callbacks before
Kokkos
is initialized and some callbacks are used when initializing backends before the respective tool is initialized. This pull request proposes to pause tools until the backends are initialized which also implies that none of those events get recorded.