-
Notifications
You must be signed in to change notification settings - Fork 347
[HandshakeToDC] Add conversion #5214
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 10000 your account
Conversation
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 did a pass over the implementation and dropped a bunch of comments.
I plan to do a more in depth walk through, but so far it looks very nice. Thanks for pushing on this.
// operations which have been converted as legal, and all other operations | ||
// as illegal. | ||
target.markUnknownOpDynamicallyLegal( | ||
[&](Operation *op) { return convertedOps.contains(op); }); |
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.
Are you adding new handshake operations or why is this required?
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.
This is needed for all of the arith
ops that get created as part of the handshake ops (e.g. arith.select
for handshake.mux
). There's a bit of a dilemma here seeing as all operations need to be converted/touched in a handshake.func
- which is done so by UnitRateConversionPattern
(when no other pattern applies). However, we obviously don't want to run that pattern on these newly created ops since they do not have handshake semantics... suggestions are welcome 🙂!
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.
Alright, now I understand the problem. So given the current handshake design, this is indeed necessary.
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 did a pass over the implementation and dropped a bunch of comments.
I plan to do a more in depth walk through, but so far it looks very nice. Thanks for pushing on this.
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 did a pass over the implementation and dropped a bunch of comments.
I plan to do a more in depth walk through, but so far it looks very nice. Thanks for pushing on this.
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 did a pass over the implementation and dropped a bunch of comments.
I plan to do a more in depth walk through, but so far it looks very nice. Thanks for pushing on this.
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 did a pass over the implementation and dropped a bunch of comments.
I plan to do a more in depth walk through, but so far it looks very nice. Thanks for pushing on this.
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 did a pass over the implementation and dropped a bunch of comments.
I plan to do a more in depth walk through, but so far it looks very nice. Thanks for pushing on this.
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 did a pass over the implementation and dropped a bunch of comments.
I plan to do a more in depth walk through, but so far it looks very nice. Thanks for pushing on this.
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 did a pass over the implementation and dropped a bunch of comments.
I plan to do a more in depth walk through, but so far it looks very nice. Thanks for pushing on this.
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.
Woohoo! This looks good to me, nice use of dialect conversion.
... progressive lowering of handshake! This obviously requires a future addition of an `arith-to-comb/hw` pass to map arith stuff to comb/external hardware/pipelines, ...
8fa31c5
to
e5ba263
Compare
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.
LGTM!
// operations which have been converted as legal, and all other operations | ||
// as illegal. | ||
target.markUnknownOpDynamicallyLegal( | ||
[&](Operation *op) { return convertedOps.contains(op); }); |
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.
-->Alright, now I understand the problem. So given the current handshake design, this is indeed necessary.
ConvertedOps *convertedOps) | ||
: OpConversionPattern<OpTy>(typeConverter, context), | ||
convertedOps(convertedOps) {} | ||
mutable ConvertedOps *convertedOps; |
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.
It's a shame that one cannot register listeners on the rewriter to get out the set of created ops in a clean manner.
... progressive lowering of handshake!
This obviously requires a future addition of an
arith-to-comb/hw
pass to map arith stuff to comb/external hardware/pipelines, ...