@@ -447,7 +447,7 @@ def _pir_overlap_send_recv(program):
447
447
The finally target of this function is as follows:
448
448
1. no need to insert the 'c_sync_calc' and 'c_sync_calc' operators
449
449
2. 'send_v2' operator uses 'dist_attr.execution_stream' to set stream of its own.
450
- 3. 'recv_v2 ' operator uses 'dist_attr.execution_stream' to set stream of its own.
450
+ 3. 'p_recv ' operator uses 'dist_attr.execution_stream' to set stream of its own.
451
451
"""
452
452
for block in program .blocks :
453
453
for op in block .ops :
@@ -457,7 +457,7 @@ def _pir_overlap_send_recv(program):
457
457
ring_id = op .attrs ()["ring_id" ]
458
458
op .set_execution_stream (f"send_stream_{ ring_id } " )
459
459
op .set_scheduling_priority (0 )
460
- elif op .name () == "pd_op.recv_v2 " :
460
+ elif op .name () == "pd_op.p_recv " :
461
461
op .set_bool_attr ("dynamic_shape" , False )
462
462
op .set_bool_attr ("use_calc_stream" , True )
463
463
op .set_execution_stream ("recv_stream" )
@@ -468,7 +468,7 @@ def _insert_sync_for_fthenb_1f1b(program, dist_context=None):
468
468
"""
469
469
This implementation refers to lots of Paddle/python/paddle/base/optimizer.py.
470
470
The difference between this function with 'PipelineOptimizer' is that
471
- 'send_v2' op and 'recv_v2 ' op have been inserted in program by 'reshard'.
471
+ 'send_v2' op and 'p_recv ' op have been inserted in program by 'reshard'.
472
472
"""
473
473
474
474
for block in program .blocks :
@@ -482,7 +482,7 @@ def _insert_sync_for_fthenb_1f1b(program, dist_context=None):
482
482
# insert sync ops
483
483
for index , op in enumerate (list (block .ops )):
484
484
# NOTE: pipeline might hang when dynamic_shape is True
485
- if op .type in ['send_v2' , 'recv_v2 ' ]:
485
+ if op .type in ['send_v2' , 'p_recv ' ]:
486
486
op ._set_attr ("dynamic_shape" , False )
487
487
# set send op on comm stream
488
488
if op .type == 'send_v2' :
@@ -556,7 +556,7 @@ def _insert_sync_for_fthenb_1f1b(program, dist_context=None):
556
556
offset = 0
557
557
backward_recv_index = None
558
558
for index , op in enumerate (block .ops ):
559
- if op .type == "recv_v2 " and is_backward_op (op ):
559
+ if op .type == "p_recv " and is_backward_op (op ):
560
560
backward_recv_index = index
561
561
break
562
562
if backward_recv_index is None :
@@ -917,7 +917,7 @@ def _add_event_dependency(recorder_op, waiter_op):
917
917
'''
918
918
Add the extra event dependency of the two operators.
919
919
This function mainly aims for the cross-programs in pipeline parallelism,
920
- especial for the 'send_v2' 'recv_v2 ' etc.
920
+ especial for the 'send_v2' 'p_recv ' etc.
921
921
'''
922
922
if not recorder_op .dist_attr .force_record_event :
923
923
recorder_op .dist_attr .force_record_event = True
0 commit comments