-
Notifications
You must be signed in to change notification settings - Fork 754
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
[SYCL][XPTI] Refactoring framework to use 128-bit keys for collision elimination #14467
Conversation
+ Add functions to set and enable scope notification of tracepoints when tracepoints are refactored to support self notification Signed-off-by: Vasanth Tovinkere <[email protected]>
+ Moved from std::unordered_map for most containers to emhash8 which improves performance on microbenchmarks from ~1.5X to 6X for various operations. Also improves the performance of callback handlers by ~1.6X + Added 128-bit data structure for implementing the collision free Universal ID Signed-off-by: Vasanth Tovinkere <[email protected]>
+ Framework now is built on 128-bit keys using new APIs and legacy API support is handled with 64-bit mappings to 128-bit keys Signed-off-by: Vasanth Tovinkere <[email protected]>
+ New approach to saving all necessary data in TLS so lookups can be avoided. Lookups take the most amount of time/event. + Moved from emhash8 to phmap as phmap provides both node_hash_map and flat_hash_map and the performance is better than std implementations + Added tests to test APIs and its correctness + Updated documentation for framework implementation and headers Signed-off-by: Vasanth Tovinkere <[email protected]>
+ Basic collector will now handle a few more events Signed-off-by: Vasanth Tovinkere <[email protected]>
+ Revamped implementation to use the same amount of memory, but have the option of reducing the number of lookups + Updated unit tests to reflect the new approach where 128-bit and 64-bit keys are always accessible. Signed-off-by: Vasanth Tovinkere <[email protected]>
+ Updated scomped objects and added new methods that combine UID creation, payload registration and trace point creation into a single call xptiRegisterTracepointScope () or xptiCreateTracepoint(). + Updated tests and addded documentation Signed-off-by: Vasanth Tovinkere <[email protected]>
Signed-off-by: Vasanth Tovinkere <[email protected]>
+ Previous implementation of XPTI required the trace event to be invariant for a given code location. However, with multiple threads being active at the same tracepoint, previous design could not handle mutable metadata. TO assist with this, every visit to a tracepoint generates a trace event. Signed-off-by: Vasanth Tovinkere <[email protected]>
Signed-off-by: Vasanth Tovinkere <[email protected]>
+ New macros to help make instrumenting code easier. A Part 2 PR will migrate all instrumentation using older API to use new helper classes and macros Signed-off-by: Vasanth Tovinkere <[email protected]>
Signed-off-by: Vasanth Tovinkere <[email protected]>
Signed-off-by: Vasanth Tovinkere <[email protected]>
+ basic_event_collection_linux.cpp test was expecting a "kernel_name" metadata for an edge event. That should be covered by the source and target universal IDs. Edges do not have a kernel associated with them. Signed-off-by: Vasanth Tovinkere <[email protected]>
Signed-off-by: Vasanth Tovinkere <[email protected]>
Signed-off-by: Vasanth Tovinkere <[email protected]>
+ Since these hasmaps excel for different types of keys, using both for specific maps gives the best performance. Signed-off-by: Vasanth Tovinkere <[email protected]>
Signed-off-by: Tikhomirova, Kseniya <[email protected]>
@intel/llvm-gatekeepers hi, we have failed clang-format check here but the files it is reporting are 3rd party project files we do not want (or not eligible?) to align with our clang-format style. Could we ignore this check and merge pull request? Could you please merge PR as it is or probably recommend something to disable clang-format check in an appropriate way? Jenkins failure is a scanning tool failure @stdale-intel or @tovinkere could provide details about. According to comment earlier - new lib addition is approved and scanning tools will be updated. |
So, current version of the PR adds third-party headers into the repo. @intel/llvm-gatekeepers Does anybody have an opinion which approach would be better for this case? Committing into the repo or fetching via cmake? |
I would definitely prefer the fetching solution if possible. That way we also do not have to go through this issue every time we need to update the headers. May also be good to know what would be realistic to upstream, if XPTI is meant to be upstreamed, @sergey-semenov | @elizabethandrews . |
It doesn't seem to be only the scanning tool. RHEL build fails as well. |
Signed-off-by: Vasanth Tovinkere <[email protected]>
PR to fix post-commit failures is opened here: |
Previous implementation of the XPTI framework used 64-bit hash values to represent trace points in the code and this has led to a few of hash collisions.This refactoring moves to a 128-bit key to guarantee uniqueness. The changes needed to SYCL runtime to fully migrate to newer APIs will be pushed as a separate Part 2 pull request. Current pull request include changes to the XPTI framework and minor changes to SYCL runtime to reflect the transition to 128-bit keys and ensure validity of the tests.
NOTE: Since more events are generated due to the creation of a new trace event for each trace point instance, some tests that rely on event sequences may have to be updated.