-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
[NNVM][ONNX] Slice, Floor, Ceil, Clip and MatMul support for frontend #1297 #1371
Conversation
please request review from the reviewers |
@Huyuwei @masahi @zhreshold please review. |
is the last commit related to this PR? |
Yes. I wish to conclude this PR here. |
But how floor, clip, MatMul etc. relate to Slice op? |
I am working on upgrading ONNX frontend with new ops available recently. Started of with slice :) |
I could raise another PR if needed. |
Then edit the title accordingly. |
@masahi Changed the title. Thanks |
nnvm/python/nnvm/frontend/onnx.py
Outdated
else: | ||
new_axes.append(i) | ||
new_starts.append(0) | ||
new_ends.append(10000) # very big number |
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.
how does strided_slice handle the end index? BTW, 10000 is definitely not big enough
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.
updated intmax instead of 10000.
strided_slice adjusts the end index based on the input tensor size.
Please check.
@@ -477,7 +518,7 @@ def _get_convert_map(opset): | |||
'SpatialBN': BatchNorm.get_converter(opset), | |||
|
|||
# defs/generator | |||
# 'Constant' | |||
# 'Constant' # Implemented |
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 is this change?
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.
Already implemented but it's not part of conversion map. Hence marked as Implemented.
_test_slice_iteration(x, x[:, :, 3:4], (0, 0, 3), (20, 10, 4)) | ||
_test_slice_iteration(x, x[:, 1:1000], (1), (1000), (1)) | ||
_test_slice_iteration(x, x[:, 0:-1], (0), (-1), (1)) | ||
#_test_slice_iteration(x, x[:, 1000:1000], (1000), (1000), (1)) |
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.
You should enable or remove this line
@masahi thanks for the review. |
@tqchen can you merge this ? |
Thanks for contributing to TVM! Please refer to guideline https://docs.tvm.ai/contribute/ for useful information and tips. After the pull request is submitted, please request code reviews from others in the community.