Commit 414fc32
authored
Use temp allocator for kernel registry (pytorch#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.
Differential Revision: D79285675
cc @larryliu0820 @JacobSzwejbka @lucylq1 parent 089d218 commit 414fc32
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