-
Notifications
You must be signed in to change notification settings - Fork 172
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
Profiler: use amrex logic for device synchronization instead of custom solution #4889
Profiler: use amrex logic for device synchronization instead of custom solution #4889
Conversation
Looks Great! |
@lucafedeli88 thank you for this! Can you rebase pls? :) |
that's done, @ax3l ! |
ping, @AlexanderSinn and @ax3l ;-) ! |
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.
LGTM. This new default might hide a couple of race conditions that we introduce in the future 😅
@lucafedeli88 @AlexanderSinn , did you have a chance to double check performance stays the same?
…m solution (ECP-WarpX#4889) * Use amrex logic for device synchronization in tiny profiler instead of custom solution * improve comment * remove useless comment * fix missing include * fix bug * fix bug
This PR is a follow-up of the discussion with @AlexanderSinn in #4880 .
Currently we implement in
ablastr
some logic to ensure device synchronization for theTinyProfiler
.However, after @AlexanderSinn 's PR AMReX-Codes/amrex#3763 , we can rely on what is already implemented in AMReX in order to achieve that.
Therefore, this PR does the following:
inside WarpXAMReXInit.cpp`.
WarpXProfilerWrapper.H
andablastr/profiler/ProfilerWrapper.H
are now ultra-thin wrappers around the macros provided by AMReX.WarpX::do_device_synchronize
static variable is eliminated (with some minor changes to functions that required this variable as a parameter).All the other changes are inclusions of dependencies that were previously included transitively via
#include "WarpX.H"
insideWarpXProfilerWrapper.H
.