diff --git a/python/tvm/script/parser/ir/parser.py b/python/tvm/script/parser/ir/parser.py index 4ea57130f1e2..751f2c9a1ca7 100644 --- a/python/tvm/script/parser/ir/parser.py +++ b/python/tvm/script/parser/ir/parser.py @@ -87,6 +87,9 @@ def _visit_assign(self: Parser, node: doc.Assign) -> None: lhs = node.targets[0].id rhs = self.eval_expr(node.value) + if rhs is None: + return + I.decl_function(lhs, rhs) I.def_function(lhs, rhs) diff --git a/tests/python/tir-transform/test_tir_transform_merge_dynamic_shared_memory_allocations.py b/tests/python/tir-transform/test_tir_transform_merge_dynamic_shared_memory_allocations.py index efe2944aaa48..8661843d39c1 100644 --- a/tests/python/tir-transform/test_tir_transform_merge_dynamic_shared_memory_allocations.py +++ b/tests/python/tir-transform/test_tir_transform_merge_dynamic_shared_memory_allocations.py @@ -456,7 +456,7 @@ def func( class TestSimpleAllocNoReuse(tvm.testing.CompareBeforeAfter): """Test alloc and free within the same scope.""" - transform = tvm.tir.transform.MergeDynamicSharedMemoryAllocations() + transform = tvm.tir.transform.MergeSharedMemoryAllocations() def before(self): @T.prim_func @@ -485,7 +485,7 @@ def func(): class TestSimpleAllocReuse(tvm.testing.CompareBeforeAfter): """Test alloc and free within the same scope with a reuse chance.""" - transform = tvm.tir.transform.MergeDynamicSharedMemoryAllocations() + transform = tvm.tir.transform.MergeSharedMemoryAllocations() def before(self): @T.prim_func diff --git a/tests/scripts/task_python_unittest.sh b/tests/scripts/task_python_unittest.sh index 5b07b5256ea5..28a1f5ad1bf0 100755 --- a/tests/scripts/task_python_unittest.sh +++ b/tests/scripts/task_python_unittest.sh @@ -51,7 +51,6 @@ TEST_FILES=( "tir-transform" "tir-usmp" "tvmscript" - "usmp" ) for TEST_FILE in ${TEST_FILES[@]}; do