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 2021/08/09 06:54:27 UTC

[GitHub] [tvm] lygztq opened a new pull request #8687: [Fix][TOPI] remove wrong fix in x86's dense_nopack operator

lygztq opened a new pull request #8687:
URL: https://github.com/apache/tvm/pull/8687


   Before #8266, `tvm.tir.Any` is a subclass of `PrimExpr` which does not have the `__floordiv__` operator `//`. When the input has a dynamic shape with `Any` in it, this line `k = te.reduce_axis((0, K // vec), "k")` in `dense_nopack` will throw an error like
   
   ```
   ...
       k = te.reduce_axis((0, K // vec), "k")
   TypeError: unsupported operand type(s) for //: 'Any' and 'int'
   ```
   
   In #8166, I made a wrong fix of the `dense_nopack` operator in x86 platform (sorry for that :( ) where I used `M`, `N` and `K` in `_default_dense_nopack_config` directly as the input of `te.compute` in `dense_nopack` (actually they are used in `_default_dense_nopack_config` to compute tile sizes, I think). I think the correct fix should be
   
   ```
   if isinstance(K, tvm.tir.Any):
       k = te.reduce_axis((0, tvm.tir.floordiv(K, vec)), "k")
   else:
       k = te.reduce_axis((0, K // vec), "k")
   ```
   
   Now `tvm.tir.Any` is a subclass of `PrimExprWithOp` and performing floordiv with `//` is valid. I think we can remove this wrong fix now.
   


-- 
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] junrushao1994 commented on pull request #8687: [Fix][TOPI] remove wrong fix in x86's dense_nopack operator

Posted by GitBox <gi...@apache.org>.
junrushao1994 commented on pull request #8687:
URL: https://github.com/apache/tvm/pull/8687#issuecomment-899246660


   Thanks @lygztq! It is merged!


-- 
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] junrushao1994 commented on pull request #8687: [Fix][TOPI] remove wrong fix in x86's dense_nopack operator

Posted by GitBox <gi...@apache.org>.
junrushao1994 commented on pull request #8687:
URL: https://github.com/apache/tvm/pull/8687#issuecomment-898970443


   CC @jcf94 


-- 
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] junrushao1994 merged pull request #8687: [Fix][TOPI] remove wrong fix in x86's dense_nopack operator

Posted by GitBox <gi...@apache.org>.
junrushao1994 merged pull request #8687:
URL: https://github.com/apache/tvm/pull/8687


   


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