RuntimeError for unsupported dtype in PYTHON (#11686)

This commit is contained in:
chenyu
2025-08-15 13:59:27 -04:00
committed by GitHub
parent b970cd6895
commit 5d6963c968
+2 -1
View File
@@ -61,7 +61,8 @@ class PythonProgram:
i += 1
continue
if uop in {Ops.DEFINE_GLOBAL, Ops.DEFINE_LOCAL, Ops.DEFINE_REG}:
assert dtype.fmt is not None and isinstance(dtype, PtrDType)
assert isinstance(dtype, PtrDType), dtype
if dtype.fmt is None: raise RuntimeError(f"{dtype=} is not supported")
if TYPE_CHECKING or sys.version_info < (3, 12): assert dtype.fmt != "e"
if uop is Ops.DEFINE_REG:
# REGs are per thread