pytorch
69e9f905 - [Profiler] Add `disabled` and `global` methods to ProfilerConfig. (#83891)

Commit
2 years ago
[Profiler] Add `disabled` and `global` methods to ProfilerConfig. (#83891) `ProfilerState::Disabled` and `ProfilerState::KINETO_ONDEMAND` have special semantics. The former is somewhat intuitive, but the degree of behavior branching on the latter (and why the branching is necessary) is less clear. By factoring the enum checks into methods, we can both clairify intent and future proof in case we ever add other global profiling contexts. Differential Revision: [D38917980](https://our.internmc.facebook.com/intern/diff/D38917980/) Pull Request resolved: https://github.com/pytorch/pytorch/pull/83891 Approved by: https://github.com/slgong-fb
Author
Taylor Robie
Committer
Parents
Loading