MCPcopy
hub / github.com/tinygrad/tinygrad / postrender

Method postrender

tinygrad/renderer/nir.py:298–303  ·  view source on GitHub ↗
(self, uops:list[UOp])

Source from the content-addressed store, hash-verified

296 self.param_sz = sum([8 if u.op == Ops.PARAM else u.dtype.itemsize for u in uops if u.op in (Ops.PARAM, Ops.DEFINE_VAR)])
297
298 def postrender(self, uops:list[UOp]):
299 bufs, texs, imgs = [u for u in uops if u.op == Ops.PARAM], itertools.count().__next__, itertools.count().__next__
300 for b in filter(lambda b: isinstance(b.dtype, ImageDType), bufs): nimm_set(self.r[b], texs() if b in self.texs else imgs(), dtypes.int)
301
302 self.b.shader.contents.info.num_ubos = len([u for u in bufs if not isinstance(u.dtype, ImageDType)])
303 self.b.shader.contents.info.num_images = texs() + imgs()
304
305 def supported_dtypes(self): return {d for d in NIRRenderer.supported_dtypes(self) if d != dtypes.double}

Callers

nothing calls this directly

Calls 2

nimm_setFunction · 0.85
countMethod · 0.45

Tested by

no test coverage detected