quic-sanirudh commented on code in PR #16557:
URL: https://github.com/apache/tvm/pull/16557#discussion_r1495450159


##########
src/runtime/hexagon/hexagon_device_api.h:
##########
@@ -199,6 +215,9 @@ class HexagonDeviceAPI final : public DeviceAPI {
 
   //! \brief Hexagon power manager
   std::unique_ptr<HexagonPowerManager> runtime_power_manager;
+
+  //! \brief NDArray base -> Physical Shape map
+  std::map<void*, PhysicalShape> ndarray_physical_shape;

Review Comment:
   Thanks for the explanation @tqchen. Yes it would be nice to do this change, 
I wanted to do it in a follow-up PR because I would like to refactor many 
things in the hexagon_device_api along with this.
   
   I want to do a bigger cleanup because basically this map is populated with 
2D tensors that are allocated in 2 different ways (one is when [2D storage and 
its tensor is directly 
allocated](https://github.com/apache/tvm/pull/16557/files#diff-1c5f1d16439e6865691e3f21573e519295f748c73537459be8b7b0023eb42e45R210-R215)
 and second is through the 
[`alloc_discontiguous_tensor`](https://github.com/apache/tvm/pull/16557/files#diff-1c5f1d16439e6865691e3f21573e519295f748c73537459be8b7b0023eb42e45R150-R162)
 introduced in this PR).
   Both are needed for different use cases and I just did not want to include 
code refactor in this PR, but I'll definitely introduce a follow-up PR and fix 
this.



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