8000 [HandshakeToDC] Add conversion by mortbopet · Pull Request #5214 · llvm/circt · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

[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

Merged
merged 5 commits into from
May 19, 2023
Merged

Conversation

mortbopet
Copy link
Contributor

... 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, ...

Copy link
Contributor
@Dinistro Dinistro left a 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); });
Copy link
Contributor

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?

Copy link
Contributor Author

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 🙂!

Copy link
Contributor

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.

Copy link
Contributor
@Dinistro Dinistro left a 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.

Copy link
Contributor
@Dinistro Dinistro left a 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.

Copy link
Contributor
@Dinistro Dinistro left a 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.

Copy link
Contributor
@Dinistro Dinistro left a 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.

Copy link
Contributor
@Dinistro Dinistro left a 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.

Copy link
Contributor
@Dinistro Dinistro left a 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.

Copy link
Contributor
@Dinistro Dinistro left a 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.

Copy link
Contributor
@mikeurbach mikeurbach left a 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.

mortbopet added 2 commits May 19, 2023 08:16
... 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, ...
@mortbopet mortbopet force-pushed the dev/mpetersen/handshake_to_dc branch from 8fa31c5 to e5ba263 Compare May 19, 2023 08:21
@mortbopet mortbopet changed the base branch from dev/mpetersen/dc_merge to main May 19, 2023 08:21
Copy link
Contributor
@Dinistro Dinistro left a 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); });
Copy link
Contributor

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;
Copy link
Contributor

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.

@mortbopet mortbopet merged commit fca113c into main May 19, 2023
@darthscsi darthscsi deleted the dev/mpetersen/handshake_to_dc branch June 4, 2024 14:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
0