Function: notify_import_by_key
Applicability
Product |
Supported |
|---|---|
Atlas 350 Accelerator Card |
√ |
√ |
|
√ |
|
√ |
|
√ |
|
x |
Description
Obtains the key information in the current process and returns the address of the Notify pointer that can be used by the current process.
This API needs to work with other APIs to synchronize tasks between different processes on multiple devices. For details, see the description of the acl.rt.notify_get_export_key API.
Prototype
- C Prototype
aclError aclrtNotifyImportByKey(aclrtNotify *notify, const char *key, uint64_t flag)
- Python Function
1notify, ret = acl.rt.notify_import_by_key(key, flags)
Parameters
Parameter |
Description |
|---|---|
key |
Str, Notify share name. First call acl.rt.notify_get_export_key to obtain the shared name of the specified Notify and then pass the shared name as an input. |
flags |
Int, whether to enable data exchange between two devices. It can be set to either of the following macros:
The macros are defined as follows: #define ACL_RT_NOTIFY_IMPORT_FLAG_DEFAULT 0x0UL #define ACL_RT_NOTIFY_IMPORT_FLAG_ENABLE_PEER_ACCESS 0x02UL |
Return Value
Return Value |
Description |
|---|---|
notify |
Int, Notify pointer. |
ret |
Int, 0 on success; else, failure. |
Restrictions
This operation is not supported in the Ascend virtual instance scenario.