ROCm / rocm_smi_lib

ROCm SMI LIB
https://rocm.docs.amd.com/projects/rocm_smi_lib/en/latest/
MIT License
111 stars 48 forks source link

ROCM 6.0 GA rocm_smi.h fails to compile, error: unknown type name ‘metrics_table_header_t’ #147

Closed ozziemoreno closed 5 months ago

ozziemoreno commented 6 months ago

Function call rsmi_dev_metrics_header_info_get does not define metrics_table_header_t* header_value as struct

rsmi_dev_metrics_header_info_get(uint32_t dv_ind, metrics_table_header_t* header_value);

~$ gcc -I/opt/rocm/include test.c

In file included from test.c:1:
/opt/rocm/include/rocm_smi/rocm_smi.h:5370:51: error: unknown type name ‘metrics_table_header_t’
 5370 | rsmi_dev_metrics_header_info_get(uint32_t dv_ind, metrics_table_header_t* header_value);
      |                                                   ^~~~~~~~~~~~~~~~~~~~~~

~$ cat test.c

#include <rocm_smi/rocm_smi.h> 

~$ dpkg -l | grep rocm

ii  rocm-core6.0.0                        6.0.0.60000-91~22.04                    amd64        Radeon Open Compute (ROCm) Runtime software stack
ii  rocm-smi-lib6.0.0                     6.0.0.60000-91~22.04                    amd64        AMD System Management libraries
dmitrii-galantsev commented 5 months ago

We have a patch in the works by @oliveiradan that fixes it (and other metrics related issues). Will keep it open until it's merged develop branch.

bertwesarg commented 5 months ago

Still broken with 6.0.1-108.

bertwesarg commented 5 months ago

I can confirm, that this is solved with 6.0.1-112. Thanks.

dmitrii-galantsev commented 5 months ago

Fixed in 6.0.1-112. Thanks for confirming @bertwesarg !