Template Class IKernel

Inheritance Relationships

Base Type

Class Documentation

template<typename Primitive>
class IKernel : public mindspore::kernel::MSKernel

The Kernel class is used to define a MindSpore Kernel with specific primitive.

Public Functions

inline IKernel(const std::vector<mindspore::MSTensor> &inputs, const std::vector<mindspore::MSTensor> &outputs, const Primitive *primitive, const mindspore::Context *ctx)

Constructor.

Parameters
  • inputs[in] define the input tensors for kernel.

  • outputs[in] define the output tensors for kernel.

  • primitive[in] define the primitive of kernel.

  • ctx[in] define the context for kernel.

~IKernel() override = default

Destructor.

inline const Primitive *primitive() const

get the primitive of kernel.

Returns

the primitive of kernel generated by flatbuffers.