Add macros and helper classes in event_tracer needed for profiling (#294)
Summary: Pull Request resolved: https://github.com/pytorch/executorch/pull/294 All the internal invocations (inside ExecuTorch codebase) of event_tracer will be controlled through the macros added in this diff. The benefit of this is that we can leave these hooks in the hot path and when the flag is disabled they essentially compile to a no-op in prod releases. It's also ensured that in all these macros if we pass in a `nullptr` as event_tracer (default case if user doesn't pass in one when method is created) we just return immediately. The specific macros added here are only meant to be used inside the ExecuTorch codebase as the header explains. Reviewed By: dbort Differential Revision: D49204729 fbshipit-source-id: 9bd2945ad94a5064aab6076210346b14ed9bcf11
T
Tarun Karuturi committed
1bf2ff4efe2af773cc4ea2cfd7061e9fe48314a0
Parent: 31aaa12
Committed by Facebook GitHub Bot <facebook-github-bot@users.noreply.github.com>
on 9/14/2023, 6:42:12 AM