-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Skip stride check if shape is 1 in IsContiguous #13121
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 |
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.
Please also add a unittest
|
Hi Lite, can you please fix the linting issue? |
6ae6202 to
64d3843
Compare
Skip stride check if shape[k] is 1, where the dimension is contiguous regardless of the value of stride. For example, PyTorch will normalize stride to 1 if shape is 1.
64d3843 to
89723a3
Compare
|
I fixed lint and added few unit tests |
zxybazh
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.
Skip checking stride if shape is 1 in IsContiguous Skip stride check if shape[k] is 1, where the dimension is contiguous regardless of the value of stride. For example, PyTorch will normalize stride to 1 if shape is 1.
Skip checking stride if shape is 1 in IsContiguous Skip stride check if shape[k] is 1, where the dimension is contiguous regardless of the value of stride. For example, PyTorch will normalize stride to 1 if shape is 1.
Skip checking stride if shape is 1 in IsContiguous Skip stride check if shape[k] is 1, where the dimension is contiguous regardless of the value of stride. For example, PyTorch will normalize stride to 1 if shape is 1.
Skip stride check if shape[k] is 1, where the dimension is contiguous regardless of the value of stride.
For example, PyTorch will normalize stride to 1 if shape is 1.
Related: pytorch/pytorch@ec42ee0
cc @junrushao @zxybazh