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

Function _convert_double

exir/_serialize/_flatbuffer_program.py:127–135  ·  view source on GitHub ↗
(val: Double)

Source from the content-addressed store, hash-verified

125
126
127def _convert_double(val: Double) -> Any:
128 result = _flatbuffer_t_class(Double)()
129 double_val = val.double_val
130 if isinstance(double_val, str):
131 # the string is read as a Union of float and string (see exir/schema.py).
132 result.doubleVal = float(double_val)
133 else:
134 result.doubleVal = double_val
135 return result
136
137
138def _convert_evalue(val: EValue) -> Any:

Callers 1

_convert_valueFunction · 0.85

Calls 1

_flatbuffer_t_classFunction · 0.85

Tested by

no test coverage detected