Class RegisterKernelInterface
Defined in File register_kernel_interface.h
Class Documentation
-
class RegisterKernelInterface
RegisterKernelInterface defined registration and acquisition of KernelInterface.
Public Static Functions
-
static inline Status CustomReg(const std::string &provider, const std::string &op_type, const KernelInterfaceCreator creator)
Static method to register op whose primitive type is custom.
- Parameters
provider – [in] Define the identification of user.
op_type – [in] Define the concrete type of a custom op.
creator – [in] Define the KernelInterface create function.
- Returns
Status as a status identification of registering.
-
static inline Status Reg(const std::string &provider, int op_type, const KernelInterfaceCreator creator)
Static method to register op whose primitive type is ordinary.
- Parameters
provider – [in] Define the identification of user.
op_type – [in] Define the ordinary op type.
creator – [in] Define the KernelInterface create function.
- Returns
Status as a status identification of registering.
-
static inline std::shared_ptr<kernel::KernelInterface> GetKernelInterface(const std::string &provider, const schema::Primitive *primitive, const kernel::Kernel *kernel = nullptr)
Static method to get registration of a certain op.
- Parameters
provider – [in] Define the identification of user.
primitive – [in] Define the attributes of a certain op.
kernel – [in] Define the kernel of a certain op.
- Returns
Boolean value to represent registration of a certain op is existing or not.
-
static inline Status CustomReg(const std::string &provider, const std::string &op_type, const KernelInterfaceCreator creator)
Static method to register op whose primitive type is custom.
- Parameters
provider – [in] Define the identification of user.
op_type – [in] Define the concrete type of a custom op.
creator – [in] Define the KernelInterface create function.
- Returns
Status as a status identification of registering.
-
static inline Status Reg(const std::string &provider, int op_type, const KernelInterfaceCreator creator)
Static method to register op whose primitive type is ordinary.
- Parameters
provider – [in] Define the identification of user.
op_type – [in] Define the ordinary op type.
creator – [in] Define the KernelInterface create function.
- Returns
Status as a status identification of registering.
-
static inline std::shared_ptr<kernel::KernelInterface> GetKernelInterface(const std::string &provider, const schema::Primitive *primitive, const kernel::Kernel *kernel = nullptr)
Static method to get registration of a certain op.
- Parameters
provider – [in] Define the identification of user.
primitive – [in] Define the attributes of a certain op.
kernel – [in] Define the kernel of a certain op.
- Returns
Boolean value to represent registration of a certain op is existing or not.
-
static inline Status CustomReg(const std::string &provider, const std::string &op_type, const KernelInterfaceCreator creator)