diff --git a/tirx/include/tvm/tirx/transform.h b/tirx/include/tvm/tirx/transform.h index 478bcbbc8ff8..2956e0ebe560 100644 --- a/tirx/include/tvm/tirx/transform.h +++ b/tirx/include/tvm/tirx/transform.h @@ -191,11 +191,6 @@ TVM_TIRX_DLL Pass SplitHostDevice(); */ TVM_TIRX_DLL Pass SkipAssert(); -/*! - * \brief This annotation is for nodes to be disabled for builtin lowering - */ -static constexpr const char* kDisableLowerTVMBuiltin = "disable_lower_builtin"; - /*! * \brief Lower builtin intrinsics. * \return The pass. diff --git a/tirx/src/tirx/transform/lower_tvm_builtin.cc b/tirx/src/tirx/transform/lower_tvm_builtin.cc index f25da672565e..a2e80dab0edb 100644 --- a/tirx/src/tirx/transform/lower_tvm_builtin.cc +++ b/tirx/src/tirx/transform/lower_tvm_builtin.cc @@ -281,12 +281,6 @@ class BuiltinLower : public StmtExprMutator { DLDataType dtype = tensor_call->ty_args[0].as_or_throw()->dtype->dtype; PrimType element_type(dtype); auto scope = tensor_call->ty_args[0].as_or_throw()->scope; - DictAttrs annotations = tensor_call->attrs.value().as_or_throw(); - if (annotations->dict.count(transform::kDisableLowerTVMBuiltin)) { - if (annotations->dict[transform::kDisableLowerTVMBuiltin].as_or_throw()->value) { - return stmt; - } - } if (element_type.IsScalableVector()) { return stmt; } diff --git a/tirx/tests/python/codegen/llvm/test_basic.py b/tirx/tests/python/codegen/llvm/test_basic.py index f7f2d946b2ad..8c71c1e0047d 100644 --- a/tirx/tests/python/codegen/llvm/test_basic.py +++ b/tirx/tests/python/codegen/llvm/test_basic.py @@ -838,27 +838,6 @@ def Kirby(v: T.float32) -> T.float32: assert matches == sorted(matches) -@pytest.mark.skipif(not env.has_llvm(), reason="need llvm") -@pytest.mark.parametrize("extent", [2**32 + 1, 2**32 + 4]) -def test_llvm_large_stack_allocation_uses_64bit_extent(extent): - @T.function - def main(A: T.Tensor((1,), "float32")): - B = T.alloc_tensor( - ty_args=[T.Tensor((extent,), "float32", scope="global")], - annotations={"disable_lower_builtin": True}, - ) - A[0] = B[T.int64(extent - 1)] - - module = tvm_tirx.tirx.compile( - main, - target={"kind": "llvm", "opt-level": 0}, - pipeline="tirx", - ).mod - llvm_ir = module.inspect_source("ll") - - assert re.search(rf"alloca float, i64 {extent}(?:,|$)", llvm_ir) - - @pytest.mark.skipif(not env.has_llvm(), reason="need llvm") def test_llvm_scalar_concat(): @I.ir_module