MCPcopy
hub / github.com/tinygrad/tinygrad / copy

Method copy

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

Source from the content-addressed store, hash-verified

41 def shape_str_to_axis(self, nms:list[str]) -> tuple[int, ...]: return tuple([self.shape_str().index(x) for x in nms])
42
43 def copy(self) -> Scheduler:
44 ret = Scheduler(self.ast, self.ren)
45 ret.dont_use_locals = self.dont_use_locals
46 ret.applied_opts = self.applied_opts[:]
47 if hasattr(self, 'tensor_core'): ret.tensor_core = self.tensor_core
48 return ret
49
50 kernel_cnt: Final[defaultdict[str, int]] = defaultdict(int)
51 def get_optimized_ast(self, name_override:str|None=None) -> UOp:

Callers 4

hand_coded_optimizationsFunction · 0.45
_try_compileFunction · 0.45
get_kernel_actionsFunction · 0.45
beam_searchFunction · 0.45

Calls 1

SchedulerClass · 0.85

Tested by

no test coverage detected