Class KernelInterface

Class Documentation

class KernelInterface

KernelInterface defined customized op’s interface, such as infershape, and so on.

Public Functions

virtual ~KernelInterface() = default

Destructor of KernelInterface.

inline virtual Status Infer(std::vector<mindspore::MSTensor> *inputs, std::vector<mindspore::MSTensor> *outputs, const schema::Primitive *primitive)

(deprecated) Method to infer customized op’s output shape.

Parameters
  • inputs[in] Define the input tensors of op.

  • outputs[in] Define the output tensors of op.

  • primitive[in] Define the attributes of op.

Returns

Status as a status identification of inferring.

inline virtual Status Infer(std::vector<mindspore::MSTensor> *inputs, std::vector<mindspore::MSTensor> *outputs, const schema::Primitive *primitive, const Kernel *kernel)

Method to infer customized op’s output shape.

Parameters
  • inputs[in] Define the input tensors of op.

  • outputs[in] Define the output tensors of op.

  • primitive[in] Define the attributes of op.

  • kernel[in] Define the kernel of a certain op.

Returns

Status as a status identification of inferring.