[object Object]

[object Object][object Object]undefined
[object Object]
  • Description: Replaces or accumulates the coordinate data of input self and the input values based on indices.

  • Formula:

    • If accumulate is set to False:

      self[indices]=valuesself[indices] = values
    • If accumulate is set to True:

      self[indices]=self[indices]+valuesself[indices] = self[indices] + values
[object Object]

Each operator has calls. First, aclnnIndexPutImplGetWorkspaceSize is called to obtain the input parameters and compute the required workspace size based on the process. Then, aclnnIndexPutImpl is called to perform computation.

  • [object Object]
  • [object Object]
[object Object]
  • Parameters:

    • selfRef (aclTensor*, computation input/output): selfself in the formula and aclTensor on the device. The data type is the same as that of values. are supported. The can be ND. The shape can be 1D to 8D.

      • [object Object]Atlas training series products[object Object]: The data type can be FLOAT, FLOAT16, DOUBLE, INT32, INT64, INT16, INT8, 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, INT32, INT64, INT16, INT8, UINT8, BOOL, or BFLOAT16.
    • indices (aclTensorList*, computation input): indicesindices in the formula and aclTensorList on the device. The data type can be INT32, INT64, or BOOL. The can be ND.

    • values (aclTensor*, computation input): valuesvalues in the formula and aclTensor on the device. The data type is the same as that of selfRef. The can be ND.

      • [object Object]Atlas training series products[object Object]: The data type can be FLOAT, FLOAT16, DOUBLE, INT32, INT64, INT16, INT8, 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, INT32, INT64, INT16, INT8, UINT8, BOOL, or BFLOAT16.
    • accumulate (bool, computation input): accumulation or update operation type. True indicates accumulation, and False indicates update. Boolean value on the host.

    • unsafe (bool, computation input): Boolean value on the host, checking whether the index is within the valid range. If unsafe is set to True and an index is out of bounds, an error is reported and the execution exits. If unsafe is set to False and an index is out of bounds, an exception may occur during running.

    • 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:

    aclnnStatus: status code. For details, see .

[object Object]
[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 first-phase API aclnnIndexPutImplGetWorkspaceSize.

    • executor (aclOpExecutor*, input): operator executor, containing the operator computation process.

    • stream (aclrtStream, input): stream for executing the task.

  • Returns:

    aclnnStatus: status code. For details, see .

[object Object]
  • Deterministic computation:

    • aclnnIndexPutImpl defaults to a non-deterministic implementation. You can call aclrtCtxSetSysParamOpt to enable deterministic computation.
  • The input parameters selfRef, indices, and values have the following constraints:

      1. The number of tensors in indices cannot exceed the dimensions of selfRef.
      1. The dimensions of values must meet the following formula or meet the following formula after broadcasting:
      • values.Dims() = indices[i].Dims() + (selfRef.Dims() - indices.size())
      • The first half of the dimensions of values must be the same as the tensor dimensions in indices (the tensors in indices are broadcast to the same shape), and the second half of the dimensions must be the same as the dimensions of selfRef minus the number of tensors in indices.
[object Object]

The following example is for reference only. For details, see .

[object Object]