-
Notifications
You must be signed in to change notification settings - Fork 78
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
interactive: when generating new MLContext, set allow_unregistered attribute to default (=false) #3666
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #3666 +/- ##
=======================================
Coverage 91.29% 91.29%
=======================================
Files 466 466
Lines 58332 58332
Branches 5638 5638
=======================================
Hits 53253 53253
Misses 3629 3629
Partials 1450 1450 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why does this break mlir-opt pass? It feels like this isn't actually fixing whatever the real issue is and is at worst a regression.
@@ -26,7 +26,7 @@ def get_new_registered_context( | |||
""" | |||
Generates a new MLContext, registers it and returns it. | |||
""" | |||
ctx = MLContext(True) | |||
ctx = MLContext() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we want to go ahead with this change then could we at least have allow_unregistered_dialect passed in as a command line argument?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think this is the right fix. The problem we discussed is that module {}
, which is a valid spelling of builtin.module {}
in MLIR, is parsed as an unregistered operation, even though it's always registered.
In either case, this PR is missing a filecheck test for |
Ah, is this an MLIR bug and not an xdsl bug? |
But I never tried to parse a
That's why this error is confusing me. |
Made an issue. |
Closing this PR as @alexarice found the bug and opened a new PR to fix it. |
This PR sets the MLContext,
allow_unregistered
attribute to its default, which is false, instead of having it at true.This was causing a weird parsing error that did not allow the
mlir-opt
pass to run --> it was parsingmodule {}
as UnregisteredOp.This fixes it.