From 2c8f8ac611055316e5326bb5d833360ceacba5ed Mon Sep 17 00:00:00 2001 From: Roelof van Dijk <3604013+roelofvandijk@users.noreply.github.com> Date: Mon, 21 Aug 2023 23:05:13 +0200 Subject: [PATCH] perf: no ret needed (#1604) Co-authored-by: Roelof van Dijk --- tinygrad/lazy.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tinygrad/lazy.py b/tinygrad/lazy.py index 0164725be3..ab3f6213d6 100644 --- a/tinygrad/lazy.py +++ b/tinygrad/lazy.py @@ -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"