-
Notifications
You must be signed in to change notification settings - Fork 337
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
Constprop: More unary/binary ops. Also don't crash in divide by Zero. #2862
Constprop: More unary/binary ops. Also don't crash in divide by Zero. #2862
Conversation
Can one of the admins verify this patch? |
9816bdd
to
201dbf4
Compare
Can one of the admins verify this patch? |
201dbf4
to
2cec11f
Compare
Can one of the admins verify this patch? |
2cec11f
to
0d39a93
Compare
Can one of the admins verify this patch? |
0d39a93
to
a971fda
Compare
Can one of the admins verify this patch? |
a971fda
to
a40137e
Compare
Can one of the admins verify this patch? |
Signed-off-by: Tiago Trevisan Jost <tiago.trevisanjost@amd.com>
Signed-off-by: Tiago Trevisan Jost <tiago.trevisanjost@amd.com> Co-authored-by: Matthias Gehre <matthias.gehre@amd.com> Signed-off-by: Tiago Trevisan Jost <tiago.trevisanjost@amd.com>
a40137e
to
670636f
Compare
Can one of the admins verify this patch? |
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.
Thanks for adding all the constant propagation rules for more operations, very useful.
LGTM
@tungld @flemairen6 If we add new operators to generate constants (like in this PR), do we also need to add new operators to the"lazy creation" of our constant values, to ensure we don't blow up our memory requirement for large benchmarks? It would be nice to have some clarity on this. |
@jenkins-droid please test this |
@flemairen6 you have rights to start the Jenkins, correct? |
@AlexandreEichenberger I don't think I have |
Looks line an error in this lit test
If you don't see the error in your normal build environment, try building the RELEASE mode, as it sometimes expose errors. |
will ask for you to be added. |
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.
Thank you for adding support for many ops!
Existing templates in ConstProp can handle constant values in a lazy way. If we do manually, just to make sure to use the OnnxElementsAttrBuilder class and ElementsAttrHelper functions to construct and access ElementsAttr. More info can be found here: https://github.com/onnx/onnx-mlir/blob/main/docs/ConstPropagationPass.md |
@tungld thanks for the link. The doc seems to be out of date, as a grep of |
@ttjost the PR is ready to be merged but there are some conflicts that needs to be manually merged. Do you have the time to do that last step? |
…constprop_for_many_unary_binary_ops_upstream
…ant propagation. Signed-off-by: Tiago Trevisan Jost <tiago.trevisanjost@amd.com>
Can one of the admins verify this patch? |
Apologies for the delay. I made some changes as suggested, and now we use the same approach numpy uses for clip ( |
@AlexandreEichenberger, could you please start Jenkins? |
@jenkins-droid test this please |
Signed-off-by: Tiago Trevisan Jost <tiago.trevisanjost@amd.com>
…ttps://github.com/Xilinx/onnx-mlir into tiagot.constprop_for_many_unary_binary_ops_upstream
Can one of the admins verify this patch? |
@jenkins-droid test this please |
Signed-off-by: Tiago Trevisan Jost <tiago.trevisanjost@amd.com>
Can one of the admins verify this patch? |
@jenkins-droid test this please |
Thanks @tungld . I can't reproduce locally the issues I am seeing in the CI, but it relates to different implementations of some math functions when returning NaN values. Locally and in a local CI I get negative NaN, and in Onnx-MLIR CI it returns me a positive NaN. Hopefully, this now fixes the issues. |
Can one of the admins verify this patch? |
FYI, needed to update the branch but all tests passed previously. |
@jenkins-droid test this please |
PR is ready to merge, but I don't have write access. |
@ttjost I would, for some reason it shows at "out of date" and the usual button to bring it up to date is not present. Can you merge the latest? |
…constprop_for_many_unary_binary_ops_upstream
Can one of the admins verify this patch? |
@jenkins-droid test this please |
could someone please merge this PR? Thanks! |
Merged. Thank you very much for the PR! |
Jenkins Linux s390x Build #15278 [push] Constprop: More unary/bi... started at 03:41 |
Jenkins Linux ppc64le Build #14303 [push] Constprop: More unary/bi... started at 03:53 |
Jenkins Linux amd64 Build #15273 [push] Constprop: More unary/bi... started at 02:41 |
Jenkins Linux amd64 Build #15273 [push] Constprop: More unary/bi... passed after 1 hr 12 min |
Jenkins Linux s390x Build #15278 [push] Constprop: More unary/bi... passed after 1 hr 42 min |
Jenkins Linux ppc64le Build #14303 [push] Constprop: More unary/bi... passed after 2 hr 8 min |
No description provided.