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

【auto parallel】custom op spmd infer add args check #60633

Merged
Merged
Changes from 1 commit
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
Prev Previous commit
add bound check
  • Loading branch information
liuzhenhai93 committed Jan 9, 2024
commit 7d954747ff42834871344a4eeccccb535093a91f
1 change: 1 addition & 0 deletions paddle/phi/api/ext/spmd_infer.h
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ struct SpmdInferImpl<phi::distributed::SpmdInfo (*)(Args...), impl_fn> {
const std::vector<CustomSpmdInferTensorArg>& inputs,
const std::vector<CustomSpmdInferAttrArg>& attrs,
PreviousArgs&... pargs) {
static_assert(attr_idx == 0, "attributes must come after tensor inputs");
PD_INFER_SPMD_CHECK_INPUTS_SIZE_GT(inputs, in_idx);
auto& arg = PADDLE_GET_CONST(
std::vector<phi::distributed::DistMetaTensor>, inputs[in_idx]);
Expand Down