dtypes
DType
dataclass
¤
DType(
priority: int,
bitsize: int,
name: str,
fmt: FmtStr | None,
count: int,
_scalar: DType | None,
)
dtypes
¤
Methods:
-
is_float– -
is_int– -
is_unsigned– -
is_bool– -
from_py– -
as_const– -
finfo–(exponent, mantissa)
-
imageh– -
imagef–
Attributes:
-
void(Final[DType]) – -
index(Final[DType]) – -
bool(Final[DType]) – -
int8(Final[DType]) – -
uint8(Final[DType]) – -
int16(Final[DType]) – -
uint16(Final[DType]) – -
int32(Final[DType]) – -
uint32(Final[DType]) – -
int64(Final[DType]) – -
uint64(Final[DType]) – -
_uint128(Final[DType]) – -
_uint256(Final[DType]) – -
fp8e4m3(Final[DType]) – -
fp8e5m2(Final[DType]) – -
fp8e4m3fnuz(Final[DType]) – -
fp8e5m2fnuz(Final[DType]) – -
float16(Final[DType]) – -
bfloat16(Final[DType]) – -
float32(Final[DType]) – -
float64(Final[DType]) – -
half– -
float– -
double– -
uchar– -
ushort– -
uint– -
ulong– -
char– -
short– -
int– -
long– -
default_float(DType) – -
default_int(DType) – -
fp8_ocp– -
fp8_fnuz– -
fp8s– -
floats– -
int8s– -
int16s– -
int32s– -
int64s– -
uints– -
sints– -
ints– -
all–
is_float
¤
Source code in tinygrad/dtype.py
149 150 151 | |
is_int
¤
Source code in tinygrad/dtype.py
152 153 154 | |
is_unsigned
¤
Source code in tinygrad/dtype.py
155 156 157 | |
is_bool
¤
Source code in tinygrad/dtype.py
158 159 | |
from_py
¤
from_py(x) -> DType
Source code in tinygrad/dtype.py
160 161 162 163 164 165 166 167 | |
as_const
¤
Source code in tinygrad/dtype.py
168 169 170 171 172 173 174 175 176 177 | |
finfo
¤
(exponent, mantissa)
Source code in tinygrad/dtype.py
178 179 180 181 182 183 | |
imageh
¤
imageh(shp, pitch=-1)
Source code in tinygrad/dtype.py
213 214 | |
imagef
¤
imagef(shp, pitch=-1)
Source code in tinygrad/dtype.py
215 216 | |