From 9d0dad14a519da7dc78e52ba87e9be30e5194681 Mon Sep 17 00:00:00 2001 From: Chen-Yu Yang Date: Sat, 14 Dec 2024 12:06:36 -0800 Subject: [PATCH] remove an if in reshape [pr] not needed, likely a hack to work around pre-resolve? --- tinygrad/shape/view.py | 1 - 1 file changed, 1 deletion(-) diff --git a/tinygrad/shape/view.py b/tinygrad/shape/view.py index 2d0f60ac9a23..ee71ce832237 100644 --- a/tinygrad/shape/view.py +++ b/tinygrad/shape/view.py @@ -324,7 +324,6 @@ def reshape(self, new_shape: Tuple[sint, ...]) -> Optional[View]: r_strides, r_new_shape = [], reversed(new_shape) for merged_size, new_stride, real_size in reversed(merge_dims(self.shape, self.strides, self.mask)): - if new_stride == 0: real_size = 0 # TODO: write with get_contraction acc = 1 # TODO: third resolve shouldn't be needed