From e5d27a3773c4781b79ce1fd38cd39c3ed729aecd Mon Sep 17 00:00:00 2001 From: chenyu Date: Tue, 24 Feb 2026 10:37:29 -0500 Subject: [PATCH] remove BUFFER_VIEW from ended_ranges special case [pr] (#14986) * remove BUFFER_VIEW from ended_ranges special case [pr] * will fix later --- tinygrad/uop/ops.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tinygrad/uop/ops.py b/tinygrad/uop/ops.py index cb81df22fa..60f9684ee9 100644 --- a/tinygrad/uop/ops.py +++ b/tinygrad/uop/ops.py @@ -212,7 +212,7 @@ class UOp(OpMixin, metaclass=UOpMetaClass): return None case Ops.CAST: - # when PTX cases from ptr to non ptr, remove the shape + # when PTX casts from ptr to non ptr, remove the shape if isinstance(self.src[0].dtype, PtrDType) and not isinstance(self.src[0].dtype, ImageDType) and not isinstance(self.dtype, PtrDType): return None @@ -333,7 +333,7 @@ class UOp(OpMixin, metaclass=UOpMetaClass): if self.op in range_start: return self.src[range_start[self.op]:] if self.op is Ops.AFTER: return tuple(flatten([x.ended_ranges for x in self.src[1:]])) # TODO: copy isn't using range properly and isn't ending the range it uses, remove this - if self.op in {Ops.COPY, Ops.BUFFER_VIEW}: return self.src[0].ranges + if self.op in {Ops.COPY}: return self.src[0].ranges return () # determine what ranges this is in