[object Object]

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

Description: Finds the positions of non-zero elements in [object Object]. Assume that the dimension of [object Object] is D and the number of non-zero elements in [object Object] is N. The shape of [object Object] is N × D. Each column indicates the position coordinates of a non-zero element.

[object Object]

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

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

    [object Object]
    • For [object Object]Atlas training products[object Object] and [object Object]Atlas inference products[object Object], the data type BFLOAT16, UINT16, UINT32, and UINT64 are not supported.
    • For [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 data type UINT16, UINT32, and UINT64 are not supported.
    • For the [object Object]Atlas training products[object Object], [object Object]Atlas inference products[object Object], [object Object]Atlas A2 training products/Atlas A2 inference products[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:

    • aclnnNonzero 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]