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

[tvm] branch main updated: [Dyn] Use SizeVar instead of Var in the GetShape function (#9650)

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

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


The following commit(s) were added to refs/heads/main by this push:
     new ccd59e8  [Dyn] Use SizeVar instead of Var in the GetShape function (#9650)
ccd59e8 is described below

commit ccd59e89d21cc81cc06f2a16cddcc1ffeed1e2a1
Author: Chenfan <jc...@outlook.com>
AuthorDate: Mon Dec 6 03:39:03 2021 +0800

    [Dyn] Use SizeVar instead of Var in the GetShape function (#9650)
---
 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