Skip to content

[mlir][dataflow] IntRange: Bump int-range-analysis widening budget. - #197159

Open
Hardcode84 wants to merge 1 commit into
llvm:mainfrom
Hardcode84:widening-limit
Open

[mlir][dataflow] IntRange: Bump int-range-analysis widening budget.#197159
Hardcode84 wants to merge 1 commit into
llvm:mainfrom
Hardcode84:widening-limit

Conversation

@Hardcode84

@Hardcode84 Hardcode84 commented May 12, 2026

Copy link
Copy Markdown
Contributor

Downstream testing (Triton) found budget is too low on realistic workloads. I'm going to switch to pass option probably, but for now, just bump the budget to unblock things.

See #196616 (comment)

@llvmorg-github-actions

Copy link
Copy Markdown

@llvm/pr-subscribers-mlir

Author: Ivan Butygin (Hardcode84)

Changes

Downstream testing (Triton) found budget is too low on realistic workloads. I'm going to switch to pass option probably, but for now, just bump the budget.

See #196616 (comment)


Full diff: https://github.com/llvm/llvm-project/pull/197159.diff

1 Files Affected:

  • (modified) mlir/lib/Analysis/DataFlow/IntegerRangeAnalysis.cpp (+1-1)
diff --git a/mlir/lib/Analysis/DataFlow/IntegerRangeAnalysis.cpp b/mlir/lib/Analysis/DataFlow/IntegerRangeAnalysis.cpp
index 613772c2b7404..fd3225ed16c0b 100644
--- a/mlir/lib/Analysis/DataFlow/IntegerRangeAnalysis.cpp
+++ b/mlir/lib/Analysis/DataFlow/IntegerRangeAnalysis.cpp
@@ -68,7 +68,7 @@ LogicalResult staticallyNonNegative(DataFlowSolver &solver, Operation *op) {
 /// ratchet pathology this widening exists to cut off (loop-carried ranges
 /// growing by one per worklist visit) terminates after at most this many
 /// extra solver iterations rather than ~2^31.
-static constexpr unsigned kIntegerRangeWideningBudget = 128;
+static constexpr unsigned kIntegerRangeWideningBudget = 1024;
 
 ChangeResult IntegerValueRangeLattice::join(const AbstractSparseLattice &rhs) {
   ChangeResult changed = Lattice::join(rhs);

@boomanaiden154 boomanaiden154 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We were able to resolve the triton regressions by changing the line in https://github.com/triton-lang/triton/blob/36394d4c65a44eec9371012e2d3133107971eae3/third_party/amd/lib/Analysis/RangeAnalysis.cpp#L775

to changed = argLat->join(operLat.getValue());.

@Hardcode84

Copy link
Copy Markdown
Contributor Author

We were able to resolve the triton regressions by changing the line in https://github.com/triton-lang/triton/blob/36394d4c65a44eec9371012e2d3133107971eae3/third_party/amd/lib/Analysis/RangeAnalysis.cpp#L775

to changed = argLat->join(operLat.getValue());.

Cool, thanks. I will keep this PR open and probably switch to pass option later anyway.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants