move is_dtype_supported logic to renderer (#14188)

* move is_dtype_supported logic to renderer

* fix CPU_COUNT

* mypy happy

* early import libclang too with llvm

* run with debug

* skip autogen tests if MTLCompiler or llvm is loaded

* run autogen tests separately in CI

* lint
This commit is contained in:
2026-01-18 22:37:04 -05:00
committed by GitHub
parent 7abe9b020f
commit 161fee9a48
13 changed files with 75 additions and 46 deletions
+3
View File
@@ -231,6 +231,9 @@ class PythonRenderer(Renderer):
case "": pass
case _: raise RuntimeError(f"can't EMULATE device: {EMULATE.value}")
# supports half memoryview in 3.12+ https://github.com/python/cpython/issues/90751
def is_dtype_supported(self, dtype:DType) -> bool: return dtype != dtypes.half or sys.version_info >= (3, 12)
def render(self, uops:list[UOp]) -> str:
# the value of SPECIAL comes from local/global_size, not form its source
lops = [(u.op, u.dtype, [uops.index(v) for v in u.src if u.op is not Ops.SPECIAL], u.arg) for u in uops]