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
Support 0shape tensor #5620
Merged
Merged
Support 0shape tensor #5620
Conversation
This file contains 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
Signed-off-by: daquexian <daquexian566@gmail.com>
…feat-0shape_tensor Conflicts: python/oneflow/framework/tensor.py
…into feat-0shape_tensor
…feat-0shape_tensor Conflicts: python/oneflow/test/modules/test_acos.py python/oneflow/test/modules/test_acosh.py python/oneflow/test/modules/test_atan.py python/oneflow/test/modules/test_atan2.py python/oneflow/test/modules/test_atanh.py python/oneflow/test/modules/test_tan.py python/oneflow/test_utils/automated_test_util/torch_flow_dual_object.py
lixinqi
reviewed
Jul 31, 2021
lixinqi
approved these changes
Jul 31, 2021
wyg1997
requested review from
oneflow-ci-bot
and removed request for
oneflow-ci-bot
July 31, 2021 10:49
CI failed, removing label automerge |
wyg1997
requested review from
oneflow-ci-bot
and removed request for
oneflow-ci-bot
July 31, 2021 11:33
oneflow-ci-bot
requested review from
oneflow-ci-bot
and removed request for
oneflow-ci-bot
August 1, 2021 04:28
…neflow into feat-0shape_tensor
liufengwei0103
requested review from
oneflow-ci-bot
and removed request for
oneflow-ci-bot
August 1, 2021 04:52
Speed stats:
|
hjchen2
reviewed
Aug 10, 2021
const auto& slice = index_item.slice(); | ||
int64_t step = std::min(slice.step(), shape.At(dim)); | ||
CHECK_GT_OR_RETURN(step, 0) << "Step must be greater than zero."; |
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.
这个不应该删吧,我们就是不支持负数step
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.
这个不应该删吧,我们就是不支持负数step
已修改
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.
本PR支持 0shape Tensor的创建、计算,例如:
TODO
相关issue
#5399 #5537