aclrtSetOpExecuteTimeOut

Applicability

Product

Supported

Atlas A3 training products/Atlas A3 inference products

Atlas A2 training products/Atlas A2 inference products

Atlas 200I/500 A2 inference products

Atlas inference products

Atlas training products

Description

Sets the timeout (in seconds) for operator execution.

For the following product models, you are advised to use the aclrtSetOpExecuteTimeOutV2 API, which returns the actual timeout:

Atlas A3 training products/Atlas A3 inference products

Atlas A2 training products/Atlas A2 inference products

Prototype

aclError aclrtSetOpExecuteTimeOut(uint32_t timeout)

Parameters

Parameter

Input/Output

Description

timeout

Input

Timeout interval, in seconds.

0 means using the maximum timeout.

Returns

0 on success; else, failure. For details, see aclError.

Restrictions

  • If this API is called multiple times in a process, the last configured timeout is used.
  • If this API is not called, the default timeout for operator execution is shown in the following table.

    Model

    Default Timeout of AI Core Operators

    Default Timeout of AI CPU Operators

    Atlas A3 training products/Atlas A3 inference products

    1091 seconds

    60 seconds

    Atlas A2 training products/Atlas A2 inference products

    1091 seconds

    28 seconds

    Atlas 200I/500 A2 inference products

    1091 seconds

    28 seconds

    Atlas inference products

    547 seconds

    28 seconds

    Atlas training products

    68 seconds

    28 seconds

  • The maximum timeout of AI Core and AI CPU operators varies according to the architecture of the product model.
    • For the following product models, the maximum timeout of operators is interval × 254 (unit: μs). interval can be obtained through the aclrtGetOpTimeoutInterval API. The interval of AI Core operators is the same as that of AI CPU operators. Therefore, the maximum timeout of operators is "interval × 254".

      Atlas A3 training products/Atlas A3 inference products

      Atlas A2 training products/Atlas A2 inference products

    • The following table lists the maximum timeouts of AI Core and AI CPU operators for different product models.

      Model

      Maximum Timeout Interval of AI Core Operators

      Maximum Timeout Interval of AI CPU Operators

      Atlas 200I/500 A2 inference products

      1091 seconds

      1091 seconds

      Atlas inference products

      547 seconds

      Not supported

      Atlas training products

      2176 seconds

      2176 seconds