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

[MLIR] Emit error instead of segfault in current scatter lowering #1217

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

erick-xanadu
Copy link
Contributor

@erick-xanadu erick-xanadu commented Oct 18, 2024

Context: The current scatter lowering makes some assumptions and only handles a subset of the inputs. However, it is too optimistic and will attempt to convert inputs that it can't handle. In particular if there are more than one input update and result tensors, it will segfault. This condition may never happen but it is valid IR. It may never happen if another pass runs before that canonicalizes mhlo.scatter. However, it is good to emit an error in case the canonicalization was not run before.

Description of the Change: Emit error instead of segfaulting

Benefits: No segfaults

Possible Drawbacks: None

Related GitHub Issues:

Depends on #1216

Base automatically changed from eochoa/2024-10-18/small-fix to main October 18, 2024 16:05
@erick-xanadu erick-xanadu force-pushed the eochoa/2024-10-18/exit-early-instead-of-segfault branch from dd276c9 to 953f334 Compare October 18, 2024 16:43
@erick-xanadu erick-xanadu marked this pull request as ready for review October 18, 2024 16:43
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