Operator description: Performs transparency multiplication on tensors rgb, frame, and alpha.
Formula:
Each operator has calls. First, aclnnBlendImagesCustomGetWorkspaceSize is called to obtain the workspace size required for computation and the executor that contains the operator computation process. Then, aclnnBlendImagesCustom is called to perform computation.
[object Object][object Object]
Parameters:
- rgb (aclTensor*, compute input): aclTensor on the device. The data type can be UINT8, and the shape can be HWC (C=3). It meets the with alpha. Only contiguous tensors are supported. The can be ND.
- alpha (aclTensor*, compute input): aclTensor on the device. The data type can be UINT8, and the shape can be HWC (C = 1). It meets the with rgb. Only contiguous tensors are supported. The can be ND.
- frame (aclTensor*, compute input): aclTensor on the device. The data type can be UINT8, and the shape can be HWC (C = 3). It meets the with alpha. Only contiguous tensors are supported. The can be ND.
- out (aclTensor*, compute output): aclTensor on the device. The data type can be UINT8, and the shape can be HWC (C = 3). It is the same as the shape of frame. Only contiguous tensors are supported. The can be ND.
- workspaceSize (uint64_t*, output): size of the workspace to be allocated on the device.
- executor (aclOpExecutor**, output): operator executor, containing the operator computation process.
Returns:
[object Object]
Parameters:
- workspace (void *, input): address of the workspace to be allocated on the device.
- workspaceSize (uint64_t, input): size of the workspace to be allocated on the device, which is obtained by calling the first-phase API aclnnBlendImagesCustomGetWorkspaceSize.
- executor (aclOpExecutor *, input): operator executor, containing the operator computation process.
- stream (aclrtStream, input): stream for executing the task.
Returns:
- Deterministic computing:
- aclnnBlendImagesCustom defaults to a deterministic implementation.
The following example is for reference only. For details, see .
[object Object]