From 05e7f930eebda0db1c4bb0d67034c56d3c50c3e6 Mon Sep 17 00:00:00 2001 From: chenyu Date: Tue, 2 Apr 2024 00:02:18 -0400 Subject: [PATCH] use clang as default instead of llvm for cpu (#4035) llvm has problems with fp16 and comparing with nan --- tinygrad/device.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tinygrad/device.py b/tinygrad/device.py index bc0c4c42b2..8f436edeb5 100644 --- a/tinygrad/device.py +++ b/tinygrad/device.py @@ -29,7 +29,7 @@ class _Device: def DEFAULT(self) -> str: device_from_env: Optional[str] = functools.reduce(lambda val, ele: ele if getenv(ele) == 1 else val, self._devices, None) # type: ignore if device_from_env: return device_from_env - for device in ["METAL", "HSA", "CUDA", "GPU", "LLVM", "CLANG"]: + for device in ["METAL", "HSA", "CUDA", "GPU", "CLANG", "LLVM"]: try: if self[device]: return device except Exception: pass