Obtains the ID of the compute device. This API is synchronous.
If neither aclrtSetDevice nor aclrtCreateContext is called to specify a device, an error is returned when aclrtGetDevice is called.
aclError aclrtGetDevice(int32_t *deviceId)
Parameter |
Input/Output |
Description |
|---|---|---|
deviceId |
Output |
Pointer to the device ID. |
0 on success; else, failure.