GetCpuKernel

Description

Obtains the Compute function of the AI CPU operator kernel.

Prototype

std::shared_ptr<CpuKernel> GetCpuKernel(const std::string &opType)

Parameters

Parameter

Input/Output

Description

opType

Input

Operator type.

Returns

std::shared_ptr<CpuKernel> type.

Restrictions

None

Example

1
2
std::string op_type = "add";
std::shared_ptr<CpuKernel> kernel = CpuKernelRegister::Instance().GetCpuKernel(op_type);