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

[InferSymbolicShape] Delete redundant value_id_to_shapeordata_ #60554

Merged
merged 1 commit into from
Jan 4, 2024
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
4 changes: 2 additions & 2 deletions paddle/pir/dialect/shape/utils/shape_utils.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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
3 changes: 0 additions & 3 deletions paddle/pir/dialect/shape/utils/shape_utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -105,9 +105,6 @@ class IR_API ShapeConstraintIRAnalysis : public ShapeAnalysis {
int64_t next_sym_idx_ = 0;
std::vector<symbol::DimExprConstraint> constraints_;

std::unordered_map<std::string, symbol::ShapeOrDataDimExprs>
value_id_to_shapeordata;

public:
explicit ShapeConstraintIRAnalysis(std::shared_ptr<pir::Program>&& program)
: ShapeConstraintIRAnalysis(program->module_op()) {
Expand Down