This MR simply adds the Python binding for the Memorize_Op
class and the Memorize()
factory function.
Added:
pybind_Memorize.cpp
: the binding initialization functionUpdated:
pybind_core.cpp
: call the initialization functionMemorize.hpp
: changed inherited Registrable
template type to ...std::shared_ptr<OperatorImpl>...
instead of ...std::unique_ptr<OperatorImpl>...
. See questions below.I changed the inheritance of Memorize_Op
in Memorize.hpp
to Registrable<Memorize_Op, ..., std::shared_ptr<OperatorImpl>...)
, i.e. a shared_ptr
instead of a unique_ptr
, as it is what I observed for the other python binded operators.
Without this change it is not possible to compile the declare_registrable<Memorize_Op>(m, "MemorizeOp")
call due to type conflicts within the Registrable
templates.
Though, actually I do not understand the implications, can you clarify please?
OK, see answer below.
Registrable<Memorize_Op, ..., std::shared_ptr<OperatorImpl>...)
or leave as it was: Registrable<Memorize_Op, ..., std::unique_ptr<OperatorImpl>...)
? Yes, see answer belowCopyright © Eclipse Foundation, Inc. All Rights Reserved. Privacy Policy | Terms of Use | Copyright Agent