From fb653fa4d0530d66eb35bc4bef5daf08c5b4de43 Mon Sep 17 00:00:00 2001 From: jiahongyu Date: Thu, 4 Jan 2024 02:20:48 +0000 Subject: [PATCH] [InferSymbolicShape] Delete redundent value_id_to_shapeordata_ --- paddle/pir/dialect/shape/utils/shape_utils.cc | 4 ++-- paddle/pir/dialect/shape/utils/shape_utils.h | 3 --- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/paddle/pir/dialect/shape/utils/shape_utils.cc b/paddle/pir/dialect/shape/utils/shape_utils.cc index 05bbb76db8937..4beb53dde4911 100644 --- a/paddle/pir/dialect/shape/utils/shape_utils.cc +++ b/paddle/pir/dialect/shape/utils/shape_utils.cc @@ -178,13 +178,13 @@ std::string GetValueId(Value* val) { const symbol::ShapeOrDataDimExprs& ShapeConstraintIRAnalysis::GetShapeOrDataForValue(Value* val) { auto val_id = GetValueId(val); - return value_id_to_shapeordata[val_id]; + return value_id_to_shapeordata_[val_id]; } void ShapeConstraintIRAnalysis::SetShapeOrDataForValue( Value* val, const symbol::ShapeOrDataDimExprs& shape_or_data) { auto val_id = GetValueId(val); - value_id_to_shapeordata[val_id] = shape_or_data; + value_id_to_shapeordata_[val_id] = shape_or_data; } } // namespace pir diff --git a/paddle/pir/dialect/shape/utils/shape_utils.h b/paddle/pir/dialect/shape/utils/shape_utils.h index 7e4eafa672276..8f383f3ad6e05 100644 --- a/paddle/pir/dialect/shape/utils/shape_utils.h +++ b/paddle/pir/dialect/shape/utils/shape_utils.h @@ -105,9 +105,6 @@ class IR_API ShapeConstraintIRAnalysis : public ShapeAnalysis { int64_t next_sym_idx_ = 0; std::vector constraints_; - std::unordered_map - value_id_to_shapeordata; - public: explicit ShapeConstraintIRAnalysis(std::shared_ptr&& program) : ShapeConstraintIRAnalysis(program->module_op()) {