-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
[Relay] A Normal Form Canonicalization #2251
Conversation
@jroesch is this what you need? |
@siju-samuel @vinx13 @srkreddy1238 please review. |
@MarisaKirisame Given that there are many possible ways to convert Graph to ANF, can you first send an RFC to propose the "normal form" of conversion? We'd better document it properly. |
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 you add some tests?
6ae8ab6
to
63ad4b7
Compare
dbe90d1
to
63270a2
Compare
@vinx13 @srkreddy1238 @tqchen can you guys give one round of review? i had resolved the issues and added more test. |
107a0a5
to
464fe86
Compare
f9e8665
to
028f49a
Compare
327d8d1
to
8d4698e
Compare
@ZihengJiang can you review? |
* | ||
* \return expression in A Normal Form | ||
*/ | ||
Expr ToANF(const Expr& e, const Module& mod); |
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.
Let use use ToANormalForm, so everyone can google and find out what is ANF
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.
What about the python side? It wa to_anf.
@junrushao1994 @ZihengJiang can you help review this PR? |
Will do tonight |
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.
Looks good.
Co-Authored-By: MarisaKirisame <[email protected]>
Co-Authored-By: MarisaKirisame <[email protected]>
Co-Authored-By: MarisaKirisame <[email protected]>
Thanks, @MarisaKirisame @junrushao1994 ! this is now merged |
this pr convert any code in graph_normal_form (has sharing in internal AST) into a_normal_form.