This commit is contained in:
George Hotz 2025-08-10 14:36:35 -07:00
commit 48ca6d888d

View file

@ -144,7 +144,7 @@ class UOp(MathTrait, metaclass=UOpMetaClass):
if self.op in GroupOp.Movement: return unwrap(self.src[0].st).mop(self.op, self.arg)
# CONST with a DEVICE has a shape of ()
if self.op is Ops.CONST and len(self.src) and self.src[0].op is Ops.DEVICE: return ShapeTracker.from_shape(())
if self.op is Ops.CONTIGUOUS and self.tag == 1: return ShapeTracker.from_shape(self.arg)
#if self.op is Ops.CONTIGUOUS and self.tag == 1: return ShapeTracker.from_shape(self.arg)
# BufferOps and ASSIGN flow ShapeTracker from a direct edge
if self.op in {Ops.STORE, Ops.ASSIGN, Ops.LOAD}: return self.src[0].st
if self.op in GroupOp.Buffer: return views[0] if (views:=[x.st for x in self.src if x.op is Ops.VIEW]) else None