You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add a null check for tracer in the Module::load_method (#6319)
Add a null check for `event_tracer` param in the `Module::load_method` (#6298)
Summary:
Pull Request resolved: #6298
When testing the [LLM Manual](https://pytorch.org/executorch/0.4/llm/getting-started.html#profiling-and-debugging), I found etdump is not generated :(. It seems to be a bug introduced in D62520386 when a `tracer` parameter was added to `Module::load_method`. It overrides the `event_tracer_.get()`, resulting `tracer` being null and passed to `program_->load_method`, thus etdump is not generated.
This diff just adds a check: it `tracer` is not null, use it; otherwise use the tracer get from class member event_tracer_.
Reviewed By: tarun292, Gasoonjia, dbort
Differential Revision: D64481537
fbshipit-source-id: 86cecbaea2b7293be28d60f4147deb31535fa6ea
(cherry picked from commit ad0e5e8)
Co-authored-by: Olivia Liu <[email protected]>
0 commit comments