Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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
- Loading branch information