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

Method to_int_or_vid

backends/mlx/builder/program_builder.py:301–304  ·  view source on GitHub ↗
(self, v: Union[int, Slot])

Source from the content-addressed store, hash-verified

299 return vid
300
301 def to_int_or_vid(self, v: Union[int, Slot]) -> IntOrVid:
302 if isinstance(v, Slot):
303 return IntOrVid.from_vid(self.slot_to_vid(v))
304 return IntOrVid.from_literal(int(v))
305
306 def to_float_or_vid(self, v: Union[float, int, Slot]) -> FloatOrVid:
307 if isinstance(v, Slot):

Callers 15

handlerFunction · 0.80
_view_handlerFunction · 0.80
_slice_handlerFunction · 0.80
_narrow_handlerFunction · 0.80
_split_handlerFunction · 0.80
_repeat_handlerFunction · 0.80
_roll_handlerFunction · 0.80
_index_handlerFunction · 0.80
_slice_scatter_handlerFunction · 0.80
_arange_handlerFunction · 0.80

Calls 1

slot_to_vidMethod · 0.95

Tested by

no test coverage detected