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/10 19:48:13 UTC

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

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


##########
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:
   Use `meta_schdule.builder.default_build` here. 



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