remove BUFFER_VIEW from ended_ranges special case [pr] (#14986)

* remove BUFFER_VIEW from ended_ranges special case [pr]

* will fix later
This commit is contained in:
chenyu
2026-02-24 10:37:29 -05:00
committed by GitHub
parent 5fd4fc0c6d
commit e5d27a3773

View File

@@ -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