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

Function _convert_evalue

exir/_serialize/_flatbuffer_program.py:138–148  ·  view source on GitHub ↗
(val: EValue)

Source from the content-addressed store, hash-verified

136
137
138def _convert_evalue(val: EValue) -> Any:
139 result = _flatbuffer_t_class(EValue)()
140 union_val = val.val
141 if union_val is None:
142 result.valType = _KernelTypes.KernelTypes.NONE
143 result.val = None
144 return result
145 union_name = type(union_val).__name__
146 result.valType = getattr(_KernelTypes.KernelTypes, union_name)
147 result.val = _convert_value(union_val)
148 return result
149
150
151def _convert_instruction(val: Instruction) -> Any:

Callers 1

_convert_valueFunction · 0.85

Calls 2

_flatbuffer_t_classFunction · 0.85
_convert_valueFunction · 0.85

Tested by

no test coverage detected