use clang as default instead of llvm for cpu (#4035)

llvm has problems with fp16 and comparing with nan
This commit is contained in:
chenyu
2024-04-02 00:02:18 -04:00
committed by GitHub
parent 5311b45053
commit 05e7f930ee

View File

@@ -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