Commit c5ce955
Use temp allocator for kernel registry (#13012)
Summary:
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.
Reviewed By: larryliu0820
Differential Revision: D792856751 parent 5d3550f commit c5ce955
1 file changed
+12
-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 | + | |
| 699 | + | |
| 700 | + | |
| 701 | + | |
| 702 | + | |
| 703 | + | |
696 | 704 | | |
697 | 705 | | |
698 | 706 | | |
| |||
705 | 713 | | |
706 | 714 | | |
707 | 715 | | |
708 | | - | |
709 | | - | |
| 716 | + | |
710 | 717 | | |
711 | 718 | | |
712 | 719 | | |
| |||
0 commit comments