-
Notifications
You must be signed in to change notification settings - Fork 3.7k
[BugFix][TVMScript] Fix the roundtripability of intrinsic pow #13692
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
|
Thanks for contributing to TVM! Please refer to the contributing guidelines https://tvm.apache.org/docs/contribute/ for useful information and tips. Please request code reviews from Reviewers by @-ing them in a comment.
Generated by tvm-bot |
|
@tvm-bot rerun |
| assert "-> None" not in script | ||
|
|
||
|
|
||
| def test_pow_roundtripable(): |
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.
Could you please use the ir_generator to make tests consistent in this file?
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.
Okay.
junrushao
left a comment
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.
LGTM. Please address comments from @Hzfengsy
|
BTW, there are some existing logics that depend on the python API |
|
Do you mean that users can use both |
| nextafter = _op_wrapper(_tir_op.nextafter) | ||
| popcount = _op_wrapper(_tir_op.popcount) | ||
| power = _op_wrapper(_tir_op.power) | ||
| pow = _op_wrapper(_tir_op.power) # pylint: disable=redefined-builtin |
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 was thinking if we could add a pow method to tvm/tir/op.py so that it could be consistent
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.
Done.
…#13692) * Fix the roundtripability of pow intrinsic. * fix the lint. * Fix the lint. * add tir.pow to make it consistent. Co-authored-by: lightzhan-intellif <[email protected]>
Hi,
This is a bug fix discussed here. Any further suggestion is welcome.
cc @junrushao