Open calewis opened 4 years ago
Closes #10
If a user relies on Clang's implementation and overloads a function on __host__
and __device__
this will get flagged right?
(Not that I think it is a big deal, just checking that I understand)
If a user relies on Clang's implementation and overloads a function on
__host__
and__device__
this will get flagged right? (Not that I think it is a big deal, just checking that I understand)
Yes, if a user writes functions that are legal in the context they call them and they are careful to not call them in other contexts then they will get warnings. Is that likely (this is the reason for letting people opt out if they explicitly use the default host space)? Also I suspect that these users might not be interested in a check that requires them to use KOKKOS_FUNCTION
Any reason to delay the merge?
The ensure-kokkos-function check will catch the following issues in users code:
In both of these examples it is possible that the code will compile and run acceptably in certain circumstances, default execution space is OpenMP or other host, but will fail when compiled for the cuda backend. The goal is to help users who mainly develop on host but then need to run on devices.
We have provided a way to opt out of the check when the default host execution space is used.
There are a few minor corner cases that might trigger the warning or will be false negatives, but I deemed the work to catch them to be excessive without complaints from users
The reason this won't warn is because we have to allow the following
I'm sure that with enough users there will be other issues, but I think it's robust enough for release.