From f5772c522192309f7ef8ee085ea6f10b17d8effd Mon Sep 17 00:00:00 2001 From: Zichun Ye Date: Wed, 16 Aug 2023 15:25:16 +0800 Subject: [PATCH] support grid for python 3.9 and up --- third_party/incubator-tvm/python/tvm/hybrid/parser.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/third_party/incubator-tvm/python/tvm/hybrid/parser.py b/third_party/incubator-tvm/python/tvm/hybrid/parser.py index ed441207..ab4d58c4 100644 --- a/third_party/incubator-tvm/python/tvm/hybrid/parser.py +++ b/third_party/incubator-tvm/python/tvm/hybrid/parser.py @@ -16,6 +16,7 @@ # under the License. """Hybrid Script Parser""" +# 2023.08.16 - Support parser for python 3.9 and up. # 2022.02.15 - Support grid as new loop mode. # 2022.01.19 - Support negative extent for range. # 2021.12.15 - Support block_realize intrin in with scope. @@ -650,7 +651,7 @@ class HybridParser(ast.NodeVisitor): _apply_indices(self.closure_vars[node.value.id], args)) buf = self.visit(node.value) - if isinstance(buf, Array): + if isinstance(buf, (Array, list)): for i in args: if isinstance(i, numbers.Integral): buf = buf[i] -- Gitee