-
Notifications
You must be signed in to change notification settings - Fork 123
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
Fwddiff ret_activity canonicalizations #2271
base: main
Are you sure you want to change the base?
Conversation
class FwdRetDupNNToConstNN final : public OpRewritePattern<ForwardDiffOp> { | ||
public: | ||
using OpRewritePattern<ForwardDiffOp>::OpRewritePattern; | ||
|
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.
can we simplify this by having one pattern that does all of these, and not needing to create all the separate prologue/epilogues?
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.
We could do that, but i.m.o. the epilogue part becomes hairy (especially if we want to handle dup
--> constnoneed
- you are eliminating 2 return values as compared to 1). All transforms here strictly reduce number of args by 1.
I'll still give it a go.
@@ -19,6 +19,7 @@ target_link_libraries(enzymemlir-translate | |||
MLIRSPIRVDialect | |||
MLIRTranslateLib | |||
MLIRSupport | |||
"ZLIB::ZLIB" |
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.
is this needed?
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.
cmake build fails without that, so for now I just added it as a quick fix
Simplifies return activity whenever legal.
tagging @jhueckelheim