GetCpuKernel
功能说明
获取AI CPU算子Kernel的Compute函数。
函数原型
std::shared_ptr<CpuKernel> GetCpuKernel(const std::string &opType)
参数说明
参数名 |
输入/输出 |
说明 |
---|---|---|
opType |
输入 |
算子的类型。 |
返回值说明
std::shared_ptr<CpuKernel>类型。
约束说明
无
调用示例
1 2 | std::string op_type = "add"; std::shared_ptr<CpuKernel> kernel = CpuKernelRegister::Instance().GetCpuKernel(op_type); |
父主题: CpuKernelRegister类