Function: device_get_bare_tgid

C Prototype

aclError aclrtDeviceGetBareTgid(int32_t *pid)

Python Function

pid, ret = acl.rt.device_get_bare_tgid()

Function Usage

Obtains the ID of the current process.

This API has been adapted to the physical machine and VM scenarios when obtaining the process ID. You only need to call it to obtain the process ID and then configure other APIs (see acl.rt.mem_export_to_shareable_handle for assisting processes) to share the physical memory. If you do not call this API to obtain the process ID, an exception may occur when you use the process ID.

Input Description

None

Return Value

pid: int, process ID.

ret: int, error code.

Restrictions

None