MCPcopy Create free account
hub / github.com/pytorch/executorch / __call__

Method __call__

backends/mlx/patterns.py:113–128  ·  view source on GitHub ↗
(self, P: MLXProgramBuilder, n: Node)

Source from the content-addressed store, hash-verified

111 )
112
113 def __call__(self, P: MLXProgramBuilder, n: Node) -> Slot:
114 assert n == self.head
115 dst, update, indices = P.slot_map([self.dst, self.update, self.indices])
116
117 P.emit(
118 IndexCopyNode(
119 dst=P.slot_to_tid(dst),
120 update=P.slot_to_tid(update),
121 indices=P.slot_to_tid(indices),
122 out=P.slot_to_tid(dst),
123 axis=self.axis,
124 )
125 )
126
127 P.set_slot(n, dst)
128 return dst
129
130
131@REGISTRY.register_pattern(name="ET_KV_CACHE_UPDATE")

Callers

nothing calls this directly

Calls 4

slot_mapMethod · 0.80
emitMethod · 0.80
slot_to_tidMethod · 0.80
set_slotMethod · 0.45

Tested by

no test coverage detected