GetDeviceId
Function Usage
Obtains the ID of the device where the tensor data is located.
Prototype
1 | int32_t Tensor::GetDeviceId() const; |
Response Parameters
Data Structure |
Description |
|---|---|
int32_t |
ID of the device where the tensor data is located. The value -1 indicates that the tensor data is located on the host. |
Parent topic: Tensor