File tree 3 files changed +11
-0
lines changed
cinn/hlir/dialect/operator/transforms/lowering_pass
include/dialect/shape/utils
3 files changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -234,6 +234,7 @@ CreateGroupShapeOrDataExprs(
234
234
235
235
local_shape_analysis.RegisterSymbolConstraintFromShapeAnalysis (
236
236
global_shape_analysis);
237
+ local_shape_analysis.ClearOpInferSymbolicShapeCache ();
237
238
for (const auto & item : dim_expr_map) {
238
239
local_shape_analysis.AddEqualCstr (item.first , item.second );
239
240
}
Original file line number Diff line number Diff line change @@ -136,6 +136,8 @@ class IR_API InferSymbolicShapeContext {
136
136
std::optional<InferSymbolicShapeCacheValue> GetOpInferSymbolicShapeCache (
137
137
const InferSymbolicShapeCacheKey& op_infer_cache_key) const ;
138
138
139
+ void ClearOpInferSymbolicShapeCache ();
140
+
139
141
const symbol::ConstraintsManager& constraints_manager () const {
140
142
return constraints_manager_;
141
143
}
@@ -250,6 +252,10 @@ class IR_API ShapeConstraintIRAnalysis final
250
252
return context_.constraints_manager ();
251
253
}
252
254
255
+ void ClearOpInferSymbolicShapeCache () {
256
+ context_.ClearOpInferSymbolicShapeCache ();
257
+ }
258
+
253
259
void SetInputDynamicDimSpec (
254
260
const std::vector<InputDynamicDimSpec>& input_dynamic_dim_spec);
255
261
Original file line number Diff line number Diff line change @@ -480,6 +480,10 @@ InferSymbolicShapeContext::GetOpInferSymbolicShapeCache(
480
480
return std::nullopt;
481
481
}
482
482
483
+ void InferSymbolicShapeContext::ClearOpInferSymbolicShapeCache () {
484
+ infer_symbolic_shape_cache_.clear ();
485
+ }
486
+
483
487
bool InferSymbolicShapeContext::HasPredefinedDimExprForInputName (
484
488
const std::string& input_name) const {
485
489
return predefined_dimexpr_map_for_inputs_.count (input_name) != 0 ;
You can’t perform that action at this time.
0 commit comments