You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by GitBox <gi...@apache.org> on 2022/11/07 10:49:38 UTC

[GitHub] [tvm] masahi opened a new pull request, #13306: [Torch] Fix advanced indexing with boolean mask

masahi opened a new pull request, #13306:
URL: https://github.com/apache/tvm/pull/13306

   Fixes https://github.com/apache/tvm/issues/12292, https://github.com/apache/tvm/issues/13296
   
   PyTorch uses the same op, `aten::index`, to represent indexing by both integer indices and a boolean mask. In our PT converter, Relay `adv_index` op is used to convert `aten::index`, but it doesn't correctly recognize indexing by mask - it will treat True / False as indices 0 / 1. So our converter generates an invalid model if the PT model uses such indexing, see https://github.com/apache/tvm/issues/12292 and https://github.com/apache/tvm/issues/13296.
   
   I fixed this issue by explicitly tuning the mask into integer indices using `argwhere`, which will also take care of the inherent dynamism in indexing by mask.
   
   


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [tvm] comaniac commented on pull request #13306: [Torch] Fix advanced indexing with boolean mask

Posted by GitBox <gi...@apache.org>.
comaniac commented on PR #13306:
URL: https://github.com/apache/tvm/pull/13306#issuecomment-1306226246

   Thanks @masahi 


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [tvm] comaniac merged pull request #13306: [Torch] Fix advanced indexing with boolean mask

Posted by GitBox <gi...@apache.org>.
comaniac merged PR #13306:
URL: https://github.com/apache/tvm/pull/13306


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [tvm] tvm-bot commented on pull request #13306: [Torch] Fix advanced indexing with boolean mask

Posted by GitBox <gi...@apache.org>.
tvm-bot commented on PR #13306:
URL: https://github.com/apache/tvm/pull/13306#issuecomment-1305424413

   <!---bot-comment-->
   
   Thanks for contributing to TVM! Please refer to the contributing guidelines https://tvm.apache.org/docs/contribute/ for useful information and tips. Please request code reviews from [Reviewers](https://github.com/apache/incubator-tvm/blob/master/CONTRIBUTORS.md#reviewers) by @-ing them in a comment.
   
   <!--bot-comment-ccs-start-->
    * cc @yelite <sub>See [#10317](https://github.com/apache/tvm/issues/10317) for details</sub><!--bot-comment-ccs-end-->
   
   <sub>Generated by [tvm-bot](https://github.com/apache/tvm/blob/main/ci/README.md#github-actions)</sub>


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org