shapetracker creates less views

This commit is contained in:
George Hotz 2023-01-12 14:04:04 -08:00
commit 698143aebc

View file

@ -99,7 +99,7 @@ class ShapeTracker:
def strided(self, *arg):
view = View([x[0] for x in arg], [x[1] for x in arg])
# TODO: this does not always require a new view if non contiguous
if self.contiguous:
if self.views[-1].contiguous:
self.views[-1] = view
else:
self.views.append(view)