-
Notifications
You must be signed in to change notification settings - Fork 354
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
Add a label to ParallelFor that is forwarded to TinyProfiling #3899
Comments
We actually have versions of ParallelFor functions that were added with this in mind. amrex/Src/Base/AMReX_GpuLaunchFunctsG.H Line 239 in b752027
Gpu::KernelInfo is defined at amrex/Src/Base/AMReX_GpuKernelInfo.H Line 7 in aba9891
Gpu::KernelInfo . Then we can do
But we still need to decide what to do with the string. Note that by default the kernel launch is async. So if we use a TinyProfiler in ParallelFor, we will have to set @DerNils-git Since you mentioned kokkos. Do you know what they do? |
If I understand the approach of the above I am only a user of the Kokkos profiling tools. So I can only guess a bit. |
The most expensive regions of a simulation are (probably) wrapped in an
amrex::ParallelFor
.The overhead of wrapping
amrex::ParallelFor
into a tiny profiling call is admittedly not very high.But it could simplify quick profiling of AMReX based codes if a label could be added directly to an
amrex::ParallelFor
.Enforcing the label would probably require to much effort for existing codes to adapt to the new interface.
But the
ParallelFor
could be extended by an optional string as the last argument which wouldbe forwarded to a the tiny profiling calls if the label is provided.
Current usage:
Extended usage:
A possible default argument could be
ParallelFor
is only profiled if a label is given explicitly.ParallelFor
regions wo a label are still profiled and the measurementalways provides insights into the time which is spend in a shared memory kernels.
The text was updated successfully, but these errors were encountered: