|
Open Deep Learning API
|
Go to the source code of this file.
Typedefs | |
| typedef struct _odla_vendor * | odla_vendor |
| Vendor object. More... | |
| typedef struct _odla_device * | odla_device |
| Device object. More... | |
| typedef struct _odla_device_config * | odla_device_config |
| Device configuration object. More... | |
| typedef struct _odla_device_config_item * | odla_device_config_item |
| Device configuration item object. More... | |
Enumerations | |
| enum | odla_vendor_name { ODLA_VENDOR_DEFAULT , ODLA_VENDOR_ALIBABA , ODLA_VENDOR_ARM , ODLA_VENDOR_CAMBRICON , ODLA_VENDOR_GRAPHCORE , ODLA_VENDOR_HABANA , ODLA_VENDOR_INTEL , ODLA_VENDOR_NVIDIA , ODLA_VENDOR_QUALCOMM } |
| Supported vendors. More... | |
| enum | odla_vendor_info { OVI_DESCRIPTION , OVI_FEATURE_SET } |
| Vendor info. More... | |
| enum | odla_device_name { ODLA_DEVICE_DEFAULT , ODLA_DEVICE_ALIBABA_HANGUANG , ODLA_DEVICE_ARM_CORTEX_M , ODLA_DEVICE_CAMBRICON_MLU220 , ODLA_DEVICE_CAMBRICON_MLU270 , ODLA_DEVICE_GRAPHCORE_IPU , ODLA_DEVICE_HABANA_GAUDI , ODLA_DEVICE_HABANA_GOYA , ODLA_DEVICE_INTEL_X86 , ODLA_DEVICE_INTEL_DNNL , ODLA_DEVICE_NVIDIA_GPU , ODLA_DEVICE_NVIDIA_TENSORRT , ODLA_DEVICE_QUALCOMM_AIC100 } |
| Supported devices. More... | |
| enum | odla_device_info { ODLA_DEVICE_INFO_ODLA_LIB_VERSION , ODLA_DEVICE_INFO_DEV_COUNT , ODLA_DEVICE_INFO_DEV_INDEX , ODLA_DEVICE_INFO_DEV_TYPE , ODLA_DEVICE_INFO_DEV_UUID , ODLA_DEVICE_INFO_PROCESSOR_UTIL , ODLA_DEVICE_INFO_MEMORY_UTIL , ODLA_DEVICE_INFO_TOTAL_MEMORY , ODLA_DEVICE_INFO_USED_MEMORY , ODLA_DEVICE_INFO_POWER_USAGE , ODLA_DEVICE_INFO_POWER_LIMIT , ODLA_DEVICE_INFO_DRIVER_VERSION , ODLA_DEVICE_INFO_SDK_VERSION } |
| Device info enum. More... | |
Functions | |
| ODLA_API_EXPORT odla_status ODLA_API_CALL | odla_GetVendor (const odla_vendor_name vendor_name, odla_vendor *vendor) |
| Get the vendor object. More... | |
| ODLA_API_EXPORT odla_status ODLA_API_CALL | odla_GetVendorInfo (const odla_vendor vendor, const odla_vendor_info info_name, const odla_size_t allocated_info_value_size, odla_void *info_value, odla_size_t *retrieved_info_value_size) |
| Get the vendor info. More... | |
| ODLA_API_EXPORT odla_status ODLA_API_CALL | odla_AllocateDevice (odla_vendor vendor, odla_device_name device_name, odla_int32 device_idx, odla_device *device) |
| Allocate a device. More... | |
| ODLA_API_EXPORT odla_status ODLA_API_CALL | odla_GetDeviceInfo (odla_device device, odla_device_info info_type, odla_scalar_value *info_value) |
| Get the device info. More... | |
| ODLA_API_EXPORT odla_status ODLA_API_CALL | odla_InitDevice (odla_device device, const odla_device_config config) |
| Initialize an allocated device. More... | |
| ODLA_API_EXPORT odla_status ODLA_API_CALL | odla_SetCurrentDevice (odla_device device) |
| Set an allocated device as the current device. More... | |
| ODLA_API_EXPORT odla_status ODLA_API_CALL | odla_DestroyDevice (odla_device device) |
| Destroy an allocated device. More... | |
| ODLA_API_EXPORT odla_status ODLA_API_CALL | odla_CreateDeviceConfig (odla_device_config *device_config) |
| Create a device config object. More... | |
| ODLA_API_EXPORT odla_status ODLA_API_CALL | odla_SetDeviceConfigItem (odla_device_config device_config, odla_device_config_item device_config_item,...) |
| Set the device config with a property item. More... | |
| ODLA_API_EXPORT odla_status ODLA_API_CALL | odla_DestroyDeviceConfig (odla_device_config device_config) |
| Destroy a device config object. More... | |
This file defines the ODLA device related APIs.
Definition in file odla_device.h.
| typedef struct _odla_device* odla_device |
Device object.
Definition at line 98 of file odla_device.h.
| typedef struct _odla_device_config* odla_device_config |
Device configuration object.
Definition at line 101 of file odla_device.h.
| typedef struct _odla_device_config_item* odla_device_config_item |
Device configuration item object.
Definition at line 104 of file odla_device.h.
| typedef struct _odla_vendor* odla_vendor |
Vendor object.
Definition at line 95 of file odla_device.h.
| enum odla_device_info |
Device info enum.
Definition at line 76 of file odla_device.h.
| enum odla_device_name |
Supported devices.
Definition at line 51 of file odla_device.h.
| enum odla_vendor_info |
Vendor info.
Definition at line 45 of file odla_device.h.
| enum odla_vendor_name |
Supported vendors.
Definition at line 32 of file odla_device.h.
| ODLA_API_EXPORT odla_status ODLA_API_CALL odla_AllocateDevice | ( | odla_vendor | vendor, |
| odla_device_name | device_name, | ||
| odla_int32 | device_idx, | ||
| odla_device * | device | ||
| ) |
Allocate a device.
| vendor | the vendor object (can be NULL) |
| device_name | the device name |
| device | the pointer to the allocated device object |
| ODLA_API_EXPORT odla_status ODLA_API_CALL odla_CreateDeviceConfig | ( | odla_device_config * | device_config | ) |
Create a device config object.
| device_config | the pointer to the created config object |
| ODLA_API_EXPORT odla_status ODLA_API_CALL odla_DestroyDevice | ( | odla_device | device | ) |
Destroy an allocated device.
| device | the device object |
| ODLA_API_EXPORT odla_status ODLA_API_CALL odla_DestroyDeviceConfig | ( | odla_device_config | device_config | ) |
Destroy a device config object.
| device_config | the config object |
| ODLA_API_EXPORT odla_status ODLA_API_CALL odla_GetDeviceInfo | ( | odla_device | device, |
| odla_device_info | info_type, | ||
| odla_scalar_value * | info_value | ||
| ) |
Get the device info.
| device | the device object |
| info_name | the querying info name |
| allocated_info_value_size | the allocated info_value size |
| info_value | the pointer to the info_value |
| retrieved_info_value_size | the retrieved info_value size |
| ODLA_API_EXPORT odla_status ODLA_API_CALL odla_GetVendor | ( | const odla_vendor_name | vendor_name, |
| odla_vendor * | vendor | ||
| ) |
Get the vendor object.
| vendor_name | the vendor name |
| vendor | the pointer to the accessed device object |
| ODLA_API_EXPORT odla_status ODLA_API_CALL odla_GetVendorInfo | ( | const odla_vendor | vendor, |
| const odla_vendor_info | info_name, | ||
| const odla_size_t | allocated_info_value_size, | ||
| odla_void * | info_value, | ||
| odla_size_t * | retrieved_info_value_size | ||
| ) |
Get the vendor info.
| vendor | the vendor object |
| info_name | the querying info name |
| allocated_info_value_size | the allocated info_value size |
| info_value | the pointer to the info_value |
| retrieved_info_value_size | the retrieved info_value size |
| ODLA_API_EXPORT odla_status ODLA_API_CALL odla_InitDevice | ( | odla_device | device, |
| const odla_device_config | config | ||
| ) |
Initialize an allocated device.
| device | the device object |
| config | the device configuration object |
| ODLA_API_EXPORT odla_status ODLA_API_CALL odla_SetCurrentDevice | ( | odla_device | device | ) |
Set an allocated device as the current device.
| device | the device object |
| ODLA_API_EXPORT odla_status ODLA_API_CALL odla_SetDeviceConfigItem | ( | odla_device_config | device_config, |
| odla_device_config_item | device_config_item, | ||
| ... | |||
| ) |
Set the device config with a property item.
| device_config | the device config object |
| device_config_item | the item |
| variadic |