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 extra check in GenericOp::verify #1579

Merged
merged 1 commit into from
Mar 19, 2025

Conversation

j2kun
Copy link
Collaborator

@j2kun j2kun commented Mar 19, 2025

Extracted from #1552

When doing context-aware dialect conversion, sometimes the GenericOp's body can be detached from the op while the conversion is ongoing. When that happens, if the framework tries to verify the generic op, say, when attempting to dump the IR, this verification hook will fail because the region is empty and has no blocks. This extra check allows the verification to fail gracefully.

When doing context-aware dialect conversion, sometimes the GenericOp's
body can be detached from the op while the conversion is ongoing.  When
that happens, if the framework tries to verify the generic op, say,
when attempting to dump the IR, this verification hook will fail because
the region is empty and has no blocks. This extra check allows the
verification to fail gracefully.
@j2kun j2kun added the pull_ready Indicates whether a PR is ready to pull. The copybara worker will import for internal testing label Mar 19, 2025
@copybara-service copybara-service bot merged commit 73da5ad into google:main Mar 19, 2025
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pull_ready Indicates whether a PR is ready to pull. The copybara worker will import for internal testing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants