Add Range op to ONNX, make tvm arange shape_func support negative steps#6647
Merged
tmoreau89 merged 1 commit intoapache:masterfrom Oct 8, 2020
Merged
Conversation
tmoreau89
approved these changes
Oct 7, 2020
Contributor
tmoreau89
left a comment
There was a problem hiding this comment.
Thanks @mbrookhart adding op support in onnx importer. LGTM
jwfromm
reviewed
Oct 7, 2020
| if step[0] < 0: | ||
| out[0] = int64(ceil_div((int64(start[0]) - int64(stop[0])), int64(-step[0]))) | ||
| else: | ||
| out[0] = int64(ceil_div((int64(stop[0]) - int64(start[0])), int64(step[0]))) |
Contributor
There was a problem hiding this comment.
It might be a good idea to add some tests for range with negative steps elsewhere besides the onnx importer (probably test_op_level3.py).
Contributor
Author
There was a problem hiding this comment.
It looks like there are already tests with negative steps in test_op_level3.py, they just weren't hitting the shape_func
Contributor
There was a problem hiding this comment.
Ok sounds good, thanks for confirming that!
jwfromm
approved these changes
Oct 8, 2020
Contributor
|
Thanks @mbrookhart @jwfromm the PR has been merged! |
TusharKanekiDey
pushed a commit
to TusharKanekiDey/tvm
that referenced
this pull request
Oct 13, 2020
TusharKanekiDey
pushed a commit
to TusharKanekiDey/tvm
that referenced
this pull request
Oct 14, 2020
TusharKanekiDey
pushed a commit
to TusharKanekiDey/tvm
that referenced
this pull request
Oct 15, 2020
TusharKanekiDey
pushed a commit
to TusharKanekiDey/tvm
that referenced
this pull request
Oct 15, 2020
TusharKanekiDey
pushed a commit
to TusharKanekiDey/tvm
that referenced
this pull request
Oct 16, 2020
trevor-m
pushed a commit
to neo-ai/tvm
that referenced
this pull request
Oct 19, 2020
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
cc @icemelon9 @masahi @tmoreau89 @jwfromm