This commit is contained in:
2026-08-12 19:09:39 -07:00
parent 672747b16b
commit 23744a5e55
+1
View File
@@ -9,6 +9,7 @@ from tinygrad.uop.ops import AxisType, KernelInfo, Ops
def amd_custom_kernels_supported(device:str) -> bool:
# the custom kernels are tuned for RDNA3 (gfx11): the WMMA register layouts don't match gfx12 (RDNA4)
# or CDNA (MFMA-only, wave64), and the dp4a builtins and 32-lane wave ops aren't portable either.
if device.split(":")[0] != "AMD": return False
# Device[...] trips ALLOW_DEVICE_USAGE=0 in function contexts, the device is always open here anyway
with Context(ALLOW_DEVICE_USAGE=1):
return (t:=getattr(Device[device], "target", None)) is not None and t[0] == 11