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

Method slot_to_vid

backends/mlx/builder/program_builder.py:294–299  ·  view source on GitHub ↗

Convert a value Slot to a Vid, recording it for later remapping.

(self, slot: Slot)

Source from the content-addressed store, hash-verified

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."""
296 assert slot.id_type != IdType.Tensor
297 vid = Vid(idx=slot.idx)
298 self._vid_slot_map.append((vid, slot))
299 return vid
300
301 def to_int_or_vid(self, v: Union[int, Slot]) -> IntOrVid:
302 if isinstance(v, Slot):

Callers 12

to_int_or_vidMethod · 0.95
to_float_or_vidMethod · 0.95
to_int_or_vid_or_tidMethod · 0.95
handlerFunction · 0.80
_narrow_handlerFunction · 0.80
_sym_size_handlerFunction · 0.80
_item_handlerFunction · 0.80
_rope_handlerFunction · 0.80
_topk_handlerFunction · 0.80
_emit_ring_bufferMethod · 0.80
emit_stop_positionFunction · 0.80
_emit_metal_kernelMethod · 0.80

Calls 1

appendMethod · 0.45

Tested by

no test coverage detected