diff --git a/paddle/fluid/ir/dialect/utils.cc b/paddle/fluid/ir/dialect/utils.cc index 8146ca4e38c68172de1cfb2a334adeb8c0f651b4..3aa2fdca748317680a5afb9b2d137faa5bc9ecd1 100644 --- a/paddle/fluid/ir/dialect/utils.cc +++ b/paddle/fluid/ir/dialect/utils.cc @@ -22,7 +22,7 @@ const std::unordered_set LegacyOpList = { "pd.fused_softmax_mask_upper_triangle_grad", "pd.load_combine", "pd.c_concat", - "pd.load_combine"}; + "pd.c_broadcast_"}; enum class AttrType { UNDEFINED = 0, diff --git a/paddle/phi/api/yaml/legacy_ops.yaml b/paddle/phi/api/yaml/legacy_ops.yaml index e94428cba1c3284ddbd9a5218c2dc8c50befaa46..4d8fd7a6b8f78cff7bf590a9fd9ee0f3078fe65b 100755 --- a/paddle/phi/api/yaml/legacy_ops.yaml +++ b/paddle/phi/api/yaml/legacy_ops.yaml @@ -123,6 +123,16 @@ backward : batch_norm_grad optional : reserve_space +- op : c_broadcast + args : (Tensor x, int ring_id=0, int root=0, bool use_calc_stream=false) + output : Tensor(out) + infer_meta : + func : UnchangedInferMeta + param : [x] + kernel : + func : c_broadcast + inplace : (x -> out) + - op : c_concat args : (Tensor x, int rank, int nranks, int ring_id, bool use_calc_stream, bool use_model_parallel) output : Tensor(out) diff --git a/paddle/phi/api/yaml/op_compat.yaml b/paddle/phi/api/yaml/op_compat.yaml index 7a7cbbc48a62ac65ff220f691922eef924294010..99b03385b719667a8c074616535e1edba7bcfb55 100755 --- a/paddle/phi/api/yaml/op_compat.yaml +++ b/paddle/phi/api/yaml/op_compat.yaml @@ -2990,6 +2990,12 @@ yolo_loss : GetYoloLossExpectedKernelType yolo_loss_grad : GetYoloLossExpectedKernelType +- op: c_broadcast + inputs : + x : X + outputs : + out : Out + - op: channel_shuffle inputs: {x: X}