mirror of
https://github.com/tinygrad/tinygrad.git
synced 2026-01-25 14:58:46 -05:00
perf: no ret needed (#1604)
Co-authored-by: Roelof van Dijk <roelof.van.dijk@vitestro.com>
This commit is contained in:
@@ -188,8 +188,7 @@ class LazyBuffer:
|
||||
def toCPU(self):
|
||||
assert self.dtype.np, f"{self.dtype} is not supported in toCPU"
|
||||
realized = self.cast((dtypes.from_np(self.dtype.np), False)).contiguous().realize().realized
|
||||
ret = cast(RawBuffer, realized).toCPU().reshape(self.shape)
|
||||
return ret
|
||||
return cast(RawBuffer, realized).toCPU().reshape(self.shape)
|
||||
|
||||
def cast(self:LazyBuffer, arg:Tuple[DType, bool]) -> LazyBuffer:
|
||||
assert not arg[1] or self.dtype.itemsize == arg[0].itemsize, "can't bitcast mismatched dtype itemsizes"
|
||||
|
||||
Reference in New Issue
Block a user