Skip to content
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

Naming kernels via macros. #85

Open
jacob-moore22 opened this issue May 9, 2024 · 0 comments
Open

Naming kernels via macros. #85

jacob-moore22 opened this issue May 9, 2024 · 0 comments
Labels
documentation Improvements or additions to documentation good first issue Good for newcomers

Comments

@jacob-moore22
Copy link
Collaborator

jacob-moore22 commented May 9, 2024

Kokkos lets us name kernels. We need to modify our macros to allow users to name the kernel. This will be super helpful for debugging, plus I think it will help us standardize the style of our macros. It would look something like this:

FOR_ALL( "SGH::get_force"
    elem_gid, 0, mesh.num_elems, {

        // do math here
});

This naming probably needs to be optional since it is optional in Kokkos, but I am not against forcing it. Me may also consider setting default names that are just the string representation of the macro name, which will at least narrow down which type of kernel launch is the bad actor.

A guide on creating macros with optional inputs is here: https://gcc.gnu.org/onlinedocs/cpp/Variadic-Macros.html

@jacob-moore22 jacob-moore22 added documentation Improvements or additions to documentation good first issue Good for newcomers labels May 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant