Skip to content

Adding affinity solver max iterations flag and upping default. - #20923

Merged
benvanik merged 1 commit into
mainfrom
users/benvanik/affinity-solver-flag
May 29, 2025
Merged

benvanik merged 1 commit into
mainfrom
users/benvanik/affinity-solver-flag

Conversation

@benvanik

Copy link
Copy Markdown
Collaborator

--iree-stream-affinity-solver-max-iterations=N will allow an easy way to isolate analysis failures to the solver iteration count. Now that CloneToConsumersPass isn't running the solver itself in a loop (much) it's less scary to up the default, though it's still risky in the failure cases as it could lead to very long times to failure.

The proper solution is to reduce the iteration count by somehow dealing with very long tied op chains that pass through multiple affinities.

@benvanik
benvanik requested review from ScottTodd and hanhanW May 29, 2025 00:16
@benvanik
benvanik marked this pull request as ready for review May 29, 2025 00:25
Base automatically changed from users/benvanik/affinity-cleanup to main May 29, 2025 00:42
`--iree-stream-affinity-solver-max-iterations=N` will allow an easy way
to isolate analysis failures to the solver iteration count. Now that
CloneToConsumersPass isn't running the solver itself in a loop (much)
it's less scary to up the default, though it's still risky in the
failure cases as it could lead to _very_ long times to failure.

The proper solution is to reduce the iteration count by somehow
dealing with very long tied op chains that pass through multiple
affinities.
@benvanik
benvanik force-pushed the users/benvanik/affinity-solver-flag branch from 480e558 to 7df32d9 Compare May 29, 2025 00:43
@benvanik
benvanik enabled auto-merge (squash) May 29, 2025 00:44
@benvanik
benvanik disabled auto-merge May 29, 2025 01:15
@benvanik
benvanik merged commit 676115d into main May 29, 2025
@benvanik
benvanik deleted the users/benvanik/affinity-solver-flag branch May 29, 2025 14:26
AWoloszyn pushed a commit that referenced this pull request Dec 1, 2025
`--iree-stream-affinity-solver-max-iterations=N` will allow an easy way
to isolate analysis failures to the solver iteration count. Now that
CloneToConsumersPass isn't running the solver itself in a loop (much)
it's less scary to up the default, though it's still risky in the
failure cases as it could lead to _very_ long times to failure.

The proper solution is to reduce the iteration count by somehow dealing
with very long tied op chains that pass through multiple affinities.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants