Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
co63oc committed Sep 23, 2024
1 parent b299a46 commit e069aa8
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
10 changes: 10 additions & 0 deletions paddle/phi/ops/yaml/inconsistent/dygraph_ops.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -326,6 +326,16 @@
inplace : (x -> out)
backward : subtract_grad

- op : sync_comm_stream
args : (Tensor[] x, int ring_id = 0)
output : Tensor[](out){x.size()}
infer_meta :
func : UnchangedVectorInferMeta
param : [x]
kernel :
func : sync_comm_stream
data_type : DataType::FLOAT32

- op : tile
args : (Tensor x, IntArray repeat_times = {})
output : Tensor(out)
Expand Down
4 changes: 1 addition & 3 deletions python/paddle/distributed/communication/group.py
Original file line number Diff line number Diff line change
Expand Up @@ -255,9 +255,7 @@ def _sync_calc_stream(tensor):

def _sync_comm_stream(tensor, ring_id=0):
if framework.in_dynamic_mode():
return paddle._legacy_C_ops.sync_comm_stream(
[tensor], [tensor], 'ring_id', ring_id
)
return paddle._C_ops.sync_comm_stream([tensor], ring_id)
else:
op_type = 'c_sync_comm_stream'
helper = framework.LayerHelper(op_type, **locals())
Expand Down

0 comments on commit e069aa8

Please sign in to comment.