From f6e186cbd75987cc6011597bcf0ab08438565b64 Mon Sep 17 00:00:00 2001 From: tqchen Date: Mon, 6 Apr 2020 20:24:55 -0700 Subject: [PATCH] [TIR] Fix perf regression of tir refactor --- python/tvm/driver/build_module.py | 2 +- python/tvm/testing.py | 2 +- src/driver/driver_api.cc | 2 +- tests/python/unittest/test_target_codegen_static_init.py | 2 +- tests/python/unittest/test_target_codegen_vm_basic.py | 2 +- tests/python/unittest/test_tir_transform_make_packed_api.py | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/python/tvm/driver/build_module.py b/python/tvm/driver/build_module.py index 0dd01e186034..c0e990e8394d 100644 --- a/python/tvm/driver/build_module.py +++ b/python/tvm/driver/build_module.py @@ -198,7 +198,7 @@ def lower(sch, f = tvm.tir.PrimFunc(arg_list, stmt).with_attr( "global_symbol", tvm.runtime.String(name)) if cfg.restricted_func: - f = f.with_attr("tir.no_alias", True) + f = f.with_attr("tir.noalias", True) mod = tvm.IRModule({name: f}) return tvm.tir.transform.MakePackedAPI()(mod) diff --git a/python/tvm/testing.py b/python/tvm/testing.py index 9c429302f25d..1edb3b85a769 100644 --- a/python/tvm/testing.py +++ b/python/tvm/testing.py @@ -199,7 +199,7 @@ def MakeAPILegacy(stmt, name, args, num_unpacked_args, noalias): "global_symbol", tvm.runtime.String(name)) f = f.with_attr("tir.is_entry_func", True) if noalias: - f = f.with_attr("tir.no_alias", True) + f = f.with_attr("tir.noalias", True) mod = tvm.IRModule({name: f}) return tvm.tir.transform.MakePackedAPI(num_unpacked_args)(mod) diff --git a/src/driver/driver_api.cc b/src/driver/driver_api.cc index ae1d5393ad34..f939f0a1e7d6 100644 --- a/src/driver/driver_api.cc +++ b/src/driver/driver_api.cc @@ -214,7 +214,7 @@ IRModule lower(te::Schedule sch, f = WithAttr(std::move(f), "global_symbol", runtime::String(name)); if (config->restricted_func) { - f = WithAttr(std::move(f), "tir.no_alias", Integer(1)); + f = WithAttr(std::move(f), "tir.noalias", Integer(1)); } auto mod = IRModule(Map({{GlobalVar(name), f}})); return tir::transform::MakePackedAPI(0)(mod); diff --git a/tests/python/unittest/test_target_codegen_static_init.py b/tests/python/unittest/test_target_codegen_static_init.py index bd4d0d8cd52d..64bb698ced9a 100644 --- a/tests/python/unittest/test_target_codegen_static_init.py +++ b/tests/python/unittest/test_target_codegen_static_init.py @@ -26,7 +26,7 @@ def MakeAPILegacy(stmt, name, args, num_unpacked_args, noalias): "global_symbol", tvm.runtime.String(name)) f = f.with_attr("tir.is_entry_func", True) if noalias: - f = f.with_attr("tir.no_alias", True) + f = f.with_attr("tir.noalias", True) mod = tvm.IRModule.from_expr(f) return tvm.tir.transform.MakePackedAPI()(mod) diff --git a/tests/python/unittest/test_target_codegen_vm_basic.py b/tests/python/unittest/test_target_codegen_vm_basic.py index ee0d89bf298b..6af4279e6ffd 100644 --- a/tests/python/unittest/test_target_codegen_vm_basic.py +++ b/tests/python/unittest/test_target_codegen_vm_basic.py @@ -33,7 +33,7 @@ def MakeAPILegacy(stmt, name, args, num_unpacked_args, noalias): "global_symbol", tvm.runtime.String(name)) f = f.with_attr("tir.is_entry_func", True) if noalias: - f = f.with_attr("tir.no_alias", True) + f = f.with_attr("tir.noalias", True) mod = tvm.IRModule.from_expr(f) return tvm.tir.transform.MakePackedAPI()(mod) diff --git a/tests/python/unittest/test_tir_transform_make_packed_api.py b/tests/python/unittest/test_tir_transform_make_packed_api.py index b44d3c4ba7f7..898b08ee91d5 100644 --- a/tests/python/unittest/test_tir_transform_make_packed_api.py +++ b/tests/python/unittest/test_tir_transform_make_packed_api.py @@ -36,7 +36,7 @@ def test_makeapi(): num_unpacked_args = 2 f = tvm.tir.PrimFunc([n, Ab, Bb, Cb], stmt).with_attr( - "tir.no_alias", True).with_attr("global_symbol", tvm.runtime.String("myadd")) + "tir.noalias", True).with_attr("global_symbol", tvm.runtime.String("myadd")) mod = tvm.IRModule.from_expr(f) f = tvm.tir.transform.MakePackedAPI(num_unpacked_args)(mod)["main"] assert(len(f.params) == 7)