Skip to content

Conversation

olia110
Copy link
Contributor

@olia110 olia110 commented Sep 21, 2025

This PR introduces a time-based profiler for the SOFIE inference engine. It provides developers with the tools to analyze the performance of generated C++ models by measuring the execution time of each individual operator, as well as the total inference time.

Changes or fixes:

A new option, SOFIE::Options::kProfile, is added to the RModel::Generate() method to enable the feature.
When enabled, a new RModelProfiler helper class instruments the generated doInfer() method with std::chrono timers.
Utility functions like PrintProfilingResults() and GetOpAvgTime() are added to the generated Session struct to access the collected timing data.
Checklist:

Tested changes locally by running inference in a loop and verifying the timing results.
updated the docs (if necessary)

This PR adds a tutorial for the new SOFIE RModelProfiler.

This work continues the development started in PR #19829.

@olia110 olia110 changed the title [tmva][sofie] Add tutorial for RModelProfiler [tmva][sofie] Profiler code generation for SOFIE Sep 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants