Skip to content

Conversation

xadupre
Copy link
Member

@xadupre xadupre commented Mar 25, 2024

No description provided.

matcher=lambda sample: not (sample.args[0][0].dtype == torch.int64),
reason="this Aten overload only supports tensor(int) as indices",
)
TorchLibOpInfo(

Check failure

Code scanning / CodeQL

Syntax error

Syntax Error (in Python 3).
reason="this Aten overload only supports tensor(int) as indices",
)
TorchLibOpInfo(
"_unsafe_index_put",
Copy link
Collaborator

@justinchuby justinchuby Mar 25, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since it looks like it is the same as index_put, we can actually make it the same function.

If for any reason we believe they could behave differently or if we want to safeguard the implementation, I would create test cases in extra_opinfo.py to run it against torch.ops.aten._unsafe_index_put (Looks like _unsafe_index_put does not exist in https://github.com/pytorch/pytorch/blob/main/torch/testing/_internal/common_methods_invocations.py so we may need to create our own test cases)

@justinchuby
Copy link
Collaborator

Curious what is unsafe about this op itself?

Copy link

codecov bot commented Mar 25, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 62.08%. Comparing base (ce3eb4a) to head (93ad32c).
Report is 24 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff             @@
##             main    #1314       +/-   ##
===========================================
- Coverage   78.68%   62.08%   -16.61%     
===========================================
  Files         119      117        -2     
  Lines       15762    14922      -840     
  Branches     2486     2372      -114     
===========================================
- Hits        12403     9264     -3139     
- Misses       2950     5318     +2368     
+ Partials      409      340       -69     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@xadupre
Copy link
Member Author

xadupre commented Mar 25, 2024

Dropped for #1315.

@xadupre xadupre closed this Mar 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Development

Successfully merging this pull request may close these issues.

2 participants