This is an automated email from the ASF dual-hosted git repository. tqchen pushed a commit to branch script/canonical-parser-df in repository https://gitbox.apache.org/repos/asf/tvm.git
commit ba14bdad12ddb3835be8953d628b10ca77f86064 Author: Tianqi Chen <[email protected]> AuthorDate: Wed Sep 23 00:42:06 2026 +0000 [FR] Format builder examples and literal references --- python/tvm/relax/script/builder/__init__.py | 2 +- python/tvm/tirx/script/builder/__init__.py | 4 ++++ python/tvm/tirx/script/builder/ir.py | 4 ++++ 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/python/tvm/relax/script/builder/__init__.py b/python/tvm/relax/script/builder/__init__.py index 0916172af1..32f884ee0d 100644 --- a/python/tvm/relax/script/builder/__init__.py +++ b/python/tvm/relax/script/builder/__init__.py @@ -337,7 +337,7 @@ def return_(value=None, *, span=None): def match_cast(value, ty, *, span=None): - """Construct a match-cast descriptor for bind_ to consume.""" + """Construct a match-cast descriptor for ``bind_`` to consume.""" if value is None: raise ValueError("The match-cast value cannot be None") ty = _type(ty) diff --git a/python/tvm/tirx/script/builder/__init__.py b/python/tvm/tirx/script/builder/__init__.py index 6df394bcec..894f0ade96 100644 --- a/python/tvm/tirx/script/builder/__init__.py +++ b/python/tvm/tirx/script/builder/__init__.py @@ -633,11 +633,15 @@ def match_buffer(*args, **kwargs): Example ------- Match buffer from function parameter + .. code-block:: python + A = T.match_buffer(a, (128, 128), dtype="float32") Match buffer from Buffer subregion + .. code-block:: python + A = T.match_buffer(B[0:128, i * 128 : i * 128 + 128], (128, 128), dtype="float32") Parameters diff --git a/python/tvm/tirx/script/builder/ir.py b/python/tvm/tirx/script/builder/ir.py index 9762516ff0..4ea7c0f15d 100644 --- a/python/tvm/tirx/script/builder/ir.py +++ b/python/tvm/tirx/script/builder/ir.py @@ -501,11 +501,15 @@ def match_buffer( Example ------- Match buffer from function parameter + .. code-block:: python + A = T.match_buffer(a, (128, 128), dtype="float32") Match buffer from Buffer subregion + .. code-block:: python + A = T.match_buffer(B[0:128, i * 128 : i * 128 + 128], (128, 128), dtype="float32") Parameters
