Class Delegate
Defined in File delegate.h
Inheritance Relationships
Base Type
public IDelegate< LiteDelegateGraph, kernel::Kernel, kernel::Kernel >
Derived Type
public mindspore::CoreMLDelegate
(Class CoreMLDelegate)
Class Documentation
-
class Delegate : public IDelegate<LiteDelegateGraph, kernel::Kernel, kernel::Kernel>
Subclassed by mindspore::CoreMLDelegate
Public Functions
-
virtual Status Init() = 0
Init delegate.
Note
Init will be called in Model::Build.
- Returns
Status. If Status is kLiteNotSupport, the program will return to the MindSpore Lite inner inference.
-
inline std::shared_ptr<kernel::Kernel> CreateKernel(const std::shared_ptr<kernel::Kernel> &node) override
Create kernel.
- Parameters
node – [in] The kernel to be created.
- Returns
Created kernel.
-
inline bool IsDelegateNode(const std::shared_ptr<kernel::Kernel> &node) override
Check if the node is delegate node.
- Parameters
node – [in] The kernel to verify.
- Returns
True if the node is delegate.
-
inline void ReplaceNodes(const std::shared_ptr<LiteDelegateGraph> &graph) override
Replace the nodes in model with delegate nodes, delegate will create kernels by its delegate nodes.
- Parameters
graph – [in] The graph to be built.
-
virtual Status Build(LiteDelegateGraph *model) = 0
Build delegate graph for MindSpore model.
Note
Build will be called in Model::Build.
Note
deprecated, use ReplaceNodes and CreateKernel to build delegate model.
- Parameters
model – [in] Define the delegate model to be built.
-
virtual Status Init() = 0