-
Notifications
You must be signed in to change notification settings - Fork 106
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
Implement indexing operations in PyTorch #910
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #910 +/- ##
=======================================
Coverage 81.73% 81.74%
=======================================
Files 182 183 +1
Lines 47633 47724 +91
Branches 11604 11616 +12
=======================================
+ Hits 38934 39011 +77
- Misses 6509 6520 +11
- Partials 2190 2193 +3
|
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.
This is looking pretty good! Some change requests and suggestions to make the tests more robust.
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.
Getting there, some smaller feedback this time
d454052
to
38c916a
Compare
@HarshvirSandhu I pushed some simplification and also needed special logic for repeated indices in IncSubtensor. Feel free to review and see if you spot any issues. Note that I squashed the commits and force-pushed, so you'll have to retrieve the remote branch before you can do any changes |
Co-authored-by: Ricardo Vieira <28983449+ricardov94@users.noreply.github.com>
38c916a
to
b38a01c
Compare
if not inplace: | ||
x = x.clone() | ||
x[indices] = y | ||
return x |
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.
This works for me locally, are you sure it wasn't working on your end?
Implement indexing ops in pytorch
Description
Related Issue
Checklist
Type of change