MCPcopy
hub / github.com/tinygrad/tinygrad / colored_shape

Method colored_shape

tinygrad/codegen/opt/postrange.py:92–92  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

90 else: ret.append(axis_colors[x])
91 return ret
92 def colored_shape(self) -> str: return ' '.join([colored(f'{x.src[0].render():>4s}', color) for x,color in zip(self.rngs, self.colors())])
93
94 def shift_to(self, rng:UOp, amount:int, new_type:AxisType, top:bool=False, input_new_rng:UOp|None=None):
95 if (old_sz:=rng.src[0].divides(amount)) is None:

Callers 2

shift_toMethod · 0.95
beam_searchFunction · 0.80

Calls 3

colorsMethod · 0.95
coloredFunction · 0.90
renderMethod · 0.45

Tested by

no test coverage detected