Skip to content

Add support for _unsafe_index_put#1315

Merged
justinchuby merged 7 commits intomicrosoft:mainfrom
xadupre:llama
Mar 26, 2024
Merged

Add support for _unsafe_index_put#1315
justinchuby merged 7 commits intomicrosoft:mainfrom
xadupre:llama

Conversation

@xadupre
Copy link
Copy Markdown
Member

@xadupre xadupre commented Mar 25, 2024

No description provided.

@codecov
Copy link
Copy Markdown

codecov Bot commented Mar 25, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 78.52%. Comparing base (ce3eb4a) to head (b4f36d0).
Report is 26 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1315      +/-   ##
==========================================
- Coverage   78.68%   78.52%   -0.17%     
==========================================
  Files         119      119              
  Lines       15762    15799      +37     
  Branches     2486     2500      +14     
==========================================
+ Hits        12403    12406       +3     
- Misses       2950     2980      +30     
- Partials      409      413       +4     

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

reason="fixme: ORT only supports float32 when accumulate is True: MLFloat16 data type is not supported with ScatterND when reduction is 'add'",
),
TorchLibOpInfo("ops.aten.index_put", core_ops.aten_index_put),
TorchLibOpInfo("ops.aten._unsafe_index_put", core_ops.aten__unsafe_index_put),
Copy link
Copy Markdown
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.

This op does not exist in extra_opinfo.py, so it will need to be created. Simply adding this entry to the file

    opinfo_core.OpInfo(
        "ops.aten._unsafe_index_put",
        aten_name="_unsafe_index_put",
        dtypes=common_dtype.floating_types(),
        sample_inputs_func=sample_inputs_index_put,
        supports_out=False,
    ),

will do

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I did but I don't really know what I'm doing so if you have a PR I could use as an example.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Comment thread onnxscript/tests/function_libs/torch_lib/ops_test_data.py Outdated
@justinchuby
Copy link
Copy Markdown
Collaborator

justinchuby commented Mar 26, 2024

Tests errors in torch-nightly and onnx-weekly can be safely ignored. #1318

@justinchuby justinchuby added the module: torchlib Related to the torch/aten function lib in development label Mar 26, 2024
@justinchuby justinchuby added the merge at lgtm Reviewers can merge when they approve label Mar 26, 2024
@justinchuby justinchuby merged commit 2612107 into microsoft:main Mar 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merge at lgtm Reviewers can merge when they approve module: torchlib Related to the torch/aten function lib in development

Projects

Development

Successfully merging this pull request may close these issues.

2 participants