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/10/19 15:08:36 UTC

[GitHub] [tvm] adstraw commented on a diff in pull request #13110: [Hexagon] Add a test to show how to use multi input async dma pipelin…

adstraw commented on code in PR #13110:
URL: https://github.com/apache/tvm/pull/13110#discussion_r999593280


##########
tests/python/contrib/test_hexagon/test_async_dma_pipeline.py:
##########
@@ -72,9 +72,23 @@ def operator(a: T.handle, b: T.handle, c: T.handle) -> None:
     return tvm.tir.Schedule(operator)
 
 
-def evaluate(hexagon_session, sch, a, b, size_a, expected_output, use_async_copy=0):
+def evaluate(
+    hexagon_session,
+    sch,
+    a,
+    b,
+    size_a,
+    expected_output,
+    use_async_copy=0,

Review Comment:
   do you want to enable async_copy by default?



##########
tests/python/contrib/test_hexagon/test_async_dma_pipeline.py:
##########
@@ -259,6 +273,29 @@ def get_fake_conv_vtcm_schedule(size_a, size_w, blocks=2):
     return sch
 
 
+def get_multi_input_fake_conv_vtcm_schedule(size_a, size_w, blocks=2):
+    sch = conv_approximation(size_a, size_w)
+
+    compute_block = sch.get_block("C")
+
+    n = sch.get_loops(compute_block)[0]
+    no, _ = sch.split(n, [blocks, None])
+
+    cache_read_block_a = sch.cache_read(compute_block, 0, "global.vtcm")
+    sch.compute_at(cache_read_block_a, no)
+    sch.fuse(*sch.get_loops(cache_read_block_a)[1:])
+
+    cache_read_block_b = sch.cache_read(compute_block, 1, "global.vtcm")
+    sch.compute_at(cache_read_block_b, no)
+    sch.fuse(*sch.get_loops(cache_read_block_b)[1:])
+
+    cache_read_block_c = sch.cache_write(compute_block, 0, "global.vtcm")

Review Comment:
   "cache_write_block_c"



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