MCPcopy
hub / github.com/tinygrad/tinygrad / ranges_of

Method ranges_of

tinygrad/codegen/opt/postrange.py:103–103  ·  view source on GitHub ↗
(self, *axis_type:AxisType)

Source from the content-addressed store, hash-verified

101 return replaced_rng, new_rng
102
103 def ranges_of(self, *axis_type:AxisType) -> list[UOp]: return [r for r in self.rngs if r.arg[-1] in axis_type]
104 def axes_of(self, *axis_type:AxisType) -> list[int]: return [i for i,t in enumerate(self.axis_types) if t in axis_type]
105
106 def upcast_size(self): return prod(self.full_shape[a] for a in self.axes_of(AxisType.UPCAST, AxisType.UNROLL))

Callers 1

hand_coded_optimizationsFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected