-
Notifications
You must be signed in to change notification settings - Fork 685
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
[pytorch] Advanced indexing that supports all indexing features on PyTorch #1719
Merged
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
frankfliu
reviewed
Jun 17, 2022
07a4c27
to
82d282a
Compare
zachgk
reviewed
Jun 22, 2022
engines/pytorch/pytorch-engine/src/main/java/ai/djl/pytorch/jni/JniUtils.java
Outdated
Show resolved
Hide resolved
stu1130
reviewed
Jun 23, 2022
engines/pytorch/pytorch-native/src/main/native/ai_djl_pytorch_jni_PyTorchLibrary_tensor.cc
Outdated
Show resolved
Hide resolved
33a78d1
to
4a0196a
Compare
Codecov Report
@@ Coverage Diff @@
## master #1719 +/- ##
============================================
- Coverage 72.08% 70.62% -1.47%
- Complexity 5126 5562 +436
============================================
Files 473 527 +54
Lines 21970 24691 +2721
Branches 2351 2680 +329
============================================
+ Hits 15838 17438 +1600
- Misses 4925 5922 +997
- Partials 1207 1331 +124
Continue to review full report at Codecov.
|
da86a85
to
072c39a
Compare
Co-authored-by: Frank Liu <frankfliu2000@gmail.com>
…iour; The previous commit: PtNDManager.from() bug fixed.
…ines:pytorch:pytorch-jni
Change-Id: I5a7287719a8deedbfefa4181dc79e72d78410d49
frankfliu
approved these changes
Jun 27, 2022
zachgk
approved these changes
Jun 27, 2022
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.
Description
Full support of pytorch indexing.
This PR enables all indexing features in pytorch. The indexing behaviour is guaranteed to be consistent, especially when mixed indices are passed.
Demo example
See the following code for demo
djl/integration/src/main/java/ai/djl/integration/tests/ndarray/NDIndexTest.java
Lines 153 to 178 in f040c38
The pytorch doc:
C indexing API
source
The relevant preceeding PRs:
Support of take from pytorch #1627
Add support of take on MXNet engine #1649