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

core: Allow unregistered citizens in a registered dialects #2161

Merged
merged 4 commits into from
Feb 20, 2024

Conversation

PapyChacal
Copy link
Collaborator

Currently, when looking for an operation/attribute, even in "allow unregistered dialect" mode, we aggressively error out on an unregistered operation/attribute, if it so happens to have a dialect name of a registered dialect. This PR relaxes this.

@PapyChacal PapyChacal added the core xDSL core (ir, textual format, ...) label Feb 14, 2024
@PapyChacal PapyChacal requested a review from math-fehr February 14, 2024 16:36
@PapyChacal PapyChacal self-assigned this Feb 14, 2024
Copy link

codecov bot commented Feb 14, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (30b0559) 89.38% compared to head (c71b8ff) 89.38%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2161      +/-   ##
==========================================
- Coverage   89.38%   89.38%   -0.01%     
==========================================
  Files         317      317              
  Lines       38534    38530       -4     
  Branches     5696     5694       -2     
==========================================
- Hits        34445    34441       -4     
  Misses       3287     3287              
  Partials      802      802              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@PapyChacal PapyChacal marked this pull request as ready for review February 14, 2024 17:10
xdsl/ir/core.py Outdated Show resolved Hide resolved
Copy link
Collaborator

@webmiche webmiche left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a use case for this? Could you add a test?

@webmiche
Copy link
Collaborator

Ah, I see you link from the devito stuff. I guess that's the usecase 😅

@PapyChacal
Copy link
Collaborator Author

More generally, without this, it means that any dialect implementing any op or attr, would require any other op or attr to be actually implemented for unregistered interoperability with MLIR. I don't see any bright future for xDSL as a prototyping platform with such a constraint!
Will add a test clarifying this :)

Copy link
Collaborator

@math-fehr math-fehr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

@PapyChacal PapyChacal merged commit 324f02a into main Feb 20, 2024
10 checks passed
@PapyChacal PapyChacal deleted the emilien/unregistered-citizen branch February 20, 2024 11:58
superlopuh pushed a commit that referenced this pull request Feb 22, 2024
Currently, when looking for an operation/attribute, even in "allow
unregistered dialect" mode, we aggressively error out on an unregistered
operation/attribute, if it so happens to have a dialect name of a
registered dialect. This commit relaxes this.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core xDSL core (ir, textual format, ...)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants