You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by "abhikran-quic (via GitHub)" <gi...@apache.org> on 2024/03/12 06:43:34 UTC

[PR] [VM] [Hexagon] Add buffers to `dma_wait` builtin [tvm]

abhikran-quic opened a new pull request, #16706:
URL: https://github.com/apache/tvm/pull/16706

   - While introducing dma operations at graph level, relax `KillAfterLastUse` pass introduces `kill_tensor` operation after `dma_copy`. This leads to memory being deallocated when asynchronous copy operation is in progress. Hence, moving the input/output buffers to `dma_wait` to ensure `kill_tensor` is introduced after `dma_wait` at the graph level.
   - Also, the logic for size calculation is updated to use `GetDataSize` function. 
   - The test case is updated to use offsets instead of allocating different storage in VTCM.


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


Re: [PR] [VM] [Hexagon] Add buffers to `dma_wait` builtin [tvm]

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


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


Re: [PR] [VM] [Hexagon] Add buffers to `dma_wait` builtin [tvm]

Posted by "abhikran-quic (via GitHub)" <gi...@apache.org>.
abhikran-quic commented on PR #16706:
URL: https://github.com/apache/tvm/pull/16706#issuecomment-1993222700

   cc: @Hzfengsy @quic-sanirudh


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


Re: [PR] [VM] [Hexagon] Add buffers to `dma_wait` builtin [tvm]

Posted by "quic-sanirudh (via GitHub)" <gi...@apache.org>.
quic-sanirudh commented on code in PR #16706:
URL: https://github.com/apache/tvm/pull/16706#discussion_r1524139978


##########
src/runtime/relax_vm/hexagon/builtin.cc:
##########
@@ -53,7 +52,8 @@ TVM_REGISTER_GLOBAL("vm.builtin.hexagon.dma_copy")
     });
 
 TVM_REGISTER_GLOBAL("vm.builtin.hexagon.dma_wait")
-    .set_body_typed([](TVMArgValue vm_ptr, int queue_id, int inflight_dma) {
+    .set_body_typed([](TVMArgValue vm_ptr, int queue_id, int inflight_dma, NDArray src_arr,
+                       NDArray dst_arr) {

Review Comment:
   For `src_arr` and `dst_arr`, perhaps we should add the [`[[maybe_unused]]`](https://en.cppreference.com/w/cpp/language/attributes/maybe_unused). 



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


Re: [PR] [VM] [Hexagon] Add buffers to `dma_wait` builtin [tvm]

Posted by "abhikran-quic (via GitHub)" <gi...@apache.org>.
abhikran-quic commented on code in PR #16706:
URL: https://github.com/apache/tvm/pull/16706#discussion_r1524246494


##########
src/runtime/relax_vm/hexagon/builtin.cc:
##########
@@ -53,7 +52,8 @@ TVM_REGISTER_GLOBAL("vm.builtin.hexagon.dma_copy")
     });
 
 TVM_REGISTER_GLOBAL("vm.builtin.hexagon.dma_wait")
-    .set_body_typed([](TVMArgValue vm_ptr, int queue_id, int inflight_dma) {
+    .set_body_typed([](TVMArgValue vm_ptr, int queue_id, int inflight_dma, NDArray src_arr,
+                       NDArray dst_arr) {

Review Comment:
   Thank you @quic-sanirudh ! I have fixed this in the latest patch. 



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