Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Pir] Add ReduceScatter Yaml Definition #58991

Merged
merged 3 commits into from
Nov 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions paddle/fluid/pir/dialect/op_generator/ops_api_gen.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@
'c_embedding',
'c_identity',
'c_reduce_sum',
'c_reducescatter',
'dpsgd',
'embedding_grad_sparse',
'fused_batch_norm_act_',
Expand Down
10 changes: 10 additions & 0 deletions paddle/fluid/pir/dialect/operator/ir/ops.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,16 @@
backend: place>
data_type : dtype

- op : c_reducescatter
args : (Tensor x, int ring_id = 0, int nranks = 1, bool use_calc_stream = false)
output : Tensor(out)
infer_meta :
func : ReduceScatterInferMeta
param: [x, nranks]
kernel :
func : reduce_scatter
param: [x, nranks]
JZ-LIANG marked this conversation as resolved.
Show resolved Hide resolved

- op : embedding_grad_sparse
args : (Tensor x, Tensor weight, Tensor out_grad, int64_t padding_idx = -1, bool sparse = false)
output : SelectedRows(weight_grad)
Expand Down