RunCpuKernelV2

Description

Executes the Compute function of the AI CPU operator kernel (V2 version).

V2 execution is searched only in creatorMapV2 and is not fallen back to V1.

Prototype

uint32_t RunCpuKernelV2(CpuKernelContext &ctx)

Parameters

Parameter

Input/Output

Description

ctx

Input

Context of CpuKernel. CpuKernelContext type.

Returns

uint32_t for the RunCpuKernelV2 execution result.

  • 0: success
  • Other values: failure

Restrictions

Kernel execution is searched only in the V2 registry and is not fallen back to V1. If the operator is not registered in V2, a failure is returned.

Example

CpuKernelContext ctx;
uint32_t ret = CpuKernelRegister::Instance().RunCpuKernelV2(ctx);