[object Object]

[object Object][object Object]undefined
[object Object]

Description: Assigns a value to the tensor slice. It can assign the content of tensor [object Object] to a specified position in the target tensor [object Object].

[object Object]

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 process. Then, [object Object] is called to perform computation.

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

    • [object Object] (aclTensor*, computation input | computation output): aclTensor on the device. The data type can be FLOAT16, FLOAT, BFLOAT16, INT32, INT64, DOUBLE, or INT8. The can be ND.
    • [object Object] (aclTensor*, computation input): aclTensor on the device. The data type can be FLOAT16, FLOAT, BFLOAT16, INT32, INT64, DOUBLE, or INT8. The data type must be the same as that of [object Object]. The shape must be the same as the slice shape computed by [object Object]. For details about the constraints, see . The can be ND.
    • [object Object] (aclIntArray*, computation input): start index of the slice position, aclIntArray on the host. The data type can be INT64. The can be ND.
    • [object Object] (aclIntArray*, computation input): end index of the slice position, aclIntArray on the host. The data type can be INT64. The can be ND.
    • [object Object] (aclIntArray*, computation input): slice stride, aclIntArray on the host. The data type can be INT64. The value of [object Object] must be positive, and must be 1 when it corresponds to the last dimension of [object Object]. The can be ND.
    • [object Object] (aclIntArray*, computation input): optional, slice axis, aclIntArray on the host. The data type can be INT64. The can be ND.
    • [object Object] (uint64_t*, output): size of the workspace to be allocated on the device.
    • [object Object] (aclOpExecutor**, output): operator executor, containing the operator computation process.
  • Returns:

    [object Object]: status code. For details, see .

[object Object]
[object Object]
  • Parameters:

    • [object Object] (void*, input): address of the workspace to be allocated on the device.
    • [object Object] (uint64_t, input): size of the workspace to be allocated on the device, which is obtained by calling the first-phase API [object Object].
    • [object Object] (aclOpExecutor*, input): operator executor, containing the operator computation process.
    • [object Object] (aclrtStream, input): stream for executing the task.
  • Returns:

    [object Object]: status code. For details, see .

[object Object]
  • Deterministic compute:
    • [object Object] defaults to a deterministic implementation. The formula for calculating the i-th dimension of [object Object] is as follows: inputValueShape[i]=end[i]begin[i]strides[i]inputValueShape[i] = \lceil\frac{end[i] - begin[i]}{strides[i]} \rceil, where x\lceil x\rceil indicates rounding up xx. endend and beginbegin are the values adjusted according to special values. The adjustment method is as follows: When end[i]<0end[i] < 0, end[i]=varShape[i]+end[i]end[i]=varShape[i] + end[i]. If end[i]<0end[i] < 0 still exists, end[i]=0end[i] = 0. When end[i]>varShape[i]end[i] > varShape[i], end[i]=varShape[i]end[i] = varShape[i]. beginbegin follows the same rules.
[object Object]

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

[object Object]