Commit 379ace3
Add a null check for tracer in the
Summary:
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 is added to `Module::load_method`. It overrides the `event_tracer_.get()`, resulting `tracer` being null `program_->load_method` is called and 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_.
Differential Revision: D64481537Module::load_method
1 parent 2c8b14c commit 379ace3
1 file changed
+5
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
152 | 152 | | |
153 | 153 | | |
154 | 154 | | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
155 | 160 | | |
156 | 161 | | |
157 | 162 | | |
| |||
0 commit comments