Skip to content

Conversation

@liaojianjin
Copy link
Contributor

@liaojianjin liaojianjin commented Sep 1, 2021

Add aten: index_put operator support to ONNX frontend

Operator description:
https://pytorch.org/docs/stable/generated/torch.Tensor.index_put_.html#torch.Tensor.index_put_

In the process of converting the index_put operator of pytorch to onnx, the index of the slice type will be converted to a multi-dimensional tensor for storage.ReshapeToAdvancedIndexingFormat

Function unfolding_indices expands the slice into a 1-dimensional tensor, to indicate the location of the assignment value.

@masahi masahi merged commit 19b233a into apache:main Sep 3, 2021
@masahi
Copy link
Member

masahi commented Sep 3, 2021

Thanks @liaojianjin

@liaojianjin liaojianjin deleted the add-index_put branch September 3, 2021 08:45
ylc pushed a commit to ylc/tvm that referenced this pull request Sep 29, 2021
* onnx:add index_put

* reformat code

* add parametrize_targets

* change slice to onnx_index instance

* modify test_forward
ylc pushed a commit to ylc/tvm that referenced this pull request Jan 13, 2022
* onnx:add index_put

* reformat code

* add parametrize_targets

* change slice to onnx_index instance

* modify test_forward
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants