Skip to content

Commit 9792eac

Browse files
skrtskrtfbfacebook-github-bot
authored andcommitted
Filter aliasing nodes from memory timeline
Differential Revision: D55455168
1 parent 15bcdc7 commit 9792eac

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)