Skip to content

Commit 6287357

Browse files
[Arith] Remove diagnostic ctx argument from DetectIterMap (#10798)
1 parent 7896108 commit 6287357

File tree

7 files changed

+57
-131
lines changed

7 files changed

+57
-131
lines changed

include/tvm/arith/iter_affine_map.h

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -276,14 +276,13 @@ class IterSumExpr : public IterMapExpr {
276276
* \param predicate The predicate constraints on the input iterators
277277
* \param require_bijective A boolean flag that indicates whether the mapping should be bijective.
278278
* \param analyzer Analyzer used to get context information.
279-
* \param diag_ctx Diagnostic context.
280279
*
281280
* \return The detected pattern if a match exists,
282281
* otherwise return an empty array.
283282
*/
284283
Array<IterSumExpr> DetectIterMap(const Array<PrimExpr>& indices, const Map<Var, Range>& input_iters,
285284
const PrimExpr& predicate, bool require_bijective,
286-
arith::Analyzer* analyzer, DiagnosticContext diag_ctx);
285+
arith::Analyzer* analyzer);
287286
/*!
288287
* \brief Use IterVarMap detector to rewrite and simplify the indices
289288
*
@@ -335,7 +334,6 @@ Map<Var, PrimExpr> InverseAffineIterMap(const Array<IterSumExpr>& iter_map,
335334
* \param predicate The predicate constraints on the input iterators
336335
* \param require_bijective A boolean flag that indicates whether the mapping should be bijective.
337336
* \param analyzer Analyzer used to get context information.
338-
* \param diag_ctx Diagnostic context.
339337
*
340338
* \return The result list has length len(bindings) + 1
341339
[0, len(bindings)): The iter map matching result. The inner list is of length 2.
@@ -347,8 +345,7 @@ Map<Var, PrimExpr> InverseAffineIterMap(const Array<IterSumExpr>& iter_map,
347345
Array<Array<IterMark>> SubspaceDivide(const Array<PrimExpr>& bindings,
348346
const Map<Var, Range>& input_iters,
349347
const Array<Var>& sub_iters, const PrimExpr& predicate,
350-
bool require_bijective, arith::Analyzer* analyzer,
351-
DiagnosticContext diag_ctx);
348+
bool require_bijective, arith::Analyzer* analyzer);
352349

353350
/*!
354351
* \brief Given an IterMapExpr, transform it to normal PrimExpr.

src/arith/int_set.cc

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -867,10 +867,9 @@ Optional<Array<IntSet>> EstimateRegionLowerBound(const Array<Range>& region,
867867
for (const Range& range : region) {
868868
affine_indices.push_back(range->min);
869869
}
870-
DiagnosticContext diag_ctx(DiagnosticContext::Default(IRModule()));
871870
iter_sum_exprs = DetectIterMap(
872871
/*indices=*/affine_indices, /*input_iters=*/var_dom,
873-
/*predicate=*/predicate, /*require_bijective=*/false, analyzer, diag_ctx);
872+
/*predicate=*/predicate, /*require_bijective=*/false, analyzer);
874873
}
875874
if (iter_sum_exprs.empty()) {
876875
return NullOpt;

0 commit comments

Comments
 (0)