Class Converter¶
Defined in File plugin_registry.h
Class Documentation¶
-
class Converter¶
A
Converter
is used in order to convertPyObject
s/py::object
into anIValue
or some other representation such as storage.Public Functions
-
virtual ~Converter() = default¶
-
virtual multipy::optional<at::IValue> toTypeInferredIValue(py::handle input) = 0¶
Converts a
py::handle
to anIValue
-
virtual multipy::optional<py::object> toPyObject(at::IValue ivalue) = 0¶
Converts an
IValue
into apy::object
-
virtual multipy::optional<at::Storage> createStorage(PyObject *obj) = 0¶
Converts an
PyObject
into aStorage
-
virtual multipy::optional<PyObject*> createPyObject(const at::Storage &storage) = 0¶
Creates a
PyObject
fromstorage
-
virtual multipy::optional<THPDtype*> getTHPDtype(at::ScalarType scalarType) = 0¶
-
virtual ~Converter() = default¶