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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to