-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
Skip stride check if shape is 1 in IsContiguous #13121
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 |
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 |
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