diff --git a/tinygrad/ops.py b/tinygrad/ops.py index b08d54efd5..0f7a0c0d5e 100644 --- a/tinygrad/ops.py +++ b/tinygrad/ops.py @@ -345,7 +345,6 @@ class UOp(MathTrait, metaclass=UOpMetaClass): if count == 1: return self return UOp(Ops.VECTORIZE, self.dtype.vec(count), (self,)*count) def cast(self, dtype:DType, bitcast=False, allow_buffer_view=True): - if self.dtype == dtype: return self # TODO: move this to the scheduler if bitcast: return self.bitcast(dtype, allow_buffer_view) if self._device is not None and self._device.startswith("DISK"): raise RuntimeError("CAST isn't supported on DISK") if getenv("CAST_BEFORE_VIEW", 1) and dtype.itemsize <= self.dtype.itemsize and self is not self.base: