From b8859d86329e0604cdb300172bd862923500d4a6 Mon Sep 17 00:00:00 2001 From: lin-hitonami Date: Sun, 25 Jun 2023 15:04:05 +0800 Subject: [PATCH] [lang] Remove useless insertion to global_vars ghstack-source-id: fb68d89e74c5de64f6dc0100ac5ecb96158e0bda Pull Request resolved: https://github.com/taichi-dev/taichi/pull/8210 --- python/taichi/lang/kernel_impl.py | 7 ------- 1 file changed, 7 deletions(-) diff --git a/python/taichi/lang/kernel_impl.py b/python/taichi/lang/kernel_impl.py index b1d89fd8fe716..b9ca87eafac52 100644 --- a/python/taichi/lang/kernel_impl.py +++ b/python/taichi/lang/kernel_impl.py @@ -136,13 +136,6 @@ def _get_tree_and_ctx( func_body.decorator_list = [] global_vars = _get_global_vars(self.func) - for i, arg in enumerate(func_body.args.args): - anno = arg.annotation - if isinstance(anno, ast.Name): - global_vars[anno.id] = self.arguments[i].annotation - - if isinstance(func_body.returns, ast.Name): - global_vars[func_body.returns.id] = self.return_type if is_kernel or is_real_function: # inject template parameters into globals