You are viewing a plain text version of this content. The canonical link for it is here.
Posted to discuss-archive@tvm.apache.org by "tlopex (via GitHub)" <gi...@apache.org> on 2026/04/10 04:55:23 UTC

[PR] [BugFix][TOPI] Fix get_const_tuple hanging indefinitely when passed a te.Tensor [tvm]

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

   This pr fixes #18765: `topi.get_const_tuple` hangs indefinitely when passed a `te.Tensor` instead  of a shape tuple and adds a type check to raise a clear `TypeError` with a helpful message suggesting `get_const_tuple(tensor.shape)` instead   


-- 
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: discuss-archive-unsubscribe@tvm.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: discuss-archive-unsubscribe@tvm.apache.org
For additional commands, e-mail: discuss-archive-help@tvm.apache.org


Re: [PR] [BugFix][TOPI] Fix get_const_tuple hanging indefinitely when passed a te.Tensor [tvm]

Posted by "MasterJH5574 (via GitHub)" <gi...@apache.org>.
MasterJH5574 merged PR #19380:
URL: https://github.com/apache/tvm/pull/19380


-- 
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: discuss-archive-unsubscribe@tvm.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: discuss-archive-unsubscribe@tvm.apache.org
For additional commands, e-mail: discuss-archive-help@tvm.apache.org


Re: [PR] [BugFix][TOPI] Fix get_const_tuple hanging indefinitely when passed a te.Tensor [tvm]

Posted by "gemini-code-assist[bot] (via GitHub)" <gi...@apache.org>.
gemini-code-assist[bot] commented on code in PR #19380:
URL: https://github.com/apache/tvm/pull/19380#discussion_r3062126839


##########
python/tvm/topi/utils.py:
##########
@@ -186,6 +186,11 @@ def get_const_tuple(in_tuple):
     out_tuple : tuple of int
         The output.
     """
+    if isinstance(in_tuple, te.tensor.Tensor):

Review Comment:
   ![medium](https://www.gstatic.com/codereviewagent/medium-priority.svg)
   
   For consistency with other parts of this file (e.g., line 272) and the error message itself (line 192), please use `te.Tensor` instead of `te.tensor.Tensor`. This is more idiomatic in the TVM codebase when `te` is imported from `tvm`, and avoids potential `AttributeError` if the `tensor` submodule is not explicitly exported in the `te` namespace.
   
   ```suggestion
       if isinstance(in_tuple, te.Tensor):
   ```



-- 
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: discuss-archive-unsubscribe@tvm.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: discuss-archive-unsubscribe@tvm.apache.org
For additional commands, e-mail: discuss-archive-help@tvm.apache.org