Files
tilelang/testing/python/language/test_tilelang_language_let.py
T
Lei WangandClaude Opus 4.6 046b1bdc69 [FFI] Remove upper version bound on apache-tvm-ffi (#2071)
* ugrade tvm

* Remove upper version bound on apache-tvm-ffi

The <0.1.10 pin was introduced to avoid a derived_object regression,
which has since been resolved. Removing the cap allows compatibility
with newer versions of apache-tvm-ffi.

* Enhance ptxas usage level handling in CUDA compilation

Added type conversion for ptxas_usage_level in both tilelang_callback_cuda_compile and LibraryGenerator classes to ensure it is treated as an integer when specified. This change improves the robustness of the configuration handling for CUDA compilation.

* Fix IR string representation issues from tvm-ffi upgrade

The new tvm-ffi version changes str() output for IR nodes from compact
script format to verbose repr format. This caused two issues:
1. T.call_packed("name") is now tir.tvm_call_packed with value="name"
2. tir.Var str() now produces "tir.Var(span=None, ...)" instead of name

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Simplify TMA descriptor globalAddress handling in cutedsl wrapper

Since global_address is now converted to string by pythonic_expr_func
in parse_tma_descriptor_args, remove the unnecessary tir.Var type check
and .name extraction.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Refactor CUDA test for vectorization and update IR string representation

Updated the test for vectorization in CUDA by replacing the direct function definition with a JIT-compiled kernel. Additionally, modified the string representation of IR modules in multiple tests to use the script format instead of the default string format, ensuring consistency and clarity in assertions.

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-21 18:09:24 +08:00

24 lines
570 B
Python

import tilelang.testing
from tilelang import tvm as tvm
from tilelang import language as T
@tilelang.jit
def test_kernel(
A: T.Tensor((16, 16), dtype=T.float32),
):
for _blockIdx in T.thread_binding(1, thread="blockIdx.x"):
for _threadIdx in T.thread_binding(128, thread="threadIdx.x"):
b = A[0, 0:4]
A[0, 4:8] = b
@tilelang.testing.requires_cuda
def test_let_vectorize_load():
kernel_source = test_kernel.get_kernel_source()
assert "float4 b" in kernel_source
if __name__ == "__main__":
tilelang.testing.main()