masahi commented on pull request #7231:

   cc @t-vi @yongwww 
   This is probably not how we should support `copy_`. We discussed this issue 
   Later I found a promising way to support inplace copy: We first convert 
`aten::copy_` to `aten::index_put` (see using 
PyTorch jit passes, and then convert `aten::index_put` to relay `scatter_nd`. 
This is also how PyTorch ONNX export supports inplace assignment, see
   Relay `scatter_nd` op was added in 
You can convert `aten::copy_` to `aten::inplace_put` by adding the following 
   @t-vi Does this sound reasonable a way to support inplace assignment?

This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:

Reply via email to