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

cbalint13 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 001ed57083 [Schedule] Fix LocalBuilder Check failed: 
(index_map_func.has_value()) is false (#18525)
001ed57083 is described below

commit 001ed57083df084a591c2401cf892248b54ff3fc
Author: Asuka <[email protected]>
AuthorDate: Thu Dec 4 19:46:16 2025 +0800

    [Schedule] Fix LocalBuilder Check failed: (index_map_func.has_value()) is 
false (#18525)
    
    This commit fixes tvm.error.InternalError: Check failed:
    (index_map_func.has_value()) is false in
    [#18472](https://github.com/apache/tvm/issues/18472)
    
    **Why**
    When using mma for MultiLevelTilingTensorCore, users must manually pass
    tvm.tir.tensor_intrin as an initializer to register it in LocalBuilder.
    This is inconsistent with the wmma workflow, where tvm.tir.tensor_intrin
    is imported by default in
    
[tune_context.py](https://github.com/apache/tvm/blob/main/python/tvm/meta_schedule/tune_context.py#L109)
    to ensure that the TensorIntrin required by wmma is registered in
    advance. Additionally, the corresponding error message is not
    straightforward, which can be confusing for new users who are not
    familiar with TVM.
    
    **How**
    by adding import tensor_intrin in the default_build
    
    ---------
    
    Co-authored-by: Balint Cristian <[email protected]>
    Co-authored-by: gemini-code-assist[bot] 
<176961590+gemini-code-assist[bot]@users.noreply.github.com>
---
 python/tvm/meta_schedule/builder/local_builder.py | 1 +
 1 file changed, 1 insertion(+)

diff --git a/python/tvm/meta_schedule/builder/local_builder.py 
b/python/tvm/meta_schedule/builder/local_builder.py
index 6bd8f10ed8..c5d8b21d89 100644
--- a/python/tvm/meta_schedule/builder/local_builder.py
+++ b/python/tvm/meta_schedule/builder/local_builder.py
@@ -254,6 +254,7 @@ def default_build(mod: IRModule, target: Target, _params: 
Optional[Dict[str, Ten
     """
     # pylint: disable=import-outside-toplevel
     from tvm.driver import build as tvm_build
+    import tvm.tir.tensor_intrin  # pylint: disable=unused-import
     from tvm.tir.transform import RemoveWeightLayoutRewriteBlock
 
     # pylint: enable=import-outside-toplevel

Reply via email to