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

Add missing check that iteration variable has scalar shape. #19334

Closed
wants to merge 1 commit into from

Conversation

copybara-service[bot]
Copy link

Add missing check that iteration variable has scalar shape.

So far, the WhileLoopFusibleSinking pass assumed that the loop iteration
variable returned by the call to GetLoopInductionVarTupleIdx() has a scalar
shape. But with a recent change, this method also detects more complex patterns
for loop induction variables, which can include non-scalar shapes. Add an extra
check so that the assumption in the pass is not broken.

So far, the WhileLoopFusibleSinking pass assumed that the loop iteration
variable returned by the call to GetLoopInductionVarTupleIdx() has a scalar
shape. But with a recent change, this method also detects more complex patterns
for loop induction variables, which can include non-scalar shapes. Add an extra
check so that the assumption in the pass is not broken.

PiperOrigin-RevId: 696421547
@akuegel
Copy link
Member

akuegel commented Nov 14, 2024

Closing this in favor of instead ensuring that the assumption holds.

@akuegel akuegel closed this Nov 14, 2024
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.

1 participant