This repository was archived by the owner on Nov 17, 2023. It is now read-only.
Numpy unique repeat indices large tensor checks#19382
Merged
Zha0q1 merged 11 commits intoapache:masterfrom Dec 3, 2020
Merged
Conversation
|
Hey @Zha0q1 , Thanks for submitting the PR
CI supported jobs: [website, unix-cpu, sanity, windows-cpu, edge, clang, windows-gpu, unix-gpu, miscellaneous, centos-cpu, centos-gpu] Note: |
…to numpy_unique_repeat_indices
access2rohit
reviewed
Dec 1, 2020
| << "_npi_indices dimensions the number of dim must not be less than 0"; | ||
| mxnet::TShape param_dim = param.dimensions; | ||
| if (!shape_is_known(param_dim)) return false; | ||
| CHECK_LT(param_dim.Size(), INT32_MAX) << "ValueError: np.indices does not support large" |
Contributor
There was a problem hiding this comment.
can you change the message to “does not support input(s) containing elements >=2^31”
…_unique_repeat_indices
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
This pr adds large tensor checks to numpy unique, indices, and repeat. Those ops are running very slowly on large tensors (>20mins) so we might just block such use cases. If in the future there is a valid LT use case we will need to consider optimize the performance and remove those size checks