Commit d92fd2d
[Profiler] Limit calls to
Summary:
Pull Request resolved: #74888
So far as I can tell, `recordThreadInfo` only needs to be called once per thread. Once we have thread local subqueues we can easily manage this by simply calling it in the subqueue constructor.
Test Plan: The effect on single threaded overhead is pretty minimal, but it improves stress test overhead from ~6.1 us to ~1.4us since we're no contending over the lock in Kineto.
Reviewed By: chaekit
Differential Revision: D34811694
fbshipit-source-id: da1047f7ae43af048773610a0f250fa514c67989
(cherry picked from commit 9a5b926)recordThreadInfo (#74888)1 parent f17ad06 commit d92fd2d
File tree
2 files changed
+3
-4
lines changed- torch/csrc
- autograd
- profiler
2 files changed
+3
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
631 | 631 | | |
632 | 632 | | |
633 | 633 | | |
634 | | - | |
635 | 634 | | |
636 | 635 | | |
637 | 636 | | |
| |||
667 | 666 | | |
668 | 667 | | |
669 | 668 | | |
670 | | - | |
671 | | - | |
672 | 669 | | |
673 | 670 | | |
674 | 671 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
141 | 141 | | |
142 | 142 | | |
143 | 143 | | |
144 | | - | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
145 | 147 | | |
146 | 148 | | |
147 | 149 | | |
| |||
0 commit comments