This is an automated email from the ASF dual-hosted git repository.

tqchen pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tvm.git


The following commit(s) were added to refs/heads/main by this push:
     new 2e5ad4e4e5 [TIRx] Remove obsolete builtin lowering bypass (#20771)
2e5ad4e4e5 is described below

commit 2e5ad4e4e5f29b404e2430cbb2b588f19cdf8669
Author: Tianqi Chen <[email protected]>
AuthorDate: Fri Oct 16 22:46:34 2026 -0400

    [TIRx] Remove obsolete builtin lowering bypass (#20771)
    
    Remove the obsolete `disable_lower_builtin` annotation and its lowering
    bypass, along with the dedicated LLVM large-stack allocation test that
    used it. Allocations follow the normal builtin-lowering path.
---
 tirx/include/tvm/tirx/transform.h            |  5 -----
 tirx/src/tirx/transform/lower_tvm_builtin.cc |  6 ------
 tirx/tests/python/codegen/llvm/test_basic.py | 21 ---------------------
 3 files changed, 32 deletions(-)

diff --git a/tirx/include/tvm/tirx/transform.h 
b/tirx/include/tvm/tirx/transform.h
index 478bcbbc8f..2956e0ebe5 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 f25da67256..a2e80dab0e 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<TensorType>()->dtype->dtype;
     PrimType element_type(dtype);
     auto scope = tensor_call->ty_args[0].as_or_throw<TensorType>()->scope;
-    DictAttrs annotations = 
tensor_call->attrs.value().as_or_throw<DictAttrs>();
-    if (annotations->dict.count(transform::kDisableLowerTVMBuiltin)) {
-      if 
(annotations->dict[transform::kDisableLowerTVMBuiltin].as_or_throw<IntImm>()->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 f7f2d946b2..8c71c1e004 100644
--- a/tirx/tests/python/codegen/llvm/test_basic.py
+++ b/tirx/tests/python/codegen/llvm/test_basic.py
@@ -838,27 +838,6 @@ def test_llvm_order_functions():
     assert matches == sorted(matches)
 
 
[email protected](not env.has_llvm(), reason="need llvm")
[email protected]("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

Reply via email to