Skip to content

Commit f98bf52

Browse files
committed
[FIX][PY] Repair tensorize PrimExpr dtype access
1 parent 98c8b77 commit f98bf52

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

tests/python/s_tir/schedule/test_tir_schedule_tensorize.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -842,7 +842,7 @@ def _tir_packed_int_to_int_to_float(storage_nbit: int):
842842
storage_dtype = "int" + str(storage_nbit)
843843

844844
def f_convert(nbit: int, val: tirx.PrimExpr, pos: tirx.PrimExpr, dtype: str):
845-
assert val.dtype == storage_dtype
845+
assert val.ty.dtype == storage_dtype
846846
mask = tirx.const((1 << nbit) - 1, "int32")
847847
unextended = (val >> (pos.astype("int32") * tirx.const(nbit, "int32"))) & mask
848848
return tirx.Cast(dtype, (unextended << tirx.const(32 - nbit, "int32")) >> tirx.const(32 - nbit, "int32"))

0 commit comments

Comments
 (0)