Updates the values in varRef in sequence by referring to the values in the updates tensor based on the specified indices.
Each operator has calls. First, aclnnScatterNdUpdateGetWorkspaceSize is called to obtain the workspace size required for computation and the executor that contains the operator computation process. Then, aclnnScatterNdUpdate is called to perform computation.
[object Object][object Object]
Parameters
- varRef (aclTensor *, compute input): are supported. The can be ND. The number of dimensions can only be one to eight. The data type must be the same as that of updates.
- [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 FLOAT16, BFLOAT16, FLOAT32, INT64, BOOL, or INT8.
- [object Object]Atlas training series products[object Object] and [object Object]Atlas inference series products[object Object]: The data type can be FLOAT16, FLOAT32, or BOOL.
- indices (aclTensor*, compute input): The data type can be INT32 or INT64. are supported. The can be ND. The data in indices cannot be out-of-bounds.
- updates (aclTensor*, compute input): are supported. The can be ND. The data type must be the same as that of varRef.
- [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 FLOAT16, BFLOAT16, FLOAT32, INT64, BOOL, or INT8.
- [object Object]Atlas training series products[object Object] and [object Object]Atlas inference series products[object Object]: The data type can be FLOAT16, FLOAT32, or BOOL.
- workspaceSize (uint64_t *, compute input): size of the workspace to be allocated on the device.
- executor (uint64_t *, output): operator executor, containing the operator computation process.
- varRef (aclTensor *, compute input): are supported. The can be ND. The number of dimensions can only be one to eight. The data type must be the same as that of updates.
Returns
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 aclnnScatterNdUpdateGetWorkspaceSize.
- executor (aclOpExecutor *, input): operator executor, containing the operator computation process.
- stream (aclrtStream, input): stream for executing the task.
Returns
Deterministic compute:
- aclnnScatterNdUpdate defaults to a deterministic implementation.
indices must have at least two dimensions. The size of the last dimension must not exceed the dimension size of varRef.
Assume that the size of the last dimension of indices is a. The shape of updates is equal to the shape of indices excluding the last dimension plus the last dimension (a) of the shape of varRef. For example, if the shape of varRef is (4, 5, 6) and the shape of indices is (3, 2), the shape of updates must be (3, 6).
The following example is for reference only. For details, see .