Description: Copies the element in source to the corresponding position in selfRef based on the position where the element in the mask tensor is True.
Each operator has calls. First, aclnnInplaceMaskedScatterGetWorkspaceSize is called to obtain the workspace size required for computation and the executor that contains the operator computation process. Then, aclnnInplaceMaskedScatter is called to perform computation.
[object Object][object Object]
Parameters:
- selfRef (aclTensor*, compute input/output): aclTensor on the device. The can be ND. are supported.
- [object Object]Atlas training series products[object Object] and [object Object]Atlas inference series products[object Object]: The data type can be FLOAT, FLOAT16, DOUBLE, INT8, INT16, INT32, INT64, UINT8, or BOOL.
- [object Object]Atlas A2 training products/Atlas A2 inference products[object Object] and [object Object]Atlas A3 training series products/Atlas A3 inference series products[object Object]: The data type can be FLOAT, FLOAT16, DOUBLE, INT8, INT16, INT32, INT64, UINT8, BOOL, or BFLOAT16.
- mask (aclTensor*, compute input): aclTensor on the device. The data type can be BOOL or UINT8. The shape cannot be greater than that of selfRef. The shapes of mask and selfRef must meet the . The can be ND.
- source (aclTensor*, compute input): aclTensor on the device. The supports ND. The data type must be the same as that of selfRef. The number of elements must be greater than or equal to the number of elements whose value is true in mask.
- [object Object]Atlas training series products[object Object] and [object Object]Atlas inference series products[object Object]: The data type can be FLOAT, FLOAT16, DOUBLE, INT8, INT16, INT32, INT64, UINT8, or BOOL.
- [object Object]Atlas A2 training products/Atlas A2 inference products[object Object] and [object Object]Atlas A3 training series products/Atlas A3 inference series products[object Object]: The data type can be FLOAT, FLOAT16, DOUBLE, INT8, INT16, INT32, INT64, UINT8, BOOL, or BFLOAT16.
- workspaceSize (uint64_t*, output): size of the workspace to be allocated on the device.
- executor (aclOpExecutor**, output): operator executor, containing the operator computation process.
- selfRef (aclTensor*, compute input/output): aclTensor on the device. The can be ND. are supported.
Returns:
aclnnStatus: status code. For details, see .
[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 the first-phase API aclnnInplaceMaskedScatterGetWorkspaceSize.
- executor (aclOpExecutor*, input): operator executor, containing the operator computation process.
- stream (aclrtStream, input): stream for executing the task.
Returns:
- Deterministic compute:
- aclnnInplaceMaskedScatter defaults to a deterministic implementation.
The following example is for reference only. For details, see .
[object Object]