[object Object]

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

Returns the positions of non-zero elements in the [object Object]. If the dimension of self is D and the number of non-zero elements in self is N, the shape of the returned [object Object] is D x N. Each column indicates the position coordinates of a non-zero element.

[object Object]

Each operator has calls. First, aclnnNonzeroV2GetWorkspaceSize is called to obtain the workspace size required for computation and the executor that contains the operator computation process. Then, aclnnNonzeroV2 is called to perform computation.

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

    [object Object]
    • [object Object]Atlas training products[object Object] and [object Object]Atlas inference products[object Object]: The data type cannot be BFLOAT16.
    • For [object Object]Atlas training products[object Object], [object Object]Atlas inference products[object Object], [object Object]Atlas A2 training products/Atlas 800I A2 inference products/Atlas 200I A2 Box heterogeneous components[object Object], and [object Object]Atlas A3 training products/Atlas A3 inference products[object Object], the output index must be within the int32 precision range due to hardware resource restrictions. Therefore, the size of a certain dimension of the input cannot exceed the int32 range.
  • Returns

    [object Object]: status code. For details, see . The first-phase API implements input parameter verification. The following errors may be thrown:

    [object Object]
[object Object]
  • Parameters

    [object Object]
  • Returns

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

[object Object]
  • Deterministic compute:

    • aclnnNonzeroV2 defaults to a deterministic implementation.
  • The output size of the API needs to be allocated based on the maximum output size (actually 2 GB when all values are non-zero). In addition, the workspace used by this API is large. Therefore, you need to check whether the workspace exceeds the memory size of the device.

[object Object]

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

[object Object]