diff --git a/projects/amdsmi/include/amd_smi/amdsmi.h b/projects/amdsmi/include/amd_smi/amdsmi.h index 124746421b..f7b8d7ee5e 100644 --- a/projects/amdsmi/include/amd_smi/amdsmi.h +++ b/projects/amdsmi/include/amd_smi/amdsmi.h @@ -503,7 +503,7 @@ typedef struct { } amdsmi_proc_info_t; //! Guaranteed maximum possible number of supported frequencies -#define AMDSMI_MAX_NUM_FREQUENCIES 32 +#define AMDSMI_MAX_NUM_FREQUENCIES 33 //! Maximum possible value for fan speed. Should be used as the denominator //! when determining fan speed percentage. @@ -944,6 +944,11 @@ typedef struct { * @brief This structure holds information about clock frequencies. */ typedef struct { + /** + * Deep Sleep frequency is only supported by some GPUs + */ + bool has_deep_sleep; + /** * The number of supported frequencies */ diff --git a/projects/amdsmi/py-interface/amdsmi_wrapper.py b/projects/amdsmi/py-interface/amdsmi_wrapper.py index 360780bd3e..9c49d42b1a 100644 --- a/projects/amdsmi/py-interface/amdsmi_wrapper.py +++ b/projects/amdsmi/py-interface/amdsmi_wrapper.py @@ -837,16 +837,6 @@ amdsmi_process_handle_t = ctypes.c_uint32 class struct_amdsmi_proc_info_t(Structure): pass -class struct_engine_usage_(Structure): - pass - -struct_engine_usage_._pack_ = 1 # source:False -struct_engine_usage_._fields_ = [ - ('gfx', ctypes.c_uint64), - ('enc', ctypes.c_uint64), - ('reserved', ctypes.c_uint32 * 12), -] - class struct_memory_usage_(Structure): pass @@ -858,6 +848,16 @@ struct_memory_usage_._fields_ = [ ('reserved', ctypes.c_uint32 * 10), ] +class struct_engine_usage_(Structure): + pass + +struct_engine_usage_._pack_ = 1 # source:False +struct_engine_usage_._fields_ = [ + ('gfx', ctypes.c_uint64), + ('enc', ctypes.c_uint64), + ('reserved', ctypes.c_uint32 * 12), +] + struct_amdsmi_proc_info_t._pack_ = 1 # source:False struct_amdsmi_proc_info_t._fields_ = [ ('name', ctypes.c_char * 32), @@ -1285,9 +1285,12 @@ class struct_amdsmi_frequencies_t(Structure): struct_amdsmi_frequencies_t._pack_ = 1 # source:False struct_amdsmi_frequencies_t._fields_ = [ + ('has_deep_sleep', ctypes.c_bool), + ('PADDING_0', ctypes.c_ubyte * 3), ('num_supported', ctypes.c_uint32), ('current', ctypes.c_uint32), - ('frequency', ctypes.c_uint64 * 32), + ('PADDING_1', ctypes.c_ubyte * 4), + ('frequency', ctypes.c_uint64 * 33), ] amdsmi_frequencies_t = struct_amdsmi_frequencies_t @@ -1297,7 +1300,8 @@ class struct_amdsmi_pcie_bandwidth_t(Structure): struct_amdsmi_pcie_bandwidth_t._pack_ = 1 # source:False struct_amdsmi_pcie_bandwidth_t._fields_ = [ ('transfer_rate', amdsmi_frequencies_t), - ('lanes', ctypes.c_uint32 * 32), + ('lanes', ctypes.c_uint32 * 33), + ('PADDING_0', ctypes.c_ubyte * 4), ] amdsmi_pcie_bandwidth_t = struct_amdsmi_pcie_bandwidth_t