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/04/12 14:41:08 UTC

[GitHub] [tvm] Lunderberg commented on a diff in pull request #10969: [Bug] hotfix edge case for broadcast_to const shape int64

Lunderberg commented on code in PR #10969:
URL: https://github.com/apache/tvm/pull/10969#discussion_r848520342


##########
python/tvm/relay/op/transform.py:
##########
@@ -836,7 +836,7 @@ def broadcast_to(data, shape):
         The resulting tensor.
     """
     if isinstance(shape, Constant):
-        shape = list(shape.data.numpy())
+        shape = [int(i) for i in shape.data.numpy()]

Review Comment:
   Because tvm.runtime.convert [handles all integer types as int32](https://github.com/apache/tvm/blob/main/python/tvm/runtime/object_generic.py#L121), would this cause issues with arrays larger than 4 GB?  I don't think we have many of those in practice, but I think it could then cause a similar issue.



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