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

tlopex 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 c562a0b49 [Fix] Select persistent scheduler ordering at parse time 
(#129)
c562a0b49 is described below

commit c562a0b498d32acba7d655ab054acb7985ea422a
Author: Shushi Hong <[email protected]>
AuthorDate: Thu Oct 29 21:02:46 2026 -0400

    [Fix] Select persistent scheduler ordering at parse time (#129)
    
    `ClusterPersistentScheduler2D` fails to parse with the default
    `serpentine=False`: an ordinary TVMScript `if` parses both branches and
    accesses the uninitialized `_M_BLOCKS` field.
    
    This pr use `T.constexpr` to parse only the selected ordering.
    Scheduling formulas and public APIs remain unchanged.
---
 python/tvm_tirx/backend/cuda/lang/tile_scheduler.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/python/tvm_tirx/backend/cuda/lang/tile_scheduler.py 
b/python/tvm_tirx/backend/cuda/lang/tile_scheduler.py
index a99b6c41e..82ec9a03c 100644
--- a/python/tvm_tirx/backend/cuda/lang/tile_scheduler.py
+++ b/python/tvm_tirx/backend/cuda/lang/tile_scheduler.py
@@ -282,7 +282,7 @@ class ClusterPersistentScheduler2D(BaseTileScheduler):
             self.m_idx = tile_row * CLUSTER_M + cluster_m_offset
             self.n_idx = tile_col * CLUSTER_N + cluster_n_offset
 
-        if self._serpentine:
+        if T.constexpr(self._serpentine):
             self._update_serpentine(tile_linear, set_tile_coords)
         else:
             self._update_group_major(tile_linear, set_tile_coords)

Reply via email to