Updates the values in data one by one by referring to the values in updates based on the specified axis and indices. The operator semantics are customized without corresponding TensorFlow or PyTorch APIs.
Example: This operator has three inputs and one attribute: data, updates, indices, and axis. The data is the tensor to be updated, updates is the tensor that stores the updated data, indices indicates the update position, and axis indicates the specified update dimension. When indices is one-dimensional, there are two scenarios:
Scenario 1: When indices is one-dimensional, axis specifies that the shape of the update dimension is 1 and indices specifies the offset of each batch dimension (the highest dimension) in the axis dimension.
[object Object][object Object]Scenario 2: When indices is one-dimensional, axis specifies that the shape of the update dimension is greater than 1 and indices specifies the offset of each batch dimension (the highest dimension) in the axis dimension.
[object Object][object Object]
Each operator has calls. First, aclnnInplaceScatterUpdateGetWorkspaceSize is called to obtain the workspace size required for computation and the executor that contains the operator computation process. Then, aclnnInplaceScatterUpdate is called to perform computation.
Parameters
[object Object]- [object Object]Atlas training products[object Object]: The data type does not support UINT8 or BFLOAT16.
- Ascend 950PR/Ascend 950DT: Data types such as FLOAT8_E4M3FN, FLOAT8_E5M2 and HIFLOAT8 are supported only by this model.
Returns
[object Object]: status code. For details, see .The first-phase API implements input parameter validation. The following error codes may be returned.
[object Object]
Deterministic computation:
- aclnnInplaceScatterUpdate defaults to a deterministic implementation.
The 0th axis of the updates shape must be consistent with that of the indices shape.
If indices is zero-dimensional, the 0th axis of the updates shape must be 1.
The 0th axis of the updates shape must be less than or equal to that of the data shape.
The shapes of updates and data are the same except for the axis and 0th axis.
When the indices shape is two-dimensional, the 1st axis of the shape must be 2.
If the data type of indices is INT32, DtypeSize is 4. If the data type of indices is INT64, DtypeSize is 8. IndicesShapeSize is the product of the indices shape. The required UB is calculated as follows: UB = IndicesShapeSize x DtypeSize + 224. If the required UB size is greater than the total UB size of the corresponding AI processor version, the operation is not supported.
If indices contains duplicates, the output at those positions is non-deterministic.
The following example is for reference only. For details, see .