From 146f1c784e82d102db368ea46375ca7f90aaf372 Mon Sep 17 00:00:00 2001 From: qazal Date: Tue, 28 May 2024 23:40:06 +0300 Subject: [PATCH] save one line --- tinygrad/codegen/linearizer.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/tinygrad/codegen/linearizer.py b/tinygrad/codegen/linearizer.py index 60fbf191ea..6fd48e6f4a 100644 --- a/tinygrad/codegen/linearizer.py +++ b/tinygrad/codegen/linearizer.py @@ -352,9 +352,8 @@ class Linearizer(Kernel): self.loop_uops[var.expr] = self.uops.add(UOps.DEFINE_VAR, dtypes.int32, (), var) # define local buffers for aliases in self.local_alias.values(): - for lb in aliases.values(): - self.buf_uops[self.bufs.index(lb)] = self.uops.add(UOps.DEFINE_LOCAL, - PtrDType(dtypes.float32), (), (lb.name, self.sts[self.bufs.index(lb)].size)) + for lb in aliases.values(): self.buf_uops[self.bufs.index(lb)] = self.uops.add(UOps.DEFINE_LOCAL, PtrDType(lb.dtype), + (), (lb.name, self.sts[self.bufs.index(lb)].size)) # add a local buffer for multistage reduce. # TODO: use local alias if self.group_for_reduces: # TODO: the strides of this can be controlled