You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by tq...@apache.org on 2023/03/10 16:19:28 UTC

[tvm] branch unity updated: [Unity] Consider target context for Relay to Relax conversion (#14269)

This is an automated email from the ASF dual-hosted git repository.

tqchen pushed a commit to branch unity
in repository https://gitbox.apache.org/repos/asf/tvm.git


The following commit(s) were added to refs/heads/unity by this push:
     new 20f38826e0 [Unity] Consider target context for Relay to Relax conversion (#14269)
20f38826e0 is described below

commit 20f38826e0dceac541d0f3ef9e6a2965b041fda5
Author: ibsidorenko <98...@users.noreply.github.com>
AuthorDate: Fri Mar 10 19:19:19 2023 +0300

    [Unity] Consider target context for Relay to Relax conversion (#14269)
    
    Some of Relay passes are target specific (for example, AlterOpLayout).
    This commit adds target information for Relay -> Relax conversion.
---
 python/tvm/relax/testing/relay_translator.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/python/tvm/relax/testing/relay_translator.py b/python/tvm/relax/testing/relay_translator.py
index fd5aab89fa..c5225e14e7 100644
--- a/python/tvm/relax/testing/relay_translator.py
+++ b/python/tvm/relax/testing/relay_translator.py
@@ -236,7 +236,7 @@ def from_relay(
 
     # Since optimization passes and OpStrategy are highly context-dependent,
     # we match the exact same context with `extract_task_from_relay()` env
-    with _autotvm_silencer(), tvm.transform.PassContext(
+    with target, _autotvm_silencer(), tvm.transform.PassContext(
         opt_level=opt_level,
         config=pass_config,
         disabled_pass=disabled_pass,