mirror of
https://github.com/tinygrad/tinygrad.git
synced 2026-01-09 15:08:02 -05:00
no void
This commit is contained in:
@@ -51,7 +51,7 @@ def _floor(x):
|
||||
def _cvt(src_dt: DType, dst_dt: DType):
|
||||
"""Create a conversion function that asserts input type and casts to output type."""
|
||||
def convert(x: UOp) -> UOp:
|
||||
assert x.dtype == src_dt or x.dtype == dtypes.void, f"Expected {src_dt}, got {x.dtype}"
|
||||
assert x.dtype == src_dt, f"Expected {src_dt}, got {x.dtype}"
|
||||
return UOp(Ops.CAST, dst_dt, (x,))
|
||||
return convert
|
||||
|
||||
|
||||
Reference in New Issue
Block a user