-
Notifications
You must be signed in to change notification settings - Fork 48
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
Improve macros documentation #27
base: main
Are you sure you want to change the base?
Conversation
ProgrammingGuide/Compiling.md
Outdated
@@ -338,6 +338,7 @@ The following options control `find_package` paths for CMake-based TPLs: | |||
|
|||
#### Architecture Keywords | |||
Architecture-specific optimizations can be enabled by specifying `-DKokkos_ARCH_X`. | |||
See the [complete list of architecture keywords](../API-Reference/Macros.md#architectures). | |||
|
|||
* Kokkos_ARCH_A64FX |
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.
Should we consider removing the list below (as duplicated) and only leave the link to API-Reference/Macros.md
?
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.
The only concern I have about removing the list below is that there is a very subtle capitalization difference between the keywords listed on this page and the ones in API-Reference/Macros.md
.
Here, it is Kokkos_ARCH_X
whereas in Macros.md
, it's KOKKOS_ARCH_X
.
Though for CMake builds, using either doesn't seem to make any difference...
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 think it's debatable whether users should be able to rely on the existence of these macros.
The CMake
option always looks like Kokkos_ENABLE...
(although we also define local CMake variables KOKKOS_ENABLE...
) while the macro is KOKKOS_ENABLE...
.
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.
note I don't think that KOKKOS_ENABLE is valid from our side.
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.
TODO:
- leave the
CMake
options (Kokkos_ENABLE...
) and make sure they are up to date with the code - remove
KOKKOS_ENABLE_...
as users should not rely on these (remove the obsolete list) - improve the wording for
KokkosCore_config.h
(https://github.com/kokkos/kokkos/wiki/Compiling#41-general-information) - make https://github.com/kokkos/kokkos/wiki/Compiling#kokkos-cmake-keyword-listing a table (improve readability)
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.
@crtrott , @masterleinad -- Just to make sure I understand the principle here, from the few comments above, I gather that you are proposing:
- Users should not use Kokkos configuration macros, that these configuration macros are/ should be mostly / exclusively for developers (i.e., things "under the hood" in Kokkos);
- the CMake variables,
Kokkos_ENABLE_X
,Kokkos_ARCH_XYZ
should be the only user-facing configuration variables ? - CMake variables will take precedence over the configuration macros.
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.
Should we consider removing the list below (as duplicated) and only leave the link to
API-Reference/Macros.md
?
@cz4rs and @ldh4 -- Perhaps we could consider:
- Making a clear delineation of what should vs. what should not be user facing (e.g., do not make configuration macros user facing, but Kokkos CMake variables should absolutely be public);
- Removing duplicated, out-of-date / obsolete tables;
- Provide clear explanation of what a Kokkos CMake variable is (i.e.,
Kokkos_ENABLE_ABC
,Kokkos_ENABLE_ARCH_XYZ
) and its intended use, and clearly also state that configuration macros are not part of the public API.
@cz4rs please update this so that you use the new sphinx branch. |
is this ready? if not, can you please make it draft? Sure. How do I do that? |
0909be1
to
ccb1efc
Compare
…d Kokkos_Core.hpp
Converting to draft to fix conflicts and check recent changes. |
May 16, 2022 Documentation Bootcamp