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

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


The following commit(s) were added to refs/heads/tqchen/printer-refinement by 
this push:
     new f0dfd8ec71 [Script] Preserve layout expectations and guard symbolic 
syntax parsing
f0dfd8ec71 is described below

commit f0dfd8ec71b50b34a43cb9c7e6f121297ca06e54
Author: Tianqi Chen <[email protected]>
AuthorDate: Fri Oct 2 00:47:28 2026 +0000

    [Script] Preserve layout expectations and guard symbolic syntax parsing
---
 tests/python/relax/script/test_relax_script_printer.py   | 6 +++---
 tests/python/s_tir/script/test_s_tir_script_namespace.py | 1 +
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/tests/python/relax/script/test_relax_script_printer.py 
b/tests/python/relax/script/test_relax_script_printer.py
index 4a8ab35f95..7e48d34f40 100644
--- a/tests/python/relax/script/test_relax_script_printer.py
+++ b/tests/python/relax/script/test_relax_script_printer.py
@@ -144,7 +144,7 @@ class Module:
     I.module_attrs({"device_num": 10})
     I.module_global_infos({"mesh": [R.device_mesh((2, 2), I.Range(0, 4)), 
R.device_mesh((1,), I.Range(4, 5))]})
     @Ts.prim_func
-    def tir_func(x: T.Buffer((T.int64(128), T.int64(128)), "float32"), y: 
T.Buffer((T.int64(128), T.int64(128)), "float32")):
+    def tir_func(x: T.Buffer((T.int64(128), T.int64(128)), "float32", 
layout="default"), y: T.Buffer((T.int64(128), T.int64(128)), "float32", 
layout="default")):
         T.func_attr({"tirx.noalias": True})
         with Ts.sblock("root"):
             Ts.reads()
@@ -893,7 +893,7 @@ from __future__ import annotations
 @I.ir_module
 class Module:
     @Ts.prim_func
-    def tir_func(x: T.Buffer((T.int64(128),), "float32"), y: 
T.Buffer((T.int64(128),), "float32")):
+    def tir_func(x: T.Buffer((T.int64(128),), "float32", layout="default"), y: 
T.Buffer((T.int64(128),), "float32", layout="default")):
         T.evaluate(0)
 
     @R.function
@@ -918,7 +918,7 @@ from __future__ import annotations
 @I.ir_module
 class Module:
     @Ts.prim_func
-    def tir_func(x: T.Buffer((T.int64(128),), "float32"), y: 
T.Buffer((T.int64(128),), "float32")):
+    def tir_func(x: T.Buffer((T.int64(128),), "float32", layout="default"), y: 
T.Buffer((T.int64(128),), "float32", layout="default")):
         T.evaluate(0)
 
     @R.function
diff --git a/tests/python/s_tir/script/test_s_tir_script_namespace.py 
b/tests/python/s_tir/script/test_s_tir_script_namespace.py
index a0d3817a20..1beb999d2b 100644
--- a/tests/python/s_tir/script/test_s_tir_script_namespace.py
+++ b/tests/python/s_tir/script/test_s_tir_script_namespace.py
@@ -30,6 +30,7 @@ from tvm.script import s_tir as Ts
 from tvm.script import tirx as T
 
 
[email protected](sys.version_info < (3, 12), reason="PEP 695 requires 
Python 3.12")
 def test_shared_operations_and_aliases():
     from tvm.script import s_tir as S
 

Reply via email to