Constraints
- Before the system enters the hibernation mode, ensure that the running processes such as the AI inference and media data processing exit first. After the system is wakened up successfully, continue to process the services.
- Do not use the
forkfunction to create multiple pyacl API caller processes, as this may lead to errors or cause processes to stop responding at runtime. - Do not use
forkorfork-encapsulated functions (such assystemandposix_spawnp) for asynchronous memory manipulations (by using calls to APIs such asacl.rt.memcpy_asyncandacl.rt.memset_async). Doing so will result in unexpected errors at runtime and may possibly cause the process to stop responding. - For allocation APIs (such as
acl.rt.create_stream,acl.rt.create_event, andacl.create_data_buffer), the corresponding destruction APIs (such asacl.rt.destroy_stream,acl.rt.destroy_event, andacl.destroy_data_buffer) must be called to destroy the allocations in a timely manner. Otherwise, the application may not function properly. - For destruction APIs (such as
acl.rt.destroy_stream,acl.rt.destroy_event,acl.rt.free, andacl.destroy_data_buffer), the released or destroyed resources are no longer available after these APIs are called. You are advised to set the released or destroyed resources to invalid values (for example,None) after calling these APIs.
- Atlas training products: For physical machines, a device supports a maximum of 64 user processes, and a host supports a maximum of 64 processes multiplied by the number of devices. For virtual machines, a device supports a maximum of 32 user processes, and a host supports a maximum of 32 processes multiplied by the number of devices.
- Atlas inference products: For physical machines, a device supports a maximum of 64 user processes, and a host supports a maximum of 64 processes multiplied by the number of devices. For virtual machines, a device supports a maximum of 32 user processes, and a host supports a maximum of 32 processes multiplied by the number of devices.
- Atlas 200I/500 A2 inference products: A device supports a maximum of 64 user processes, and a host supports a maximum of 64 processes multiplied by the number of devices.
- Atlas A2 products: A device supports a maximum of 63 user processes, and a host supports a maximum of 63 processes multiplied by the number of devices.
- Atlas A3 products: A device supports a maximum of 63 user processes, and a host supports a maximum of 63 processes multiplied by the number of devices.
- Ascend 950PR/950DT products: A device supports a maximum of 64 user processes, and a host supports a maximum of 64 processes multiplied by the number of devices.
After memory is allocated by a call to the memory allocation API (such as
acl.rt.mallocoracl.media.dvpp_malloc) and before you use the allocated memory, you are advised to callacl.rt.memsetoracl.rt.memset_asyncto initialize the memory, for example,acl.rt.memset(dev_buffer_ptr, dev_buffer_size, 0, dev_buffer_size).In Ascend RC mode, the
acl.rt.malloc,acl.media.dvpp_malloc, andhi_mpi_dvpp_mallocmemory management APIs are called in the app logic, and the app runs on the device, the app is suspended in the event of memory insufficiency until memory is available. You can activate some configurations (for example,enable_oom_killer) provided by the OS as required. In this way, the app automatically exits when the memory is insufficient.To activate
enable_oom_killer, log in to the device, go to the/proc/sys/vmdirectory, and setenable_oom_killeras therootuser. The following is a command example, where,1indicates activated, and0indicates deactivated.echo 1 > enable_oom_killer