Add printing device tracing records for non-target callbacks - #8
Merged
Conversation
Thyre
force-pushed
the
device-tracing-records
branch
3 times, most recently
from
March 14, 2026 12:50
542afd0 to
2b9bcb1
Compare
Enabling the records largely follows a similar structure. Therefore refactor most of the logic into a macro. We still need to explicitly reset the `registration_success` flag, as an implementation might not provide all the necessary callback values. Signed-off-by: Jan André Reuter <j.reuter@fz-juelich.de>
Try to register all available device tracing record callbacks. While no runtime supporting any records beyond target, target_data_op, target_submit and target_map is known, this might change in future runtime releases. Hence, prepare early so that we can adapt as soon as possible. Signed-off-by: Jan André Reuter <j.reuter@fz-juelich.de>
In case we did not enable getting the full output, ensure that the buffer_complete callback only prints the most necessary information. Signed-off-by: Jan André Reuter <j.reuter@fz-juelich.de>
Add printf output, similar to existing accelerator events. Since we return early on non-printing modes, we can unconditionally print the results. Skip error callback for now, since some runtimes do not implement the type in ompt_record_ompt_t. Signed-off-by: Jan André Reuter <j.reuter@fz-juelich.de>
Signed-off-by: Jan André Reuter <j.reuter@fz-juelich.de>
Signed-off-by: Jan André Reuter <j.reuter@fz-juelich.de>
Thyre
force-pushed
the
device-tracing-records
branch
2 times, most recently
from
March 16, 2026 10:37
ee0019d to
dadcb39
Compare
Signed-off-by: Jan André Reuter <j.reuter@fz-juelich.de>
Thyre
force-pushed
the
device-tracing-records
branch
from
March 16, 2026 10:39
dadcb39 to
63af040
Compare
Thyre
marked this pull request as ready for review
March 16, 2026 10:39
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR significantly expands the handling of the device tracing interface by first trying to register all available device tracing records, and then printing them, similarly to the already implemented target records.
Additionally, refactor the existing code to simplify registering device tracing records and printing them.
Avoided implementing the error record for now, as implementations like LLVM do not provide the record in
ompt_record_ompt_tcurrently, see llvm/llvm-project#185683.TODO: