Class RegisterKernel
Defined in File register_kernel.h
Class Documentation
-
class RegisterKernel
RegisterKernel Defined registration of kernel.
Public Static Functions
-
static inline Status RegKernel(const std::string &arch, const std::string &provider, DataType data_type, int type, const CreateKernel creator)
Static method to register kernel which is correspondng to an ordinary op.
- Parameters
arch – [in] Define deviceType, such as CPU.
provider – [in] Define the identification of user.
data_type – [in] Define kernel’s input data type.
type – [in] Define the ordinary op type.
creator – [in] Define a function pointer to create a kernel.
- Returns
Status as a status identification of registering.
-
static inline Status RegCustomKernel(const std::string &arch, const std::string &provider, DataType data_type, const std::string &type, const CreateKernel creator)
Static method to register kernel which is corresponding to custom op.
- Parameters
arch – [in] Define deviceType, such as CPU.
provider – [in] Define the identification of user.
data_type – [in] Define kernel’s input data type.
type – [in] Define the concrete type of a custom op.
creator – [in] Define a function pointer to create a kernel.
- Returns
Status as a status identification of registering.
-
static inline CreateKernel GetCreator(const schema::Primitive *primitive, KernelDesc *desc)
Static methon to get a kernel’s create function.
- Parameters
desc – [in] Define kernel’s basic attribute.
primitive – [in] Define the primitive of kernel generated by flatbuffers.
- Returns
Function pointer to create a kernel.
-
static inline Status RegKernel(const std::string &arch, const std::string &provider, DataType data_type, int type, const CreateKernel creator)
Static method to register kernel which is correspondng to an ordinary op.
- Parameters
arch – [in] Define deviceType, such as CPU.
provider – [in] Define the identification of user.
data_type – [in] Define kernel’s input data type.
type – [in] Define the ordinary op type.
creator – [in] Define a function pointer to create a kernel.
- Returns
Status as a status identification of registering.
-
static inline Status RegCustomKernel(const std::string &arch, const std::string &provider, DataType data_type, const std::string &type, const CreateKernel creator)
Static method to register kernel which is corresponding to custom op.
- Parameters
arch – [in] Define deviceType, such as CPU.
provider – [in] Define the identification of user.
data_type – [in] Define kernel’s input data type.
type – [in] Define the concrete type of a custom op.
creator – [in] Define a function pointer to create a kernel.
- Returns
Status as a status identification of registering.
-
static inline CreateKernel GetCreator(const schema::Primitive *primitive, KernelDesc *desc)
Static methon to get a kernel’s create function.
- Parameters
desc – [in] Define kernel’s basic attribute.
primitive – [in] Define the primitive of kernel generated by flatbuffers.
- Returns
Function pointer to create a kernel.
-
static inline Status RegKernel(const std::string &arch, const std::string &provider, DataType data_type, int type, const CreateKernel creator)