Commit 07a7687
Use temp allocator for kernel registry (pytorch#13012)
Summary:
Pull Request resolved: pytorch#13012
When indexing to the registry to get the op, memory is allocated from the method allocator to instantiate some TensorMeta and included objects. This memory is only used for that purpose and is not needed for the entire lifetime of the Method. Thus, we can instead use temp allocator which can later be reset and free up memory as needed.
Differential Revision: D792856751 parent d4c78ab commit 07a7687
1 file changed
+7
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
670 | 670 | | |
671 | 671 | | |
672 | 672 | | |
673 | | - | |
| 673 | + | |
674 | 674 | | |
675 | 675 | | |
676 | 676 | | |
| |||
691 | 691 | | |
692 | 692 | | |
693 | 693 | | |
694 | | - | |
695 | | - | |
| 694 | + | |
| 695 | + | |
| 696 | + | |
| 697 | + | |
| 698 | + | |
696 | 699 | | |
697 | 700 | | |
698 | 701 | | |
| |||
705 | 708 | | |
706 | 709 | | |
707 | 710 | | |
708 | | - | |
709 | | - | |
| 711 | + | |
710 | 712 | | |
711 | 713 | | |
712 | 714 | | |
| |||
0 commit comments