File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -435,18 +435,17 @@ def convert_ctrl_dep_to_data_dep(
435435 last_visited_any : Optional [ChakraNode ] = None
436436 pg_name_to_nccl_ops : Dict [str , List [int ]] = {}
437437 while stack :
438- current_node = stack .pop ()
438+ current_node = stack .pop ()
439+ visited .add (current_node .id )
440+
439441 if current_node .type == COMM_COLL_NODE :
440442 pg_name = json_node_map [current_node .id ].pg_name
441443 if pg_name in pg_name_to_nccl_ops :
442444 current_node .data_deps .append (pg_name_to_nccl_ops [pg_name ][- 1 ])
443445 pg_name_to_nccl_ops [pg_name ].append (current_node .id )
444446 else :
445447 pg_name_to_nccl_ops [pg_name ] = [current_node .id ]
446- if current_node .id in visited :
447- continue
448448
449- visited .add (current_node .id )
450449 json_node = json_node_map .get (current_node .id )
451450 if not json_node :
452451 continue
You can’t perform that action at this time.
0 commit comments