dtypes
DType
dataclass
¤
DType(
priority: int,
itemsize: 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– -
min– -
max– -
finfo–(exponent, mantissa)
-
fields– -
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]) – -
fp8e4m3(Final[DType]) – -
fp8e5m2(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) – -
fp8s– -
floats– -
uints– -
sints– -
ints– -
all–
is_float
¤
Source code in tinygrad/dtype.py
106 107 108 | |
is_int
¤
Source code in tinygrad/dtype.py
109 110 111 | |
is_unsigned
¤
Source code in tinygrad/dtype.py
112 113 114 | |
is_bool
¤
Source code in tinygrad/dtype.py
115 116 | |
from_py
¤
from_py(x) -> DType
Source code in tinygrad/dtype.py
117 118 119 120 121 122 123 124 | |
as_const
¤
Source code in tinygrad/dtype.py
125 126 127 128 129 130 131 | |
min
¤
min(dtype: DType)
Source code in tinygrad/dtype.py
132 133 134 135 136 | |
max
¤
max(dtype: DType)
Source code in tinygrad/dtype.py
137 138 139 140 141 | |
finfo
¤
(exponent, mantissa)
Source code in tinygrad/dtype.py
142 143 144 145 146 147 | |
fields
¤
Source code in tinygrad/dtype.py
148 149 | |
imageh
¤
imageh(shp)
Source code in tinygrad/dtype.py
175 176 | |
imagef
¤
imagef(shp)
Source code in tinygrad/dtype.py
177 178 | |