use pattern matcher for image [run_process_replay] (#6762)

* use pattern matcher for image [run_process_replay]

* try again

* this
This commit is contained in:
George Hotz
2024-09-26 15:49:09 +08:00
committed by GitHub
parent 197f8fd986
commit 7fca0bc912
3 changed files with 20 additions and 14 deletions

View File

@@ -27,7 +27,7 @@ class ImageDType(DType):
shape: Tuple[int, ...] # arbitrary arg for the dtype, used in image for the shape
base: DType
local: bool = False # images are never local
def scalar(self): return self.base
def scalar(self) -> DType: return self.base
def vec(self, sz:int): return self.base.vec(sz)
def __repr__(self): return f"dtypes.{self.name}({self.shape})"