Skip to content

Commit 251307d

Browse files
sanrisefacebook-github-bot
authored andcommitted
Ensure the process id to thread id to node id index is maintained. (#200)
Summary: Currently this map is not set since __ROOT_THREAD__ is not a valid node anymore. We can safely read thr pid and tid against a node id and store in this map. Reviewed By: shengfukevin Differential Revision: D71565563
1 parent 928d2c0 commit 251307d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

et_replay/execution_trace.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -357,8 +357,8 @@ def __init__(self, json):
357357
input_tensors = self.nodes[id].get_input_tensors()
358358
output_tensors = self.nodes[id].get_output_tensors()
359359

360-
# track the various process and threads we have
361-
if x["name"] == "__ROOT_THREAD__":
360+
# track annonation to get thread ids of root nodes
361+
if x["name"] == "[pytorch|profiler|execution_trace|thread]":
362362
tid = self.nodes[id].tid
363363
self.proc_group[pid][tid] = id
364364

0 commit comments

Comments
 (0)