Description: Replaces the value at the position specified by index with value along the specified axis dim of the input self. The computation result is deterministic.
Example: The input self is as follows:
[object Object]If dim = 0, index = [0, 2], and value = 0, the computation result of the operator is as follows:
[object Object]If dim = 1, index = [0, 2], and value = 0, the computation result of the operator is as follows:
[object Object]
- aclnnIndexFill and aclnnInplaceIndexFill implement the same function in different ways. Select a proper operator based on your requirements.
- aclnnIndexFill: An output tensor object needs to be created to store the computation result.
- aclnnInplaceIndexFill: No output tensor object needs to be created, and the computation result is stored in the memory of the input tensor.
- Each operator has calls. First, aclnnIndexFillGetWorkspaceSize or aclnnInplaceIndexFillGetWorkspaceSize is called to obtain the workspace size required for computation and the executor that contains the operator computation process. Then, aclnnIndexFill or aclnnInplaceIndexFill is called to perform computation.
Parameters
[object Object]Returns
[object Object]: status code. For details, see .The first-phase API implements input parameter verification. The following errors may be thrown.
[object Object]
Parameters
[object Object]Returns
[object Object]: status code. For details, see .The first-phase API implements input parameter verification. The following errors may be thrown.
[object Object]
- Deterministic computation:
- aclnnIndexFill and aclnnInplaceIndexFill default to a deterministic implementation.
The following example is for reference only. For details, see .
aclnnInplaceIndexFillTensor call example: