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: add IWYU pragmas to mark private and exported headers #6935
base: develop
Are you sure you want to change the base?
Conversation
58fb42c
to
94128c5
Compare
Thanks for the PR, I hadn't quite realized how many headers we have .... |
Ok to test. |
Question about the general approach: Comment about testing |
We might have someone to look at this later in May again, if you don't have time to explore a file mapping approach similar to libc++. |
Sorry I lost this thread -- We're not opposed to generating a As for testing I think either of those sounds reasonable to me. I'd likely have to defer to you folks to actually hook that up/modify this MR to do so. |
What we meant is that the kokkos.imp file would be maintained here in Kokkos not by the end-user. We had a little experience with that in LLVM, and it feels a bit more maintainable than adding stuff to hundreds of files? What is your experience with that? |
Ah I see -- in that case I do not have a strong preference between the IWYU pragmas and a Kokkos-maintained |
This MR is an initial stab at the feature request outlined in #6933 to support IWYU pragmas. The basic approach taken here was to build up a dependency graph based on header includes, and propagate "privateness" to files that include private files without the
KOKKOS_IMPL_PUBLIC_INCLUDE
guard. If there is a single parent header file that is public (or the file is reachable byKokkos_Core.hpp
), suggest that as alternative in theprivate
pragma.There were a fair number of files that couldn't be resolved as public or private in this way so they were left untouched.
@dalg24 can you loop in relevant reviews here? and do you have any ideas for testing?