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

Method slot_to_tid

backends/mlx/builder/program_builder.py:286–292  ·  view source on GitHub ↗

Convert a tensor Slot to a Tid, recording it for later remapping.

(self, slot: Slot)

Source from the content-addressed store, hash-verified

284 raise KeyError(f"Unable to resolve placeholder {placeholder_name}")
285
286 def slot_to_tid(self, slot: Slot) -> Tid:
287 """Convert a tensor Slot to a Tid, recording it for later remapping."""
288 assert slot.id_type == IdType.Tensor
289 # Use local slot.idx as placeholder - will be remapped to global idx in build()
290 tid = Tid(idx=slot.idx)
291 self._tid_slot_map.append((tid, slot))
292 return tid
293
294 def slot_to_vid(self, slot: Slot) -> Vid:
295 """Convert a value Slot to a Vid, recording it for later remapping."""

Callers 15

to_int_or_vid_or_tidMethod · 0.95
handlerFunction · 0.80
_isnan_handlerFunction · 0.80
_linear_handlerFunction · 0.80
_addmm_handlerFunction · 0.80
_mm_handlerFunction · 0.80
_view_handlerFunction · 0.80
_clone_handlerFunction · 0.80
_copy_handlerFunction · 0.80
_dim_order_clone_handlerFunction · 0.80
_dim_order_copy_handlerFunction · 0.80

Calls 1

appendMethod · 0.45

Tested by 1

_vadd_handlerFunction · 0.64