Template Class IDelegate

Inheritance Relationships

Base Type

  • public mindspore::AbstractDelegate

Derived Type

Class Documentation

template<typename Graph, typename Node, typename Kernel>
class IDelegate : public mindspore::AbstractDelegate

Subclassed by mindspore::Delegate

Public Functions

virtual void ReplaceNodes(const std::shared_ptr<Graph> &graph) = 0

Replace the nodes in model with delegate nodes, delegate will create kernels by its delegate nodes.

参数

graph[in] The graph to be built.

virtual bool IsDelegateNode(const std::shared_ptr<Node> &node) = 0

Check if this node is belong to this delegate.

参数

node[in] The node need to be checked.

返回

True if the node is belong to this delegate, otherwise return false.

virtual std::shared_ptr<Kernel> CreateKernel(const std::shared_ptr<Node> &node) = 0

Create a delegate kernel if the node is a delegate node.

参数

node[in] Define the delegate model to be built.

返回

The delegate kernel, if the node is not a delegate node, return nullptr.