Template Class DelegateModel
Defined in File delegate.h
Class Documentation
-
template<class T>
class DelegateModel Public Functions
-
inline DelegateModel(std::vector<kernel::Kernel*> *kernels, const std::vector<MSTensor> &inputs, const std::vector<MSTensor> &outputs, const std::map<kernel::Kernel*, const T*> &primitives, SchemaVersion version)
Constructor of MindSpore Lite DelegateModel.
-
~DelegateModel() = default
Destructor of MindSpore Lite DelegateModel.
-
inline const T *GetPrimitive(kernel::Kernel *kernel) const
Get Primitive of kernel::Kernel.
- Parameters
a – [in] kernel in DelegateModel kernels vector.
- Returns
The Primitive of The kernel.
-
inline KernelIter BeginKernelIterator()
Get the begin iterator of the DelegateModel kernels vector.
- Returns
The begin iterator of the DelegateModel kernels vector.
-
inline KernelIter EndKernelIterator()
Get the end iterator of the DelegateModel kernels vector.
- Returns
The end iterator of the DelegateModel kernels vector.
-
inline KernelIter Replace(KernelIter from, KernelIter end, kernel::Kernel *graph_kernel)
Replace the continuous kernel supported by the delegate with a delegate graph kernel.
- Parameters
from – [in] Define the begin iterator of continuous kernel supported by the delegate.
end – [in] Define the end iterator of continuous kernel supported by the delegate.
- Returns
The next iterator after graph_kernel, point to the next kernel that is not visited.
-
inline const std::vector<mindspore::MSTensor> &inputs()
Get the input tensors of DelegateModel.
- Returns
The input tensor vector of DelegateModel.
-
inline const std::vector<mindspore::MSTensor> &outputs()
Get the output tensors of DelegateModel.
- Returns
The ioutput tensor vector of DelegateModel.
-
inline SchemaVersion GetVersion() const
Get the ms model version.
- Returns
The schema version for the primitives map.
-
inline DelegateModel(std::vector<kernel::Kernel*> *kernels, const std::vector<MSTensor> &inputs, const std::vector<MSTensor> &outputs, const std::map<kernel::Kernel*, const T*> &primitives, SchemaVersion version)