[object Object]

[object Object][object Object]undefined
[object Object]
  • Description: Iterates over all tensors in scaledGrads to check for Inf or NaN. Sets foundInf to 1.0 if any Inf or NaN is detected; otherwise, foundInf remains unchanged. Then unscales all tensors in scaledGrads by multiplying with invScale.

  • Formula:

    foundInf={1.0,ifanyInforNaNexistsinscaledGrads,foundInf,otherwise.foundInf = \begin{cases}1.0, & if any Inf or NaN exists in scaledGrads,\\ foundInf, & otherwise. \end{cases} scaledGradsi=scaledGradsiinvScale.scaledGrads_i = {scaledGrads}_{i}*{invScale}.
[object Object]

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

[object Object]
[object Object]
[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]
[object Object]
  • Parameters

    [object Object]
  • Returns

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

[object Object]
  • Deterministic computation:
    • aclnnForeachNonFiniteCheckAndUnscale defaults to a deterministic implementation.
[object Object]

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

[object Object]