lanl/MATAR

Naming kernels via macros.

開放

#85 建立於 2024年5月9日

 (1 則留言) (0 個反應) (0 位負責人)C++ (16 個分叉)auto 404
documentationgood first issue

倉庫指標

星標
 (33 顆星)
PR 合併指標
 (PR 指標待抓取)

描述

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

貢獻者指南