mirror of
https://github.com/tile-ai/tilelang.git
synced 2026-10-23 07:00:29 +08:00
Fix MFMA dtype args passed as DataType instead of str When local_size is 1, compute_a_dtype/compute_b_dtype/compute_out_dtype are assigned directly from self.a_dtype etc., which are tvm_ffi DataType objects (a str subclass). The TVM FFI C++ layer dispatches DataType before str in its type conversion, so these never get auto-converted to StringImm (a PrimExpr). This causes MFMA GEMM compilation to fail on ROCm with: TypeError: Expected Array<ir.PrimExpr> but got Array[index 3: DataType] The bug only triggers when local_size == 1 (e.g. float32 GEMM), because when local_size > 1 the f-string produces a plain str. Fix: convert dtype attrs to str() before building compute dtype strings. Add test: testing/python/amd/test_mfma_dtype_str_bug.py