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-tirx.git


The following commit(s) were added to refs/heads/main by this push:
     new 7fae5ca9e [FIX] Count assertions in automatic unroll cost (#140)
7fae5ca9e is described below

commit 7fae5ca9ec367647df518a13f7107c6ddbe0da01
Author: Tianqi Chen <[email protected]>
AuthorDate: Sat Oct 31 10:50:34 2026 -0400

    [FIX] Count assertions in automatic unroll cost (#140)
    
    Count AssertStmt as one step in the automatic unroll budget so
    assertion-only serial loops respect the configured step limit.
---
 src/tirx/transform/unroll_loop.cc | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/src/tirx/transform/unroll_loop.cc 
b/src/tirx/transform/unroll_loop.cc
index a789db849..53d09f43b 100644
--- a/src/tirx/transform/unroll_loop.cc
+++ b/src/tirx/transform/unroll_loop.cc
@@ -261,6 +261,11 @@ class LoopUnroller : public StmtExprMutator {
     return StmtExprMutator::Mutate_(op, inplace_mode);
   }
 
+  UnchangedOr<Stmt> Mutate_(const AssertStmtObj* op, InplaceMode inplace_mode) 
final {
+    ++step_count_;
+    return StmtExprMutator::Mutate_(op, inplace_mode);
+  }
+
   UnchangedOr<Stmt> Mutate_(const SeqStmtObj* op, InplaceMode inplace_mode) 
final {
     ffi::Array<Stmt> seq;
     bool changed = false;

Reply via email to