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: add CallableOpInterface and use in interpreter #1166

Merged
merged 1 commit into from
Jun 21, 2023

Conversation

superlopuh
Copy link
Member

Just the bare minimum in terms of functionality for now.

@superlopuh superlopuh added the core xDSL core (ir, textual format, ...) label Jun 20, 2023
@superlopuh superlopuh self-assigned this Jun 20, 2023
@codecov
Copy link

codecov bot commented Jun 20, 2023

Codecov Report

Patch coverage: 42.30% and project coverage change: -0.03 ⚠️

Comparison is base (80612f9) 88.62% compared to head (db4e5d6) 88.59%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1166      +/-   ##
==========================================
- Coverage   88.62%   88.59%   -0.03%     
==========================================
  Files         156      158       +2     
  Lines       22022    22083      +61     
  Branches     3307     3315       +8     
==========================================
+ Hits        19516    19565      +49     
- Misses       1975     1985      +10     
- Partials      531      533       +2     
Impacted Files Coverage Δ
docs/Toy/toy/interpreter.py 55.84% <0.00%> (+1.62%) ⬆️
xdsl/interpreter.py 71.25% <14.28%> (-5.37%) ⬇️
docs/Toy/toy/dialects/toy.py 68.12% <71.42%> (-0.19%) ⬇️
xdsl/traits.py 88.52% <100.00%> (+0.80%) ⬆️

... and 2 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

Copy link
Collaborator

@PapyChacal PapyChacal left a comment

Choose a reason for hiding this comment

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

I have a minor API disagreement, otherwise exciting, thanks!

Comment on lines +336 to +338
if isinstance(op, str):
name = op
op = self.get_op_for_symbol(op)
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think it's a trap!
CallableOp is not SymbolOp. But I've always seen them used in pairs.. not sure what to do in the long run, but I would just restrict call_op to CallableOp here

Copy link
Member Author

Choose a reason for hiding this comment

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

Seems like it should be ok, this function accepts ops that are not symbol ops

Copy link
Collaborator

Choose a reason for hiding this comment

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

Oh right, it's not the proper SymbolRefAttr fetching just yet.
I can leave with polishing later then 👍

xdsl/traits.py Show resolved Hide resolved
docs/Toy/toy/dialects/toy.py Show resolved Hide resolved
@superlopuh superlopuh merged commit 68f1d3a into main Jun 21, 2023
@superlopuh superlopuh deleted the sasha/traits/callable-op branch June 21, 2023 07:04
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.

3 participants