You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by jc...@apache.org on 2021/12/05 10:07:51 UTC

[tvm] 01/01: [Dyn] Use SizeVar instead of Var in the GetShape function

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

jcf94 pushed a commit to branch jcf94-patch-1
in repository https://gitbox.apache.org/repos/asf/tvm.git

commit 2b81abcb0b23356cbaa845d78cb3854babd82cb0
Author: Chenfan <jc...@outlook.com>
AuthorDate: Sun Dec 5 18:07:15 2021 +0800

    [Dyn] Use SizeVar instead of Var in the GetShape function
---
 python/tvm/relay/backend/te_compiler.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/python/tvm/relay/backend/te_compiler.py b/python/tvm/relay/backend/te_compiler.py
index db75049..def827c 100644
--- a/python/tvm/relay/backend/te_compiler.py
+++ b/python/tvm/relay/backend/te_compiler.py
@@ -268,7 +268,7 @@ def get_shape(shape):
                 assert val <= np.iinfo(np.int32).max
                 ret.append(tvm.tir.IntImm("int32", val))
         elif isinstance(dim, tvm.tir.Any):
-            ret.append(te.var("any_dim", "int32"))
+            ret.append(te.size_var("any_dim", "int32"))
         else:
             ret.append(dim)
     return ret