Skip to content

Commit fadc076

Browse files
Eashan Gargfacebook-github-bot
authored andcommitted
Filter aliasing nodes from memory timeline (#4468)
Summary: Pull Request resolved: #4468 Through memory offset view, I noticed that we have a bunch of allocation objects that alias each other. These include: - "output" nodes - "aten._view_copy_nop.out" nodes Making an attempt to filter these out so the visualization is more accurate Reviewed By: Olivia-liu, zonglinpengmeta, hsharma35 Differential Revision: D55455168 fbshipit-source-id: 19b8960be3420dcac22a0200d447953aa762be21
1 parent 60699fb commit fadc076

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

util/activation_memory_profiler.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,8 @@ def create_tensor_allocation_info(graph: torch.fx.Graph) -> List[MemoryTimeline]
5454
nodes = graph.nodes
5555
memory_timeline = [None] * len(nodes)
5656
for i, node in enumerate(nodes):
57+
if node.op == "output":
58+
continue
5759
if node.target == memory.alloc:
5860
continue
5961
tensor_specs = get_node_tensor_specs(node)

0 commit comments

Comments
 (0)