-
Notifications
You must be signed in to change notification settings - Fork 5
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
Remove use_annotated_operator #736
Conversation
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.
I am not yet able to follow why use_annotated_operator
was needed in the first place. But I have verified that these are the places in the code base where use_annotated_operator
was appearing and I also follow how the modified code will look like when use_annotated_operator
is removed.
If we take the following example in the context of Kokkos being compiled with the CUDA backend enabled: ddc::parallell_for_each(Kokkos::DefaultHostExecutionSpace(), ddom, [&](DElem delem)
{
// ...
}); There is a priori no need to use KOKKOS_LAMBDA because there will not be any CUDA kernel here. Internally we wrap the user lambda into an other functor that converts Kokkos integers into a The We get rid of it because this is quite a corner case and most of the time we can always capture by copy. This also forces the user to get closer to a device compatible kernel. |
Does this mean that I don't understand why it is difficult to avoid compiling the lambda in the context of a host and device function, when |
Not exactly, it was needed if the user did not annotate the lambda
DDC cannot know if the given functor/lambda is annotated or not, so we used to take the information from the Kokkos execution space. |
Reasons: