-
Notifications
You must be signed in to change notification settings - Fork 56
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
rename nvprof-connector to nvtx-connector, add 3 more hooks #139
Conversation
Can you add the code to disable auto fencing by the tool. I think we don't actually want it here. Furthermore, the fence profiling hooks are actually also getting called for the auto-fences, so any tool which profiles fencing needs to deal with that or get tons of false stuff. |
@crtrott is this the way to disable fencing? If so, I think we're good :D |
@cwpearson yes, I believe that is right from looking at this a few months ago. |
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 would suggest using 'anonymous' rather than the 'anon.' Abbreviation.
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. Thanks for these changes. Sorry it was somehow not reviewed until now.
The fix to #147 (now in develop) may relate to or overlap with the discussion on the tools fence callback above.
I will need one other review before we can merge, and I have requested a reviewer.
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.
No PR against master. You must target the develop branch.
@dalg24 Thanks. I will work with @cwpearson to fix. |
e25a7cb
to
6d39a56
Compare
@dalg24 I have retargeted to develop |
@cwpearson Thanks! |
Interesting, my local |
Strange. So, the @dalg24 @crtrott Do you know if there is an easy resolution to the failing format check here given results of CI? |
$ git log -s | head -n5
commit b3579f18cec82fe7b5dafcfff754823952e61457
Author: Carl Pearson <[email protected]>
Date: Mon Apr 18 09:49:13 2022 -0700
rename nvprof-connector to nvtx-connector, add hooks for kokkosp_begin_fence, kokkosp_end_fence, and kokkosp_profile_event
$ git status
On branch nvtx
Your branch is up to date with 'origin/nvtx'.
nothing to commit, working tree clean
$ clang-format-8 --version
clang-format version 8.0.1 (tags/RELEASE_801/final)
$ clang-format-8 -i profiling/nvtx-connector/kp_nvtx_connector.cpp
$ git status
On branch nvtx
Your branch is up to date with 'origin/nvtx'.
nothing to commit, working tree clean |
It would be great if the format check printed what it thought the diff should be! core and kernels do this |
Thanks. I am a bit baffled here also. I am using version 8.0.1 and this works locally for me too (MacOS). Yes, that would be good if it did print what it should be, and I agree some fixes to format checking process needed for Kokkos Tools. I will circle back soon on this with either a fix to CI process involving clang-format-x or a (temporary) fix to that part of your code to get the format check passed.
|
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.
When profiling fences, we probably don't want kokkos to fence each time time it calls a callbacks.
kokkos-tools/profiling/roctx-connector/kp_roctx_connector.cpp
Lines 37 to 40 in 0026352
extern "C" void kokkosp_request_tool_settings( | |
const uint32_t, Kokkos_Tools_ToolSettings* settings) { | |
settings->requires_global_fencing = false; | |
} |
We probably need a lever to toggle whether or not to enable fence profiling because this changes the behavior of the tool, either marking the full kernel execution or just the launch latency.
if (nullptr == name) { | ||
name = "anonymous. Kokkos fence"; | ||
} |
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.
As far as I know this will never occur.
…ew name of nvtx_connector (changing from nvprof_connector).
@cwpearson can you review this |
|
||
void kokkosp_request_tool_settings(const uint32_t, | ||
Kokkos_Tools_ToolSettings* settings) { | ||
settings->requires_global_fencing = false; | ||
settings->requires_global_fencing = true; |
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.
without this kernel renaming doesn't work, and the regions all only measure kernel launch
|
||
#include "kp_core.hpp" | ||
|
||
static int tool_globfences; // use an integer |
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.
Why is it an int
and not a bool
?
static int tool_globfences; // use an integer | ||
|
||
static int tool_globfences; // use an integer for other options | ||
using namespace std; |
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.
Why? That's generally a bad idea.
Changes / enhancements to nvprof-connector
kokkosp_begin_fence
,kokkosp_end_fence
, andkokkosp_profile_event