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

[CINN] fix merge bug of infer context #64069

Merged
merged 1 commit into from
May 7, 2024
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -294,15 +294,15 @@ bool GaussianOpInferSymbolicShape(
} else {
pir::Value operand_source = op->operand_source(0);
const symbol::ShapeOrDataDimExprs &operand_shape_or_data =
shape_analysis->GetShapeOrDataForValue(operand_source);
infer_context->GetShapeOrDataForValue(operand_source);
PADDLE_ENFORCE_EQ(
operand_shape_or_data.data().has_value(),
true,
common::errors::InvalidArgument(
"The data of input dim_expr shape is null. When input of empty op "
"is a tensor, the data of input dim_expr shape must have value."));

shape_analysis->SetShapeOrDataForValue(
infer_context->SetShapeOrDataForValue(
op->result(0),
symbol::TensorShapeOrDataDimExprs{
operand_shape_or_data.data().value()});
Expand Down