Skip to content

Commit f9fa267

Browse files
authored
[CINN] Sync EqualAllOpInferSymbolicShape with InferMeta (PaddlePaddle#76477)
1 parent 16abfc4 commit f9fa267

File tree

2 files changed

+0
-13
lines changed

2 files changed

+0
-13
lines changed

paddle/fluid/pir/dialect/operator/interface/infer_symbolic_shape/binary_infer_sym.cc

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -790,17 +790,6 @@ bool EmbeddingOpInferSymbolicShape(
790790

791791
bool EqualAllOpInferSymbolicShape(
792792
pir::Operation *op, pir::InferSymbolicShapeContext *infer_context) {
793-
const auto &x_dims =
794-
infer_context->GetShapeOrDataForValue(op->operand_source(0)).shape();
795-
const auto &y_dims =
796-
infer_context->GetShapeOrDataForValue(op->operand_source(1)).shape();
797-
798-
PADDLE_ENFORCE_GE(
799-
x_dims.size(),
800-
y_dims.size(),
801-
common::errors::InvalidArgument(
802-
"The size of dim_y should not be greater than dim_x's."));
803-
804793
std::vector<symbol::DimExpr> out_dims =
805794
{}; // Adjust the dimensions as necessary
806795
infer_context->SetShapeOrDataForValue(

paddle/phi/infermeta/binary.cc

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -521,8 +521,6 @@ void CompareInferMeta(const MetaTensor& x,
521521
void CompareAllInferMeta(const MetaTensor& x,
522522
const MetaTensor& y,
523523
MetaTensor* out) {
524-
auto dim_x = x.dims();
525-
auto dim_y = y.dims();
526524
out->share_lod(x);
527525
out->set_dims(common::make_ddim({}));
528526
}

0 commit comments

Comments
 (0)