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 2020/11/25 21:40:51 UTC

[GitHub] [tvm] mbrookhart commented on pull request #6906: [WIP] Various bugs in passes

mbrookhart commented on pull request #6906:
URL: https://github.com/apache/tvm/pull/6906#issuecomment-733958301


   I've been working on other things, sorry for the delay on this.
   
   take with dynamic input shapes is a bit of an issue because take folds the input shape into the compute:
   https://github.com/apache/tvm/blob/c58b20bbd8e6ac7128e82994624d922ee6b8a069/include/tvm/topi/transform.h#L760
   
   If the input tensor to take is fused into other ops, that input shape maybe removed in the fusion, and then we'll have a reference to an input dimension that no longer exists, so the fused function will fail to compile.
   
   As @masahi and I discussed above, there are two main ways to get around this: We can write a pass that breaks the fusion at an earlier step, or we can remove the `clip` and `wrap`modes from the topi op and raise that logic into relay. I have a branch where I've done the second and it passes forward tests, but I'm having some issues getting gradient tests and ADT tests working.
   
   A third option I've thought of in the meantime is to do the raising of the logic in a legalization pass only for dynamic input shapes. This would allow us to remove the dynamic issue but keep the current code everywhere else.
   
   Any thoughts on the best way to proceed?


----------------------------------------------------------------
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:
users@infra.apache.org