aclrtCreateNotify

Applicable Products

Product

Supported

Ascend 950PR / Ascend 950DT

√

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

√

Function

Creates a Notify object.

Prototype

1
aclError aclrtCreateNotify(aclrtNotify *notify, uint64_t flag)

Parameters

Parameter

Input/Output

Description

notify

Output

Pointer to the Notify. For details about the type definition, see aclrtNotify.

flag

Input

Flag of the Notify pointer.

Currently, flag can be set to the following macros:

  • ACL_NOTIFY_DEFAULT: If this bit is used, the created Notify is restricted to host-side calls.
  • ACL_NOTIFY_DEVICE_USE_ONLY: If this bit is used, the created Notify is restricted to device-side calls.

The macros are defined as follows:

#define ACL_NOTIFY_DEFAULT 0x00000000U
#define ACL_NOTIFY_DEVICE_USE_ONLY 0x00000001U

Returns

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

Restrictions

  • The number of Notify objects supported varies depending on the hardware model.
    • For the Ascend 950PR / Ascend 950DT , a maximum of 65,535 Notify objects are supported by a single device.
    • For the Atlas A3 training products / Atlas A3 inference products and Atlas A2 training products / Atlas A2 inference products , a maximum of 8,192 Notify objects are supported by a single device.
    • For the Atlas 200I/500 A2 inference products , a maximum of 2,048 Notify objects are supported by a single device.
    • For the Atlas inference products and Atlas training products , a maximum of 1,024 Notify objects are supported by a single device.

API Call Example

For the API call example, see Notify Management.