dcmi_get_hbm_info Prototype
Syntax
int dcmi_get_hbm_info (int card_id, int device_id, struct dsmi_hbm_info_stru *pdevice_hbm_info)
Function
Queries chip memory information.
Parameter Description
Parameter |
Input/Output |
Type |
Description |
---|---|---|---|
card_id |
Input |
int |
ID of the Atlas 300T training card (model 9000). Query the supported IDs by referring to dcmi_get_card_num_list Prototype. |
device_id |
Input |
int |
Chip ID. The value is 0 (there is only one chip).Query the actually supported range by referring to dcmi_get_device_num_in_card Prototype. |
pdevice_hbm_info |
Output |
struct dsmi_hbm_info_stru* |
Returned HBM information. The HBM information structure is as follows: struct dsmi_hbm_info_stru { unsigned long memory_size; // HBM total size, KB unsigned int freq; // HBM freq, MHZ unsigned long memory_usage; // HBM memory_usage, KB int temp; // HBM temperature unsigned int bandwith_util_rate; }; |
Return Value
Type |
Description |
---|---|
int |
Results:
|
Exception Handling
N/A
Constraints
N/A
Calling Example
int ret = 0;
int card_id = 0x3 ;
int device_id = 0;
struct dsmi_hbm_info_stru device_hbm_info = {0};
ret = dcmi_get_hbm_info(card_id, device_id, &device_hbm_info);
if(ret != 0) {
//todo: records logs
return ret;
}
...