aclrtCreateNotify

Applicability

Product

Supported

Atlas 350 Accelerator Card

Atlas A3 training product / Atlas A3 inference product

Atlas A2 training product / Atlas A2 inference product

Atlas 200I/500 A2 inference product

Atlas inference product

Atlas training product

Description

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.

The flag can be set to the following macros:

  • ACL_NOTIFY_DEFAULT: If this bit is enabled, the created Notify is called on the host by default.
  • ACL_NOTIFY_DEVICE_USE_ONLY: If this bit is enabled, the created Notify is called only on the device.

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 by different hardware models is different, as shown in the following table.

Model

Max. Notify Objects for a Device

Atlas 350 Accelerator Card

65,535

Atlas A3 training product / Atlas A3 inference product

Atlas A2 training product / Atlas A2 inference product

8,192

Atlas 200I/500 A2 inference product

2,048

Atlas inference product

Atlas training product

1,024

API Call Example

For the API call example, see Notify-based synchronization.