-
Notifications
You must be signed in to change notification settings - Fork 65
feat(atenlib): op(trunc) #515
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
Conversation
Codecov Report
@@ Coverage Diff @@
## main #515 +/- ##
==========================================
+ Coverage 72.71% 72.72% +0.01%
==========================================
Files 109 109
Lines 10686 10689 +3
Branches 1102 1102
==========================================
+ Hits 7770 7774 +4
+ Misses 2612 2611 -1
Partials 304 304
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
raise NotImplementedError() | ||
# Reference https://github.com/onnx/onnx/issues/4588#issuecomment-1463970126 | ||
integer_parts = op.Floor(op.Abs(self)) | ||
is_negative = op.Less(self, 0.0) |
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.
side note: the number (0.0
) being scripted as constant + castlike
seems like a common and important pattern. Let's mention this in the authoring guide. (and onnxscript itself too if not already)
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.
ok!
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.
@@ -389,6 +389,7 @@ def _where_input_wrangler( | |||
"tan": core_ops.aten_tan, | |||
"tanh": core_ops.aten_tanh, | |||
"topk": core_ops.aten_topk, | |||
"trunc": core_ops.aten_trunc, |
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 wonder if there is anything we can do to improve the clarity on actual test cases. Seems hard to check what are the inputs coverage without running it.
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.
Any suggestions? What kind of information will be useful?
aten::trunc