cconvey commented on code in PR #12574:
URL: https://github.com/apache/tvm/pull/12574#discussion_r957641819


##########
tests/python/contrib/test_hexagon/infrastructure.py:
##########
@@ -47,6 +47,19 @@ def allocate_hexagon_array(
     if axis_separators is None:
         axis_separators = []
 
+    # We're abusing the notion of "shape" here: it no longer means the logical 
shape of the
+    # tensor, but rather the number of memory-allocation tiers.
+    # So the new shape's rank will be (# of axis separators + 1).
+    #
+    # The Hexagon runtime will assume that this flatening has already 
occurred, and will
+    # therefore interpret the tensor's rank as an indicating of the # of 
allocation tiers.
+    #
+    # Note that when the # of axis separators == 1:
+    # - This host-side code still creates single memory allocation in which 
every
+    #   element is actual tensor content.
+    # - The Hexagon runtime code will need to allocate/populate member in a 
true
+    #   2D format, i.e., it will need to add a top-tier buffer holding 
pointers into
+    #   the bottom-tier tensor contents.

Review Comment:
   I may have misunderstood a detail about 2D memory allocations:  whether or 
not there _must_ be a top-level tensor-of-pointers to the individual tile 
allocations.  I might want to update this comment before merging the PR.



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