Adds the value in the source tensor to the value of the corresponding position in the input tensor based on the given index in a specified dimension.
Each operator has calls. First, [object Object] is called to obtain the workspace size required for computation and the executor that contains the operator computation flow. Then, [object Object] is called to perform computation.
[object Object]
[object Object]
Parameters
[object Object]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:
- By default, aclnnIndexAddV2 is implemented in non-deterministic mode. You can enable deterministic computing by using aclrtCtxSetSysParamOpt.
- Value range of index
- The value of index must be within the range of [0, self.shape[dim]). That is, the index value must be within the shape size of self in the dim dimension. Negative indexes and out-of-bounds indexes are not supported.
- Additional restrictions in high-performance mode (mode = 0):
- The value of dim is 0 or -2.
- The data type of self is FLOAT, FLOAT16, INT32, INT16, or BFLOAT16.
- self is a two-dimensional tensor.
- If mode is set to 0 and the restrictions in the parameter description are met but the preceding three restrictions are not met, the API throws an error.
The following example is for reference only. For details, see .
[object Object]