csullivan commented on a change in pull request #9525:
URL: https://github.com/apache/tvm/pull/9525#discussion_r758697199



##########
File path: src/runtime/hexagon/hexagon/hexagon_buffer.h
##########
@@ -26,54 +26,60 @@
 #include <tvm/runtime/ndarray.h>
 #include <tvm/runtime/packed_func.h>
 
+#include <memory>
 #include <vector>
 
 namespace tvm {
 namespace runtime {
 namespace hexagon {
 
+struct Allocation;
+
 class HexagonBuffer {
  public:
-  /* \brief Allocate memory within hexagon accessible memory
+  /* \brief Allocate memory within Hexagon accessible memory
    * scopes.
    *
-   * \param ndim The number of dimensions of physical storage
+   * \param nbytes The number of bytes of flat physical storage
    * to allocate.
    *
-   * \param shape The shape of the ndarray for which to allocate
-   * physical storage.
-   *
-   * \param dtype The data type of the physical storage.
+   * \param alignment The byte alignment to be used when allocating.
    *
    * \param scope Optional storage scope indicating the memory
    * space in which to allocate. Defaults to global system
    * memory (DDR).
    */
-  HexagonBuffer(int ndim, const int64_t* shape, DLDataType dtype, 
Optional<String> scope);
+  HexagonBuffer(size_t nbytes, size_t alignment, Optional<String> scope);
 
-  /* \brief Allocate memory within hexagon accessible memory
+  /* \brief Allocate memory within Hexagon accessible memory
    * scopes.
    *
-   * \param nbytes The number of bytes of flat physical storage
+   * \param ndim The number of dimensions of physical storage
    * to allocate.
    *
+   * \param nbytes The number of bytes of flat physical storage
+   * to allocate per dimension of physical storage.
+   *

Review comment:
       Number of bytes per dimension of physical storage confuses me. Maybe 
nbytes per allocation? In this case we are allocating the same nbytes 
(`shape[1]`) for every coordinate of `shape[0]`, which is the allocation id.




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