Description: The SilentCheck operator compares the input feature value (val) with the absolute threshold and relative threshold to determine whether to trigger a silence check fault. In addition, the environment variable (npuAsdDetect) passed by the framework can be used to control whether to trigger a warning or resumable training when a fault occurs. By default (when npuAsdDetect=1), only logs are printed.
Formulas:
- If the current input val is inf/nan, or val exceeds the absolute threshold cThreshL1, or the jump exceeds the relative threshold cCoeffL1, the L1 fault is identified. If the environment variable npuAsdDetect is set to 2, a log is printed and resumable training is triggered. If the environment variable npuAsdDetect is set to 1, sfdaRef and stepRef are updated, and then the function returns.
- If the current input val exceeds the absolute threshold cThreshL2, or the jump exceeds the relative threshold cCoeffL2, the L2 fault is identified. A warning is printed, sfdaRef and stepRef are updated, and then the function returns.
- If neither the L1 fault nor the L2 fault is triggered, the situation is normal. If npuAsdDetect is set to 3, the feature value is printed. Otherwise, sfdaRef and stepRef are updated, and then the function returns.
- sfdaRef is [pre_val, min_val, max_val], indicating [last detected val, historical minimum val, historical maximum val]. stepRef indicates the number of detection times. The number is incremented by 1 each time.
Each operator has calls. First, aclnnSilentCheckGetWorkspaceSize is called to obtain the workspace size required for computation and the executor that contains the operator computation process. Then, aclnnSilentCheck is called to perform computation.
Parameter description:
[object Object]Return value
[object Object]: status code. For details, see .The first-phase API implements input parameter validation. The following error codes may be returned.
[object Object]
Parameter description:
[object Object]Return value
- Deterministic computation:
- aclnnSilentCheck defaults to a deterministic implementation.
The following example is for reference only. For details, see .