-
Notifications
You must be signed in to change notification settings - Fork 28
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
roctracer: use multiple tracks for HIP streams #201
Conversation
Use different perfetto tracks for each stream, and set the name of these tracks to the stream pointer values. Setting the name like this matches the args in the API traces. This fixes overlapping work on multiple streams appearing as a call stack.
Create a declaration for getting the option in The macro is Then implement getting the value in config.cpp, something like: bool
get_perfetto_roctracer_per_stream()
{
static auto _v = get_config()->find("OMNITRACE_<name>");
return static_cast<tim::tsettings<bool>&>(*_v->second).get();
} |
Build error: https://my.cdash.org/viewBuildError.php?buildid=2242917 [omnitrace/omnitrace/source/lib/omnitrace/library/roctracer.cpp:519](https://github.com/AMDResearch/omnitrace/blob/master/omnitrace/omnitrace/source/lib/omnitrace/library/roctracer.cpp#L519):2: error: extra ‘;’ [-Werror=pedantic]
519 | };
| ^
[omnitrace/omnitrace/source/lib/omnitrace/library/roctracer.cpp:527](https://github.com/AMDResearch/omnitrace/blob/master/omnitrace/omnitrace/source/lib/omnitrace/library/roctracer.cpp#L527):2: error: extra ‘;’ [-Werror=pedantic]
527 | };
| ^ Just noting this to point you to the dashboard since this is nicer (IMO) than the logs from GitHub actions |
For tests I don't know how to tackle this, as I see perfetto traces can be verified by the python script, but it isn't aware of tracks currently. |
Thanks, altough I might only be able to continue working on this PR next week, so maybe you shouldn't hold out on it. |
Superceded by #209 |
Use different perfetto tracks for each stream, and set the name of these tracks to the stream pointer values. Setting the name like this matches the args in the API traces.
This fixes overlapping work on multiple streams appearing as a call stack.
Here's a screenshot of the results:
I would like to add an option to disable the new behaviour, because some applications might create a large number of streams which would obscure the traces. The environment variable and option parsing parts I don't yet fully understand so therefore Draft, and I would appreciate some hints for that.