Commit cc2d5ca
add enabled API to autograd profiler (pytorch#31380)
Summary: Pull Request resolved: pytorch#31380 For being able to profile async RPCs, we attach a `RecordFunction` object to the future that is created during the RPC to persist it across the lifetime of the RPC (this is implemented in the next PR: ). Since we'd only like to do this when profiling is enabled, this PR adds an enabled API to the autograd profiler. ghstack-source-id: 96053933 Test Plan: Modified unit test. Differential Revision: D19050391 fbshipit-source-id: aa382110e69d06b4a84c83b31d2bec2d8a81ba101 parent 7d63027 commit cc2d5ca
File tree
4 files changed
+9
-0
lines changed- test
- torch/csrc/autograd
4 files changed
+9
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2523 | 2523 | | |
2524 | 2524 | | |
2525 | 2525 | | |
| 2526 | + | |
2526 | 2527 | | |
2527 | 2528 | | |
| 2529 | + | |
| 2530 | + | |
2528 | 2531 | | |
2529 | 2532 | | |
2530 | 2533 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
| 53 | + | |
53 | 54 | | |
54 | 55 | | |
55 | 56 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
57 | 61 | | |
58 | 62 | | |
59 | 63 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
230 | 230 | | |
231 | 231 | | |
232 | 232 | | |
| 233 | + | |
233 | 234 | | |
234 | 235 | | |
235 | 236 | | |
| |||
0 commit comments