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/11/15 21:40:32 UTC

[GitHub] [tvm] nverke commented on a diff in pull request #13352: [Hexagon] Add test to show scheduling of resnet50 with async dma pipe…

nverke commented on code in PR #13352:
URL: https://github.com/apache/tvm/pull/13352#discussion_r1023284499


##########
python/tvm/contrib/hexagon/meta_schedule.py:
##########
@@ -121,14 +129,23 @@ def _worker_func(hexagon_launcher, evaluator_config, alloc_repeat, artifact_path
     return costs
 
 
-def get_hexagon_local_builder():
+def get_hexagon_local_builder(pass_context: tvm.transform.PassContext = None):
     """Return Hexagon-compatible Builder for meta schedule."""
 
     def export_func(mod):
         binary_path = export_module(mod, tempfile.mkdtemp())
         return str(binary_path)
 
-    return LocalBuilder(f_export=export_func)
+    def build_func(mod: IRModule, target: Target, _params: Optional[Dict[str, NDArray]]) -> Module:
+        if pass_context is not None:
+            with pass_context:
+                mod = RemoveWeightLayoutRewriteBlock(skip_ndarray_rewrite=True)(mod)
+                return tvm_build(mod, target=target)
+        else:
+            mod = RemoveWeightLayoutRewriteBlock(skip_ndarray_rewrite=True)(mod)
+            return tvm_build(mod, target=target)

Review Comment:
   ✅ Changed this to use the old strategy if pass context is not present. 



##########
python/tvm/tir/tensor_intrin/hexagon.py:
##########
@@ -64,6 +64,50 @@ def dot_product_32x4_u8u8i32_vrmpy(
         )
 
 
+@T.prim_func
+def dot_product_32x4_u8i8i32_vtcm_desc(
+    A: T.Buffer((4,), "uint8", offset_factor=1, scope="global.vtcm"),
+    B: T.Buffer((32, 4), "int8", offset_factor=1, scope="global.vtcm"),
+    C: T.Buffer((32,), "int32", offset_factor=1, scope="global.vtcm"),

Review Comment:
   Yes! ✅



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