add float4 support to LLVM (#8920)

* add float4 support to LLVM

* is_bool
This commit is contained in:
George Hotz
2025-02-06 12:15:50 +08:00
committed by GitHub
parent b05c536f74
commit 3e082d4a9d
2 changed files with 18 additions and 3 deletions

View File

@@ -80,6 +80,8 @@ class dtypes:
@functools.lru_cache(None)
def is_unsigned(x: DType) -> bool: return x.scalar() in dtypes.uints
@staticmethod
def is_bool(x: DType) -> bool: return x.scalar() == dtypes.bool
@staticmethod
def from_py(x) -> DType:
if x.__class__ is float: return dtypes.default_float
if x.__class__ is int: return dtypes.default_int