Skip to content

Commit 199fbe4

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. Differential Revision: D71565563
1 parent 928d2c0 commit 199fbe4

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

et_replay/execution_trace.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -358,9 +358,9 @@ def __init__(self, json):
358358
output_tensors = self.nodes[id].get_output_tensors()
359359

360360
# track the various process and threads we have
361-
if x["name"] == "__ROOT_THREAD__":
362-
tid = self.nodes[id].tid
363-
self.proc_group[pid][tid] = id
361+
tid = self.nodes[id].tid
362+
# track the various process and threads we have
363+
self.proc_group.setdefault(pid, {}).setdefault(tid, []).append(id)
364364

365365
# build tensor reference table
366366
for t_type, t_id, shape in input_tensors:

0 commit comments

Comments
 (0)