amdsmi.h Source File

amdsmi.h Source File#

AMD SMI: amdsmi.h Source File
amdsmi.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) Advanced Micro Devices, Inc. All rights reserved.
3  *
4  * Permission is hereby granted, free of charge, to any person obtaining a copy
5  * of this software and associated documentation files (the "Software"), to deal
6  * in the Software without restriction, including without limitation the rights
7  * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8  * copies of the Software, and to permit persons to whom the Software is
9  * furnished to do so, subject to the following conditions:
10  *
11  * The above copyright notice and this permission notice shall be included in
12  * all copies or substantial portions of the Software.
13  *
14  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17  * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
20  * THE SOFTWARE.
21  */
22 
23 #ifndef __AMDSMI_H__
24 #define __AMDSMI_H__
25 
31 #include <stdlib.h>
32 #include <stdbool.h>
33 
34 #ifdef __cplusplus
35 extern "C" {
36 #include <cstdint>
37 #ifdef ENABLE_ESMI_LIB
38  #include <e_smi/e_smi.h>
39 #endif
40 #else // __cplusplus
41 #include <stdint.h>
42 #endif // __cplusplus
43 
51 typedef enum {
53  AMDSMI_INIT_AMD_CPUS = (1 << 0),
54  AMDSMI_INIT_AMD_GPUS = (1 << 1),
55  AMDSMI_INIT_NON_AMD_CPUS = (1 << 2),
56  AMDSMI_INIT_NON_AMD_GPUS = (1 << 3),
57  AMDSMI_INIT_AMD_APUS = (AMDSMI_INIT_AMD_CPUS | AMDSMI_INIT_AMD_GPUS) // Default option
59 
65 #define AMDSMI_MAX_MM_IP_COUNT 8
66 #define AMDSMI_MAX_DATE_LENGTH 32
67 #define AMDSMI_MAX_STRING_LENGTH 256
68 #define AMDSMI_MAX_DEVICES 32
69 #define AMDSMI_MAX_DRIVER_VERSION_LENGTH 80
70 #define AMDSMI_MAX_CACHE_TYPES 10
71 #define AMDSMI_MAX_ACCELERATOR_PROFILE 32
72 #define AMDSMI_MAX_CP_PROFILE_RESOURCES 32
73 #define AMDSMI_MAX_ACCELERATOR_PARTITIONS 8
74 #define AMDSMI_MAX_NUM_NUMA_NODES 32
75 
76 #define AMDSMI_GPU_UUID_SIZE 38
77 
83 #define AMDSMI_MAX_NAME 32
84 #define AMDSMI_MAX_NUM_XGMI_PHYSICAL_LINK 64
85 #define AMDSMI_MAX_CONTAINER_TYPE 2
86 #define AMDSMI_256_LENGTH AMDSMI_MAX_STRING_LENGTH
87 
97 #define CENTRIGRADE_TO_MILLI_CENTIGRADE 1000
98 
104 #define AMDSMI_NUM_HBM_INSTANCES 4
105 
111 #define AMDSMI_MAX_NUM_VCN 4
112 
118 #define AMDSMI_MAX_NUM_CLKS 4
119 
125 #define AMDSMI_MAX_NUM_XGMI_LINKS 8
126 
132 #define AMDSMI_MAX_NUM_GFX_CLKS 8
133 
139 #define AMDSMI_MAX_AID 4
140 
146 #define AMDSMI_MAX_ENGINES 8
147 
153 #define AMDSMI_MAX_NUM_JPEG 32
154 
166 #define AMDSMI_MAX_NUM_XCC 8
167 
180 #define AMDSMI_MAX_NUM_XCP 8
181 
182 /* string format */
183 #define AMDSMI_TIME_FORMAT "%02d:%02d:%02d.%03d"
184 #define AMDSMI_DATE_FORMAT "%04d-%02d-%02d:%02d:%02d:%02d.%03d"
185 
193 #define AMDSMI_LIB_VERSION_YEAR 25
194 
196 #define AMDSMI_LIB_VERSION_MAJOR 25
197 
199 #define AMDSMI_LIB_VERSION_MINOR 4
200 
202 #define AMDSMI_LIB_VERSION_RELEASE 0
203 
204 #define AMDSMI_LIB_VERSION_CREATE_STRING(MAJOR, MINOR, RELEASE) (#MAJOR "." #MINOR "." #RELEASE)
205 #define AMDSMI_LIB_VERSION_EXPAND_PARTS(MAJOR_STR, MINOR_STR, RELEASE_STR) AMDSMI_LIB_VERSION_CREATE_STRING(MAJOR_STR, MINOR_STR, RELEASE_STR)
206 #define AMDSMI_LIB_VERSION_STRING AMDSMI_LIB_VERSION_EXPAND_PARTS(AMDSMI_LIB_VERSION_MAJOR, AMDSMI_LIB_VERSION_MINOR, AMDSMI_LIB_VERSION_RELEASE)
207 
213 typedef enum {
214  AMDSMI_MM_UVD,
215  AMDSMI_MM_VCE,
216  AMDSMI_MM_VCN,
217  AMDSMI_MM__MAX
219 
225 typedef enum {
226  AMDSMI_CONTAINER_LXC,
227  AMDSMI_CONTAINER_DOCKER,
229 
236 typedef void *amdsmi_socket_handle;
237 
238 #ifdef ENABLE_ESMI_LIB
239 
246 
252 typedef struct {
253  uint32_t major;
254  uint32_t minor;
256 
257 #endif
258 
268 typedef enum {
269  AMDSMI_PROCESSOR_TYPE_UNKNOWN = 0,
270  AMDSMI_PROCESSOR_TYPE_AMD_GPU,
271  AMDSMI_PROCESSOR_TYPE_AMD_CPU,
272  AMDSMI_PROCESSOR_TYPE_NON_AMD_GPU,
273  AMDSMI_PROCESSOR_TYPE_NON_AMD_CPU,
274  AMDSMI_PROCESSOR_TYPE_AMD_CPU_CORE,
275  AMDSMI_PROCESSOR_TYPE_AMD_APU
277 
286 typedef enum {
288  // Library usage errors
308  // Processor related errors
314  // Data and size errors
319  //esmi errors
334  // General errors
335  AMDSMI_STATUS_MAP_ERROR = 0xFFFFFFFE,
338 
344 typedef enum {
346  AMDSMI_CLK_TYPE_FIRST = AMDSMI_CLK_TYPE_SYS,
347  AMDSMI_CLK_TYPE_GFX = AMDSMI_CLK_TYPE_SYS,
351  AMDSMI_CLK_TYPE_SOC,
352  AMDSMI_CLK_TYPE_MEM,
353  AMDSMI_CLK_TYPE_PCIE,
354  AMDSMI_CLK_TYPE_VCLK0,
355  AMDSMI_CLK_TYPE_VCLK1,
356  AMDSMI_CLK_TYPE_DCLK0,
357  AMDSMI_CLK_TYPE_DCLK1,
358  AMDSMI_CLK_TYPE__MAX = AMDSMI_CLK_TYPE_DCLK1
360 
366 typedef enum {
367  AMDSMI_ACCELERATOR_PARTITION_INVALID = 0,
378  AMDSMI_ACCELERATOR_PARTITION_MAX
380 
386 typedef enum {
387  AMDSMI_ACCELERATOR_XCC,
388  AMDSMI_ACCELERATOR_ENCODER,
389  AMDSMI_ACCELERATOR_DECODER,
390  AMDSMI_ACCELERATOR_DMA,
391  AMDSMI_ACCELERATOR_JPEG,
392  AMDSMI_ACCELERATOR_MAX
394 
401 typedef enum {
402  AMDSMI_COMPUTE_PARTITION_INVALID = 0,
414 
420 typedef enum {
421  AMDSMI_MEMORY_PARTITION_UNKNOWN = 0,
436 
443 typedef enum {
444  AMDSMI_TEMPERATURE_TYPE_EDGE,
445  AMDSMI_TEMPERATURE_TYPE_FIRST = AMDSMI_TEMPERATURE_TYPE_EDGE,
446  AMDSMI_TEMPERATURE_TYPE_HOTSPOT,
447  AMDSMI_TEMPERATURE_TYPE_JUNCTION = AMDSMI_TEMPERATURE_TYPE_HOTSPOT,
448  AMDSMI_TEMPERATURE_TYPE_VRAM,
449  AMDSMI_TEMPERATURE_TYPE_HBM_0,
450  AMDSMI_TEMPERATURE_TYPE_HBM_1,
451  AMDSMI_TEMPERATURE_TYPE_HBM_2,
452  AMDSMI_TEMPERATURE_TYPE_HBM_3,
453  AMDSMI_TEMPERATURE_TYPE_PLX,
454  AMDSMI_TEMPERATURE_TYPE__MAX = AMDSMI_TEMPERATURE_TYPE_PLX
456 
463 typedef enum {
464  AMDSMI_FW_ID_SMU = 1,
465  AMDSMI_FW_ID_FIRST = AMDSMI_FW_ID_SMU,
466  AMDSMI_FW_ID_CP_CE,
467  AMDSMI_FW_ID_CP_PFP,
468  AMDSMI_FW_ID_CP_ME,
469  AMDSMI_FW_ID_CP_MEC_JT1,
470  AMDSMI_FW_ID_CP_MEC_JT2,
471  AMDSMI_FW_ID_CP_MEC1,
472  AMDSMI_FW_ID_CP_MEC2,
473  AMDSMI_FW_ID_RLC,
474  AMDSMI_FW_ID_SDMA0,
475  AMDSMI_FW_ID_SDMA1,
476  AMDSMI_FW_ID_SDMA2,
477  AMDSMI_FW_ID_SDMA3,
478  AMDSMI_FW_ID_SDMA4,
479  AMDSMI_FW_ID_SDMA5,
480  AMDSMI_FW_ID_SDMA6,
481  AMDSMI_FW_ID_SDMA7,
482  AMDSMI_FW_ID_VCN,
483  AMDSMI_FW_ID_UVD,
484  AMDSMI_FW_ID_VCE,
485  AMDSMI_FW_ID_ISP,
486  AMDSMI_FW_ID_DMCU_ERAM, /*eRAM*/
487  AMDSMI_FW_ID_DMCU_ISR, /*ISR*/
488  AMDSMI_FW_ID_RLC_RESTORE_LIST_GPM_MEM,
489  AMDSMI_FW_ID_RLC_RESTORE_LIST_SRM_MEM,
490  AMDSMI_FW_ID_RLC_RESTORE_LIST_CNTL,
491  AMDSMI_FW_ID_RLC_V,
492  AMDSMI_FW_ID_MMSCH,
493  AMDSMI_FW_ID_PSP_SYSDRV,
494  AMDSMI_FW_ID_PSP_SOSDRV,
495  AMDSMI_FW_ID_PSP_TOC,
496  AMDSMI_FW_ID_PSP_KEYDB,
497  AMDSMI_FW_ID_DFC,
498  AMDSMI_FW_ID_PSP_SPL,
499  AMDSMI_FW_ID_DRV_CAP,
500  AMDSMI_FW_ID_MC,
501  AMDSMI_FW_ID_PSP_BL,
502  AMDSMI_FW_ID_CP_PM4,
503  AMDSMI_FW_ID_RLC_P,
504  AMDSMI_FW_ID_SEC_POLICY_STAGE2,
505  AMDSMI_FW_ID_REG_ACCESS_WHITELIST,
506  AMDSMI_FW_ID_IMU_DRAM,
507  AMDSMI_FW_ID_IMU_IRAM,
508  AMDSMI_FW_ID_SDMA_TH0,
509  AMDSMI_FW_ID_SDMA_TH1,
510  AMDSMI_FW_ID_CP_MES,
511  AMDSMI_FW_ID_MES_KIQ,
512  AMDSMI_FW_ID_MES_STACK,
513  AMDSMI_FW_ID_MES_THREAD1,
514  AMDSMI_FW_ID_MES_THREAD1_STACK,
515  AMDSMI_FW_ID_RLX6,
516  AMDSMI_FW_ID_RLX6_DRAM_BOOT,
517  AMDSMI_FW_ID_RS64_ME,
518  AMDSMI_FW_ID_RS64_ME_P0_DATA,
519  AMDSMI_FW_ID_RS64_ME_P1_DATA,
520  AMDSMI_FW_ID_RS64_PFP,
521  AMDSMI_FW_ID_RS64_PFP_P0_DATA,
522  AMDSMI_FW_ID_RS64_PFP_P1_DATA,
523  AMDSMI_FW_ID_RS64_MEC,
524  AMDSMI_FW_ID_RS64_MEC_P0_DATA,
525  AMDSMI_FW_ID_RS64_MEC_P1_DATA,
526  AMDSMI_FW_ID_RS64_MEC_P2_DATA,
527  AMDSMI_FW_ID_RS64_MEC_P3_DATA,
528  AMDSMI_FW_ID_PPTABLE,
529  AMDSMI_FW_ID_PSP_SOC,
530  AMDSMI_FW_ID_PSP_DBG,
531  AMDSMI_FW_ID_PSP_INTF,
532  AMDSMI_FW_ID_RLX6_CORE1,
533  AMDSMI_FW_ID_RLX6_DRAM_BOOT_CORE1,
534  AMDSMI_FW_ID_RLCV_LX7,
535  AMDSMI_FW_ID_RLC_SAVE_RESTORE_LIST,
536  AMDSMI_FW_ID_ASD,
537  AMDSMI_FW_ID_TA_RAS,
538  AMDSMI_FW_ID_TA_XGMI,
539  AMDSMI_FW_ID_RLC_SRLG,
540  AMDSMI_FW_ID_RLC_SRLS,
541  AMDSMI_FW_ID_PM,
542  AMDSMI_FW_ID_DMCU,
543  AMDSMI_FW_ID__MAX
545 
551 typedef enum {
552  AMDSMI_VRAM_TYPE_UNKNOWN = 0,
553  // HBM
554  AMDSMI_VRAM_TYPE_HBM = 1,
555  AMDSMI_VRAM_TYPE_HBM2 = 2,
556  AMDSMI_VRAM_TYPE_HBM2E = 3,
557  AMDSMI_VRAM_TYPE_HBM3 = 4,
558  // DDR
559  AMDSMI_VRAM_TYPE_DDR2 = 10,
560  AMDSMI_VRAM_TYPE_DDR3 = 11,
561  AMDSMI_VRAM_TYPE_DDR4 = 12,
562  // GDDR
563  AMDSMI_VRAM_TYPE_GDDR1 = 17,
564  AMDSMI_VRAM_TYPE_GDDR2 = 18,
565  AMDSMI_VRAM_TYPE_GDDR3 = 19,
566  AMDSMI_VRAM_TYPE_GDDR4 = 20,
567  AMDSMI_VRAM_TYPE_GDDR5 = 21,
568  AMDSMI_VRAM_TYPE_GDDR6 = 22,
569  AMDSMI_VRAM_TYPE_GDDR7 = 23,
570  AMDSMI_VRAM_TYPE__MAX = AMDSMI_VRAM_TYPE_GDDR7
572 
578 typedef enum {
579  AMDSMI_VRAM_VENDOR_SAMSUNG,
580  AMDSMI_VRAM_VENDOR_INFINEON,
581  AMDSMI_VRAM_VENDOR_ELPIDA,
582  AMDSMI_VRAM_VENDOR_ETRON,
583  AMDSMI_VRAM_VENDOR_NANYA,
584  AMDSMI_VRAM_VENDOR_HYNIX,
585  AMDSMI_VRAM_VENDOR_MOSEL,
586  AMDSMI_VRAM_VENDOR_WINBOND,
587  AMDSMI_VRAM_VENDOR_ESMT,
588  AMDSMI_VRAM_VENDOR_MICRON,
589  AMDSMI_VRAM_VENDOR_UNKNOWN
591 
597 typedef struct {
598  uint64_t lower_bound;
599  uint64_t upper_bound;
600  uint64_t reserved[2];
602 
608 typedef struct {
609  uint8_t xgmi_lanes;
610  uint64_t xgmi_hive_id;
611  uint64_t xgmi_node_id;
612  uint32_t index;
613  uint32_t reserved[9];
615 
621 typedef struct {
622  uint32_t vram_total;
623  uint32_t vram_used;
624  uint32_t reserved[2];
626 
633 typedef struct {
636  uint64_t acc_counter;
637  uint64_t acc_prochot_thrm;
638  uint64_t acc_ppt_pwr;
639  uint64_t acc_socket_thrm;
640  uint64_t acc_vr_thrm;
641  uint64_t acc_hbm_thrm;
643  uint64_t per_prochot_thrm;
644  uint64_t per_ppt_pwr;
645  uint64_t per_socket_thrm;
646  uint64_t per_vr_thrm;
647  uint64_t per_hbm_thrm;
650  uint8_t active_ppt_pwr;
652  uint8_t active_vr_thrm;
653  uint8_t active_hbm_thrm;
655  uint64_t reserved[3];
657 
663 typedef struct {
666  uint32_t reserved[8];
668 
674 typedef union {
675  struct {
676  uint64_t function_number : 3;
677  uint64_t device_number : 5;
678  uint64_t bus_number : 8;
679  uint64_t domain_number : 48;
680  };
681  uint64_t as_uint;
682 } amdsmi_bdf_t;
683 
689 typedef struct {
690  uint32_t drm_render; // the render node under /sys/class/drm/renderD*
691  uint32_t drm_card; // the graphic card device under /sys/class/drm/card*
692  uint32_t hsa_id; // the HSA enumeration ID
693  uint32_t hip_id; // the HIP enumeration ID
694  char hip_uuid[AMDSMI_MAX_STRING_LENGTH]; // the HIP unique identifer
696 
702 typedef enum {
703  AMDSMI_CARD_FORM_FACTOR_PCIE,
704  AMDSMI_CARD_FORM_FACTOR_OAM,
705  AMDSMI_CARD_FORM_FACTOR_CEM,
706  AMDSMI_CARD_FORM_FACTOR_UNKNOWN
708 
714 typedef struct {
715  struct pcie_static_ {
716  uint16_t max_pcie_width;
717  uint32_t max_pcie_speed;
721  uint64_t reserved[9];
722  } pcie_static;
723  struct pcie_metric_ {
724  uint16_t pcie_width;
725  uint32_t pcie_speed;
726  uint32_t pcie_bandwidth;
727  uint64_t pcie_replay_count;
733  uint64_t reserved[12];
734  } pcie_metric;
735  uint64_t reserved[32];
737 
743 typedef struct {
744  uint64_t power_cap;
745  uint64_t default_power_cap;
746  uint64_t dpm_cap;
747  uint64_t min_power_cap;
748  uint64_t max_power_cap;
749  uint64_t reserved[3];
751 
757 typedef struct {
758  char name[AMDSMI_MAX_STRING_LENGTH];
759  char build_date[AMDSMI_MAX_DATE_LENGTH];
760  char part_number[AMDSMI_MAX_STRING_LENGTH];
761  char version[AMDSMI_MAX_STRING_LENGTH];
762  uint64_t reserved[32];
764 
770 typedef enum {
771  AMDSMI_CACHE_PROPERTY_ENABLED = 0x00000001,
772  AMDSMI_CACHE_PROPERTY_DATA_CACHE = 0x00000002,
773  AMDSMI_CACHE_PROPERTY_INST_CACHE = 0x00000004,
774  AMDSMI_CACHE_PROPERTY_CPU_CACHE = 0x00000008,
775  AMDSMI_CACHE_PROPERTY_SIMD_CACHE = 0x00000010,
777 
783 typedef struct {
784  uint32_t num_cache_types;
785  struct cache_ {
786  uint32_t cache_properties;
787  uint32_t cache_size;
788  uint32_t cache_level;
789  uint32_t max_num_cu_shared;
791  uint32_t reserved[3];
792  } cache[AMDSMI_MAX_CACHE_TYPES];
793  uint32_t reserved[15];
795 
801 typedef struct {
802  uint8_t num_fw_info;
803  struct fw_info_list_ {
804  amdsmi_fw_block_t fw_id;
805  uint64_t fw_version;
806  uint64_t reserved[2];
807  } fw_info_list[AMDSMI_FW_ID__MAX];
808  uint32_t reserved[7];
810 
816 typedef struct {
817  char market_name[AMDSMI_MAX_STRING_LENGTH];
818  uint32_t vendor_id;
819  char vendor_name[AMDSMI_MAX_STRING_LENGTH];
820  uint32_t subvendor_id;
821  uint64_t device_id;
822  uint32_t rev_id;
823  char asic_serial[AMDSMI_MAX_STRING_LENGTH];
824  uint32_t oam_id;
827  uint32_t reserved[22];
829 
830 
836 typedef struct {
837  uint64_t kfd_id; //< 0xFFFFFFFFFFFFFFFF if not supported
838  uint32_t node_id; //< 0xFFFFFFFF if not supported
839  uint32_t current_partition_id; //< 0xFFFFFFFF if not supported
840  uint32_t reserved[12];
842 
848 typedef union {
849  struct nps_flags_ {
850  uint32_t nps1_cap :1;
851  uint32_t nps2_cap :1;
852  uint32_t nps4_cap :1;
853  uint32_t nps8_cap :1;
854  uint32_t reserved :28;
855  } nps_flags;
856  uint32_t nps_cap_mask;
858 
865 typedef struct {
866  amdsmi_nps_caps_t partition_caps;
868  uint32_t num_numa_ranges;
869  struct numa_range_ {
870  amdsmi_vram_type_t memory_type;
871  uint64_t start;
872  uint64_t end;
873  } numa_range[AMDSMI_MAX_NUM_NUMA_NODES];
874  uint64_t reserved[11];
876 
882 typedef struct {
884  uint32_t num_partitions;
886  uint32_t profile_index;
887  uint32_t num_resources;
888  uint32_t resources[AMDSMI_MAX_ACCELERATOR_PARTITIONS][AMDSMI_MAX_CP_PROFILE_RESOURCES];
889  uint64_t reserved[13];
891 
898 typedef struct {
899  uint32_t profile_index;
903  uint64_t reserved[6];
905 
911 typedef struct {
912  uint32_t num_profiles;
913  uint32_t num_resource_profiles;
914  amdsmi_accelerator_partition_resource_profile_t resource_profiles[AMDSMI_MAX_CP_PROFILE_RESOURCES];
916  amdsmi_accelerator_partition_profile_t profiles[AMDSMI_MAX_ACCELERATOR_PROFILE];
917  uint64_t reserved[30];
919 
925 typedef enum {
926  AMDSMI_LINK_TYPE_INTERNAL,
927  AMDSMI_LINK_TYPE_XGMI,
928  AMDSMI_LINK_TYPE_PCIE,
929  AMDSMI_LINK_TYPE_NOT_APPLICABLE,
930  AMDSMI_LINK_TYPE_UNKNOWN
932 
938 typedef struct {
939  uint32_t num_links;
940  struct _links {
941  amdsmi_bdf_t bdf;
942  uint32_t bit_rate;
943  uint32_t max_bandwidth;
945  uint64_t read;
946  uint64_t write;
947  uint64_t reserved[2];
948  } links[AMDSMI_MAX_NUM_XGMI_PHYSICAL_LINK];
949  uint64_t reserved[7];
951 
957 typedef struct {
958  amdsmi_vram_type_t vram_type;
959  amdsmi_vram_vendor_type_t vram_vendor;
960  uint64_t vram_size;
961  uint32_t vram_bit_width;
963  uint64_t reserved[4];
965 
971 typedef struct {
972  char driver_version[AMDSMI_MAX_STRING_LENGTH];
973  char driver_date[AMDSMI_MAX_STRING_LENGTH];
974  char driver_name[AMDSMI_MAX_STRING_LENGTH];
976 
982 typedef struct {
983  char model_number[AMDSMI_MAX_STRING_LENGTH];
984  char product_serial[AMDSMI_MAX_STRING_LENGTH];
985  char fru_id[AMDSMI_MAX_STRING_LENGTH];
986  char product_name[AMDSMI_MAX_STRING_LENGTH];
987  char manufacturer_name[AMDSMI_MAX_STRING_LENGTH];
988  uint64_t reserved[32];
990 
996 typedef struct {
997  uint64_t socket_power;
1000  uint32_t gfx_voltage;
1001  uint32_t soc_voltage;
1002  uint32_t mem_voltage;
1003  uint32_t power_limit;
1004  uint32_t reserved[2];
1006 
1012 typedef struct {
1013  uint32_t clk;
1014  uint32_t min_clk;
1015  uint32_t max_clk;
1016  uint8_t clk_locked;
1017  uint8_t clk_deep_sleep;
1018  uint32_t reserved[4];
1020 
1030 typedef struct {
1031  uint32_t gfx_activity;
1032  uint32_t umc_activity;
1033  uint32_t mm_activity;
1034  uint32_t reserved[13];
1036 
1042 typedef uint32_t amdsmi_process_handle_t;
1043 
1049 typedef struct {
1050  char name[AMDSMI_MAX_STRING_LENGTH];
1052  uint64_t mem;
1053  struct engine_usage_ {
1054  uint64_t gfx;
1055  uint64_t enc;
1056  uint32_t reserved[12];
1057  } engine_usage;
1058  struct memory_usage_ {
1059  uint64_t gtt_mem;
1060  uint64_t cpu_mem;
1061  uint64_t vram_mem;
1062  uint32_t reserved[10];
1063  } memory_usage;
1064  char container_name[AMDSMI_MAX_STRING_LENGTH];
1065  uint32_t reserved[12];
1067 
1073 typedef struct {
1077  uint8_t is_iolink_dma;
1080 
1082 #define AMDSMI_MAX_NUM_FREQUENCIES 33
1083 
1086 #define AMDSMI_MAX_FAN_SPEED 255
1087 
1089 #define AMDSMI_NUM_VOLTAGE_CURVE_POINTS 3
1090 
1096 typedef enum {
1098  AMDSMI_DEV_PERF_LEVEL_FIRST = AMDSMI_DEV_PERF_LEVEL_AUTO,
1108  AMDSMI_DEV_PERF_LEVEL_LAST = AMDSMI_DEV_PERF_LEVEL_DETERMINISM,
1111 
1117 typedef uintptr_t amdsmi_event_handle_t;
1118 
1126 typedef enum {
1129  AMDSMI_EVNT_GRP_INVALID = 0xFFFFFFFF
1131 
1162 typedef enum {
1163  AMDSMI_EVNT_FIRST = AMDSMI_EVNT_GRP_XGMI,
1164 
1165  AMDSMI_EVNT_XGMI_FIRST = AMDSMI_EVNT_GRP_XGMI,
1166  AMDSMI_EVNT_XGMI_0_NOP_TX = AMDSMI_EVNT_XGMI_FIRST,
1174  AMDSMI_EVNT_XGMI_LAST = AMDSMI_EVNT_XGMI_1_BEATS_TX,
1175  AMDSMI_EVNT_XGMI_DATA_OUT_FIRST = AMDSMI_EVNT_GRP_XGMI_DATA_OUT,
1176  AMDSMI_EVNT_XGMI_DATA_OUT_0 = AMDSMI_EVNT_XGMI_DATA_OUT_FIRST,
1182  AMDSMI_EVNT_XGMI_DATA_OUT_LAST = AMDSMI_EVNT_XGMI_DATA_OUT_5,
1183  AMDSMI_EVNT_LAST = AMDSMI_EVNT_XGMI_DATA_OUT_LAST,
1185 
1191 typedef enum {
1196 
1202 typedef struct {
1203  uint64_t value;
1204  uint64_t time_enabled;
1205  uint64_t time_running;
1207 
1213 typedef enum {
1216  AMDSMI_EVT_NOTIF_FIRST = AMDSMI_EVT_NOTIF_VMFAULT,
1217  AMDSMI_EVT_NOTIF_THERMAL_THROTTLE = 2,
1218  AMDSMI_EVT_NOTIF_GPU_PRE_RESET = 3,
1219  AMDSMI_EVT_NOTIF_GPU_POST_RESET = 4,
1220  AMDSMI_EVT_NOTIF_RING_HANG = 5,
1221 
1222  AMDSMI_EVT_NOTIF_LAST = AMDSMI_EVT_NOTIF_RING_HANG
1224 
1230 #define AMDSMI_EVENT_MASK_FROM_INDEX(i) (1ULL << ((i) - 1))
1231 
1236 #define MAX_EVENT_NOTIFICATION_MSG_SIZE 96
1237 
1243 typedef struct {
1248 
1256 typedef enum {
1258  AMDSMI_TEMP_FIRST = AMDSMI_TEMP_CURRENT,
1259 
1291  AMDSMI_TEMP_LAST = AMDSMI_TEMP_SHUTDOWN
1293 
1300 typedef enum {
1302 
1303  AMDSMI_VOLT_FIRST = AMDSMI_VOLT_CURRENT,
1311 
1312  AMDSMI_VOLT_LAST = AMDSMI_VOLT_HIGHEST
1314 
1321 typedef enum {
1322  AMDSMI_VOLT_TYPE_FIRST = 0,
1323 
1324  AMDSMI_VOLT_TYPE_VDDGFX = AMDSMI_VOLT_TYPE_FIRST,
1325  AMDSMI_VOLT_TYPE_LAST = AMDSMI_VOLT_TYPE_VDDGFX,
1326  AMDSMI_VOLT_TYPE_INVALID = 0xFFFFFFFF
1328 
1337 typedef enum {
1343 
1345  AMDSMI_PWR_PROF_PRST_3D_FULL_SCR_MASK = 0x20,
1348 
1350  AMDSMI_PWR_PROF_PRST_INVALID = 0xFFFFFFFFFFFFFFFF
1352 
1358 typedef enum {
1359  AMDSMI_GPU_BLOCK_INVALID = 0x0000000000000000,
1360  AMDSMI_GPU_BLOCK_FIRST = 0x0000000000000001,
1361 
1362  AMDSMI_GPU_BLOCK_UMC = AMDSMI_GPU_BLOCK_FIRST,
1363  AMDSMI_GPU_BLOCK_SDMA = 0x0000000000000002,
1364  AMDSMI_GPU_BLOCK_GFX = 0x0000000000000004,
1365  AMDSMI_GPU_BLOCK_MMHUB = 0x0000000000000008,
1366  AMDSMI_GPU_BLOCK_ATHUB = 0x0000000000000010,
1367  AMDSMI_GPU_BLOCK_PCIE_BIF = 0x0000000000000020,
1368  AMDSMI_GPU_BLOCK_HDP = 0x0000000000000040,
1369  AMDSMI_GPU_BLOCK_XGMI_WAFL = 0x0000000000000080,
1370  AMDSMI_GPU_BLOCK_DF = 0x0000000000000100,
1371  AMDSMI_GPU_BLOCK_SMN = 0x0000000000000200,
1372  AMDSMI_GPU_BLOCK_SEM = 0x0000000000000400,
1373  AMDSMI_GPU_BLOCK_MP0 = 0x0000000000000800,
1374  AMDSMI_GPU_BLOCK_MP1 = 0x0000000000001000,
1375  AMDSMI_GPU_BLOCK_FUSE = 0x0000000000002000,
1376  AMDSMI_GPU_BLOCK_MCA = 0x0000000000004000,
1377  AMDSMI_GPU_BLOCK_VCN = 0x0000000000008000,
1378  AMDSMI_GPU_BLOCK_JPEG = 0x0000000000010000,
1379  AMDSMI_GPU_BLOCK_IH = 0x0000000000020000,
1380  AMDSMI_GPU_BLOCK_MPIO = 0x0000000000040000,
1381 
1383  AMDSMI_GPU_BLOCK_RESERVED = 0x8000000000000000
1385 
1391 typedef enum {
1393  CLK_LIMIT_MAX
1395 
1396 typedef enum {
1397  AMDSMI_CPER_SEV_NON_FATAL_UNCORRECTED = 0,
1398  AMDSMI_CPER_SEV_FATAL = 1,
1399  AMDSMI_CPER_SEV_NON_FATAL_CORRECTED = 2,
1400  AMDSMI_CPER_SEV_NUM = 3,
1401  AMDSMI_CPER_SEV_UNUSED = 10,
1402 } amdsmi_cper_sev_t;
1403 
1404 typedef enum {
1405  AMDSMI_CPER_NOTIFY_TYPE_CMC = 0x450eBDD72DCE8BB1,
1406  AMDSMI_CPER_NOTIFY_TYPE_CPE = 0x4a55D8434E292F96,
1407  AMDSMI_CPER_NOTIFY_TYPE_MCE = 0x4cc5919CE8F56FFE,
1408  AMDSMI_CPER_NOTIFY_TYPE_PCIE = 0x4dfc1A16CF93C01F,
1409  AMDSMI_CPER_NOTIFY_TYPE_INIT = 0x454a9308CC5263E8,
1410  AMDSMI_CPER_NOTIFY_TYPE_NMI = 0x42c9B7E65BAD89FF,
1411  AMDSMI_CPER_NOTIFY_TYPE_BOOT = 0x409aAB403D61A466,
1412  AMDSMI_CPER_NOTIFY_TYPE_DMAR = 0x4c27C6B3667DD791,
1413  AMDSMI_CPER_NOTIFY_TYPE_SEA = 0x11E4BBE89A78788A,
1414  AMDSMI_CPER_NOTIFY_TYPE_SEI = 0x4E87B0AE5C284C81,
1415  AMDSMI_CPER_NOTIFY_TYPE_PEI = 0x4214520409A9D5AC,
1416  AMDSMI_CPER_NOTIFY_TYPE_CXL_COMPONENT = 0x49A341DF69293BC9,
1417 } amdsmi_cper_notify_type_t;
1418 
1424 typedef enum {
1433 
1434  AMDSMI_RAS_ERR_STATE_LAST = AMDSMI_RAS_ERR_STATE_ENABLED,
1435  AMDSMI_RAS_ERR_STATE_INVALID = 0xFFFFFFFF
1437 
1443 typedef enum {
1444  AMDSMI_MEM_TYPE_FIRST = 0,
1445 
1446  AMDSMI_MEM_TYPE_VRAM = AMDSMI_MEM_TYPE_FIRST,
1449 
1450  AMDSMI_MEM_TYPE_LAST = AMDSMI_MEM_TYPE_GTT
1452 
1458 typedef enum {
1461  AMDSMI_FREQ_IND_INVALID = 0xFFFFFFFF
1463 
1469 typedef enum {
1470  AMDSMI_XGMI_STATUS_NO_ERRORS = 0,
1471  AMDSMI_XGMI_STATUS_ERROR,
1472  AMDSMI_XGMI_STATUS_MULTIPLE_ERRORS,
1474 
1480 typedef uint64_t amdsmi_bit_field_t;
1481 
1487 typedef enum {
1493 
1499 typedef enum {
1504  AMDSMI_IOLINK_TYPE_SIZE = 0xFFFFFFFF
1506 
1512 typedef enum {
1513  AMDSMI_UTILIZATION_COUNTER_FIRST = 0,
1515  AMDSMI_COARSE_GRAIN_GFX_ACTIVITY = AMDSMI_UTILIZATION_COUNTER_FIRST,
1520  AMDSMI_FINE_GRAIN_MEM_ACTIVITY = 101,
1521  AMDSMI_FINE_DECODER_ACTIVITY = 102,
1522  AMDSMI_UTILIZATION_COUNTER_LAST = AMDSMI_FINE_DECODER_ACTIVITY
1529 
1530 #define AMDSMI_MAX_UTILIZATION_VALUES 4
1531 
1539 typedef struct {
1541  uint64_t value;
1542  uint64_t fine_value[AMDSMI_MAX_UTILIZATION_VALUES];
1543  uint16_t fine_value_count;
1545 
1551 typedef struct {
1552  uint64_t page_address;
1553  uint64_t page_size;
1556 
1562 #define AMDSMI_MAX_NUM_POWER_PROFILES (sizeof(amdsmi_bit_field_t) * 8)
1563 
1571 typedef struct {
1572  amdsmi_bit_field_t available_profiles; //<! Which profiles are supported by this system
1573  amdsmi_power_profile_preset_masks_t current; //<! Which power profile is currently active
1574  uint32_t num_profiles; //<! How many power profiles are available
1576 
1582 typedef struct {
1583  bool has_deep_sleep; //<! Deep Sleep frequency is only supported by some GPUs
1584  uint32_t num_supported; //<! The number of supported frequencies
1585  uint32_t current; //<! The current frequency index in MHz
1586  uint64_t frequency[AMDSMI_MAX_NUM_FREQUENCIES]; //<! List of frequencies in MHz.
1587  //<! Only the first num_supported frequencies are valid.
1589 
1595 typedef struct {
1596  uint32_t policy_id;
1597  char policy_description[AMDSMI_MAX_NAME];
1599 
1600 #define AMDSMI_MAX_NUM_PM_POLICIES 32
1601 
1609 typedef struct {
1610  uint32_t num_supported;
1611  uint32_t current;
1612  amdsmi_dpm_policy_entry_t policies[AMDSMI_MAX_NUM_PM_POLICIES];
1614 
1624 typedef struct {
1626  uint32_t lanes[AMDSMI_MAX_NUM_FREQUENCIES];
1628 
1634 typedef struct {
1635  uint32_t year;
1636  uint32_t major;
1637  uint32_t minor;
1638  uint32_t release;
1639  const char *build;
1641 
1647 typedef struct {
1648  uint64_t frequency;
1649  uint64_t voltage;
1651 
1659 typedef struct {
1663 
1670 typedef struct {
1673 
1679 typedef struct {
1685  uint32_t num_regions;
1687 
1695 typedef struct {
1696  // TODO(amd) Doxygen documents
1697  // Note: This should match: AMDGpuMetricsHeader_v1_t
1699  uint16_t structure_size;
1700  uint8_t format_revision;
1701  uint8_t content_revision;
1704 
1710 typedef struct {
1715  uint32_t gfx_busy_inst[AMDSMI_MAX_NUM_XCC];
1716  uint16_t jpeg_busy[AMDSMI_MAX_NUM_JPEG];
1717  uint16_t vcn_busy[AMDSMI_MAX_NUM_VCN];
1718 
1719  uint64_t gfx_busy_acc[AMDSMI_MAX_NUM_XCC];
1720 
1724  /* Total App Clock Counter Accumulated */
1725  uint64_t gfx_below_host_limit_acc[AMDSMI_MAX_NUM_XCC];
1727 
1743 typedef struct {
1744  amd_metrics_table_header_t common_header;
1745 
1752  uint16_t temperature_hotspot;
1753  uint16_t temperature_mem;
1754  uint16_t temperature_vrgfx;
1755  uint16_t temperature_vrsoc;
1756  uint16_t temperature_vrmem;
1757 
1764 
1770 
1773 
1778  uint16_t average_socclk_frequency;
1779  uint16_t average_uclk_frequency;
1780  uint16_t average_vclk0_frequency;
1781  uint16_t average_dclk0_frequency;
1782  uint16_t average_vclk1_frequency;
1783  uint16_t average_dclk1_frequency;
1784 
1788  uint16_t current_gfxclk;
1789  uint16_t current_socclk;
1790  uint16_t current_uclk;
1791  uint16_t current_vclk0;
1792  uint16_t current_dclk0;
1793  uint16_t current_vclk1;
1794  uint16_t current_dclk1;
1795 
1796  uint32_t throttle_status;
1797 
1799 
1803  uint16_t pcie_link_width;
1804  uint16_t pcie_link_speed;
1805 
1806  /*
1807  * v1.1 additions
1808  */
1809  uint32_t gfx_activity_acc;
1810  uint32_t mem_activity_acc;
1811  uint16_t temperature_hbm[AMDSMI_NUM_HBM_INSTANCES];
1812 
1813  /*
1814  * v1.2 additions
1815  */
1817 
1818  /*
1819  * v1.3 additions
1820  */
1821  uint16_t voltage_soc;
1822  uint16_t voltage_gfx;
1823  uint16_t voltage_mem;
1824 
1826 
1827  /*
1828  * v1.4 additions
1829  */
1831 
1832  uint16_t vcn_activity[AMDSMI_MAX_NUM_VCN];
1833 
1835 
1836  uint16_t xgmi_link_width;
1837  uint16_t xgmi_link_speed;
1838 
1840 
1842 
1844 
1846 
1848 
1852  uint64_t xgmi_read_data_acc[AMDSMI_MAX_NUM_XGMI_LINKS];
1853  uint64_t xgmi_write_data_acc[AMDSMI_MAX_NUM_XGMI_LINKS];
1854 
1858  uint16_t current_gfxclks[AMDSMI_MAX_NUM_GFX_CLKS];
1859  uint16_t current_socclks[AMDSMI_MAX_NUM_CLKS];
1860  uint16_t current_vclk0s[AMDSMI_MAX_NUM_CLKS];
1861  uint16_t current_dclk0s[AMDSMI_MAX_NUM_CLKS];
1862 
1866  uint16_t jpeg_activity[AMDSMI_MAX_NUM_JPEG];
1869 
1874 
1879 
1895 
1911  uint64_t vr_thm_residency_acc;
1912  uint64_t hbm_thm_residency_acc;
1913 
1914  uint16_t num_partition;
1915 
1917 
1919 
1920  /*
1921  * @brief v1.7 additions
1922  */
1924 
1925  uint16_t xgmi_link_status[AMDSMI_MAX_NUM_XGMI_LINKS];
1927 
1933 typedef enum {
1938 
1944 typedef struct {
1945  uint32_t total_links;
1947  uint64_t reserved[7];
1949 
1950 #define MAX_AMDSMI_NAME_LENGTH 64
1951 
1957 typedef struct {
1958  char name[MAX_AMDSMI_NAME_LENGTH];
1959  uint64_t value;
1961 
1967 typedef enum {
1968  AMDSMI_REG_XGMI,
1969  AMDSMI_REG_WAFL,
1970  AMDSMI_REG_PCIE,
1971  AMDSMI_REG_USR,
1972  AMDSMI_REG_USR1,
1974 
1980 typedef struct {
1981  uint32_t ras_eeprom_version;
1982  // PARITY error(bit 0), Single Bit correctable (bit1),
1983  // Double bit error detection (bit2), Poison (bit 3).
1986 
1992 typedef struct {
1995  uint64_t deferred_count;
1996  uint64_t reserved[5];
1998 
2004 typedef struct {
2005  uint32_t process_id;
2006  uint32_t pasid;
2007  uint64_t vram_usage;
2008  uint64_t sdma_usage;
2009  uint32_t cu_occupancy;
2011 
2017 typedef struct {
2018  uint32_t count;
2019  amdsmi_processor_handle processor_list[AMDSMI_MAX_DEVICES];
2020  uint64_t reserved[15];
2022 
2031 typedef enum {
2032  AMDSMI_VIRTUALIZATION_MODE_UNKNOWN = 0,
2033  AMDSMI_VIRTUALIZATION_MODE_BAREMETAL,
2034  AMDSMI_VIRTUALIZATION_MODE_HOST,
2035  AMDSMI_VIRTUALIZATION_MODE_GUEST,
2036  AMDSMI_VIRTUALIZATION_MODE_PASSTHROUGH
2038 
2039 #define AMDSMI_DEFAULT_VARIANT 0xFFFFFFFFFFFFFFFF
2040 
2041 #ifdef ENABLE_ESMI_LIB
2042 
2048 typedef struct {
2049  uint8_t debug;
2050  uint8_t minor;
2051  uint8_t major;
2052  uint8_t unused;
2054 
2060 typedef struct {
2061  uint32_t max_bw;
2062  uint32_t utilized_bw;
2063  uint32_t utilized_pct;
2065 
2071 typedef struct {
2072  uint8_t range : 3;
2073  uint8_t ref_rate : 1;
2075 
2081 typedef struct {
2082  uint16_t power : 15;
2083  uint16_t update_rate : 9;
2084  uint8_t dimm_addr;
2086 
2092 typedef struct {
2093  uint16_t sensor : 11;
2094  uint16_t update_rate : 9;
2095  uint8_t dimm_addr;
2096  float temp;
2098 
2104 typedef enum {
2105  AGG_BW0 = 1,
2106  RD_BW0 = 2,
2107  WR_BW0 = 4
2109 
2119 typedef struct {
2121  char *link_name;
2123 
2130 typedef struct {
2131  uint8_t max_dpm_level;
2132  uint8_t min_dpm_level;
2134 
2140 typedef struct __attribute__((__packed__)) {
2141  uint32_t accumulation_counter;
2142 
2143  /* TEMPERATURE */
2144  uint32_t max_socket_temperature;
2145  uint32_t max_vr_temperature;
2146  uint32_t max_hbm_temperature;
2147  uint64_t max_socket_temperature_acc;
2148  uint64_t max_vr_temperature_acc;
2149  uint64_t max_hbm_temperature_acc;
2150 
2151  /* POWER */
2152  uint32_t socket_power_limit;
2153  uint32_t max_socket_power_limit;
2154  uint32_t socket_power;
2155 
2156  /* ENERGY */
2157  uint64_t timestamp;
2158  uint64_t socket_energy_acc;
2159  uint64_t ccd_energy_acc;
2160  uint64_t xcd_energy_acc;
2161  uint64_t aid_energy_acc;
2162  uint64_t hbm_energy_acc;
2163 
2164  /* FREQUENCY */
2165  uint32_t cclk_frequency_limit;
2166  uint32_t gfxclk_frequency_limit;
2167  uint32_t fclk_frequency;
2168  uint32_t uclk_frequency;
2169  uint32_t socclk_frequency[4];
2170  uint32_t vclk_frequency[4];
2171  uint32_t dclk_frequency[4];
2172  uint32_t lclk_frequency[4];
2173  uint64_t gfxclk_frequency_acc[8];
2174  uint64_t cclk_frequency_acc[96];
2175 
2176  /* FREQUENCY RANGE */
2177  uint32_t max_cclk_frequency;
2178  uint32_t min_cclk_frequency;
2179  uint32_t max_gfxclk_frequency;
2180  uint32_t min_gfxclk_frequency;
2181  uint32_t fclk_frequency_table[4];
2182  uint32_t uclk_frequency_table[4];
2183  uint32_t socclk_frequency_table[4];
2184  uint32_t vclk_frequency_table[4];
2185  uint32_t dclk_frequency_table[4];
2186  uint32_t lclk_frequency_table[4];
2187  uint32_t max_lclk_dpm_range;
2188  uint32_t min_lclk_dpm_range;
2189 
2190  /* XGMI */
2191  uint32_t xgmi_width;
2192  uint32_t xgmi_bitrate;
2193  uint64_t xgmi_read_bandwidth_acc[8];
2194  uint64_t xgmi_write_bandwidth_acc[8];
2195 
2196  /* ACTIVITY */
2197  uint32_t socket_c0_residency;
2198  uint32_t socket_gfx_busy;
2199  uint32_t dram_bandwidth_utilization;
2200  uint64_t socket_c0_residency_acc;
2201  uint64_t socket_gfx_busy_acc;
2202  uint64_t dram_bandwidth_acc;
2203  uint32_t max_dram_bandwidth;
2204  uint64_t dram_bandwidth_utilization_acc;
2205  uint64_t pcie_bandwidth_acc[4];
2206 
2207  /* THROTTLERS */
2208  uint32_t prochot_residency_acc;
2209  uint32_t ppt_residency_acc;
2210  uint32_t socket_thm_residency_acc;
2211  uint32_t vr_thm_residency_acc;
2212  uint32_t hbm_thm_residency_acc;
2213  uint32_t spare;
2214 
2215  /* New items at the end to maintain driver compatibility */
2216  uint32_t gfxclk_frequency[8];
2217 } amdsmi_hsmp_metrics_table_t;
2218 
2224 static char* const amdsmi_hsmp_freqlimit_src_names[] = {
2225  "cHTC-Active",
2226  "PROCHOT",
2227  "TDC limit",
2228  "PPT Limit",
2229  "OPN Max",
2230  "Reliability Limit",
2231  "APML Agent",
2232  "HSMP Agent"
2233 };
2234 
2235 #endif
2236 
2237 /*****************************************************************************/
2265 amdsmi_status_t amdsmi_init(uint64_t init_flags);
2266 
2281 
2284 /*****************************************************************************/
2321 amdsmi_status_t amdsmi_get_socket_handles(uint32_t *socket_count, amdsmi_socket_handle* socket_handles);
2322 
2323 #ifdef ENABLE_ESMI_LIB
2324 
2352 amdsmi_status_t amdsmi_get_cpu_handles(uint32_t *cpu_count, amdsmi_processor_handle *processor_handles);
2353 
2354 #endif
2355 
2375 amdsmi_status_t amdsmi_get_socket_info(amdsmi_socket_handle socket_handle, size_t len, char *name);
2376 
2377 #ifdef ENABLE_ESMI_LIB
2378 
2397 amdsmi_status_t amdsmi_get_processor_info(amdsmi_processor_handle processor_handle, size_t len, char *name);
2398 
2423  uint32_t* processor_count, uint32_t* nr_cpusockets,
2424  uint32_t* nr_cpucores, uint32_t* nr_gpus);
2425 
2447 amdsmi_status_t amdsmi_get_processor_handles_by_type(amdsmi_socket_handle socket_handle,
2448  processor_type_t processor_type,
2449  amdsmi_processor_handle* processor_handles,
2450  uint32_t* processor_count);
2451 #endif
2452 
2489 amdsmi_status_t amdsmi_get_processor_handles(amdsmi_socket_handle socket_handle,
2490  uint32_t *processor_count,
2491  amdsmi_processor_handle* processor_handles);
2492 
2493 
2494 #ifdef ENABLE_ESMI_LIB
2522  amdsmi_processor_handle* processor_handles);
2523 #endif
2524 
2545 
2564 
2581 
2602 amdsmi_get_gpu_device_uuid(amdsmi_processor_handle processor_handle, unsigned int *uuid_length, char *uuid);
2603 
2625 
2628 /*****************************************************************************/
2661 
2680 
2717  size_t len);
2718 
2745 amdsmi_status_t amdsmi_get_gpu_vram_vendor(amdsmi_processor_handle processor_handle, char *brand, uint32_t len);
2746 
2771 
2808 amdsmi_get_gpu_subsystem_name(amdsmi_processor_handle processor_handle, char *name, size_t len);
2809 
2830 
2833 /*****************************************************************************/
2862  amdsmi_pcie_bandwidth_t *bandwidth);
2863 
2903 
2928 
2956  uint64_t *received, uint64_t *max_pkt_sz);
2957 
2982 
2985 /*****************************************************************************/
3026 
3029 /*****************************************************************************/
3067 amdsmi_get_energy_count(amdsmi_processor_handle processor_handle, uint64_t *energy_accumulator,
3068  float *counter_resolution, uint64_t *timestamp);
3069 
3072 /*****************************************************************************/
3100  uint32_t sensor_ind, uint64_t cap);
3101 
3124 amdsmi_set_gpu_power_profile(amdsmi_processor_handle processor_handle, uint32_t reserved,
3126 
3141  uint32_t *ppower);
3142 
3157  uint32_t *pcap);
3158 
3173  uint32_t *pmax);
3174 
3189  uint32_t *power);
3190 
3205  uint32_t pcap);
3206 
3221  uint8_t mode);
3222 
3225 /*****************************************************************************/
3258  uint64_t *total);
3259 
3286  uint64_t *used);
3287 
3313 amdsmi_get_gpu_bad_page_info(amdsmi_processor_handle processor_handle, uint32_t *num_pages,
3315 
3335 amdsmi_get_gpu_bad_page_threshold(amdsmi_processor_handle processor_handle, uint32_t *threshold);
3336 
3337 
3358 
3374 
3402  amdsmi_gpu_block_t block,
3403  amdsmi_ras_err_state_t *state);
3404 
3442  uint32_t *num_pages,
3443  amdsmi_retired_page_record_t *records);
3444 
3480  uint32_t sensor_ind, int64_t *speed);
3481 
3510  uint32_t sensor_ind, int64_t *speed);
3511 
3539  uint32_t sensor_ind, uint64_t *max_speed);
3540 
3573  amdsmi_temperature_type_t sensor_type,
3574  amdsmi_temperature_metric_t metric, int64_t *temperature);
3575 
3591 
3624  amdsmi_voltage_type_t sensor_type,
3625  amdsmi_voltage_metric_t metric, int64_t *voltage);
3626 
3629 /*****************************************************************************/
3652 amdsmi_status_t amdsmi_reset_gpu_fan(amdsmi_processor_handle processor_handle, uint32_t sensor_ind);
3653 
3679  uint32_t sensor_ind, uint64_t speed);
3680 
3683 /*****************************************************************************/
3707  uint32_t *gpu_busy_percent);
3708 
3741  amdsmi_utilization_counter_t utilization_counters[],
3742  uint32_t count, uint64_t *timestamp);
3743 
3768  amdsmi_dev_perf_level_t *perf);
3769 
3794 
3819 
3844 
3870 
3886 
3912 
3935 
3959  amdsmi_gpu_metrics_t *pgpu_metrics);
3960 
3996  amdsmi_name_value_t** pm_metrics,
3997  uint32_t *num_of_metrics);
3998 
4036  amdsmi_reg_type_t reg_type,
4037  amdsmi_name_value_t** reg_metrics,
4038  uint32_t *num_of_metrics);
4039 
4068  uint64_t minclkvalue,
4069  uint64_t maxclkvalue,
4070  amdsmi_clk_type_t clkType);
4071 
4095  amdsmi_clk_type_t clk_type,
4096  amdsmi_clk_limit_type_t limit_type,
4097  uint64_t clk_value);
4098 
4113 
4139  amdsmi_freq_ind_t level,
4140  uint64_t clkvalue,
4141  amdsmi_clk_type_t clkType);
4142 
4167  uint32_t vpoint, uint64_t clkvalue, uint64_t voltvalue);
4168 
4209  uint32_t *num_regions, amdsmi_freq_volt_region_t *buffer);
4210 
4249 
4252 /*****************************************************************************/
4282 
4324 
4362  amdsmi_clk_type_t clk_type, uint64_t freq_bitmask);
4363 
4384  amdsmi_dpm_policy_t* policy);
4385 
4408  uint32_t policy_id);
4409 
4430  amdsmi_dpm_policy_t* xgmi_plpd);
4431 
4453 amdsmi_status_t amdsmi_set_xgmi_plpd(amdsmi_processor_handle processor_handle, uint32_t policy_id);
4454 
4475  uint32_t* pisolate);
4476 
4497  uint32_t pisolate);
4498 
4517 
4520 /*****************************************************************************/
4543 
4546 /*****************************************************************************/
4583 
4617  uint64_t *enabled_blocks);
4618 
4641 
4642 
4643 #pragma pack(push, 1)
4644 typedef struct {
4645  unsigned char b[16];
4647 
4648 typedef struct {
4649  uint8_t seconds;
4650  uint8_t minutes;
4651  uint8_t hours;
4652  uint8_t flag;
4653  uint8_t day;
4654  uint8_t month;
4655  uint8_t year;
4656  uint8_t century;
4658 
4659 typedef union {
4660  struct valid_bits_ {
4661  uint32_t platform_id : 1;
4662  uint32_t timestamp : 1;
4663  uint32_t partition_id : 1;
4664  uint32_t reserved : 29;
4665  } valid_bits;
4666  uint32_t valid_mask;
4668 
4669 typedef struct {
4670  char signature[4]; /* "CPER" */
4671  uint16_t revision;
4672  uint32_t signature_end; /* 0xFFFFFFFF */
4673  uint16_t sec_cnt;
4674  amdsmi_cper_sev_t error_severity;
4675  amdsmi_cper_valid_bits_t cper_valid_bits;
4676  uint32_t record_length; /* Total size of CPER Entry */
4677  amdsmi_cper_timestamp_t timestamp;
4678  char platform_id[16];
4679  amdsmi_cper_guid_t partition_id; /* Reserved */
4680  char creator_id[16];
4681  amdsmi_cper_guid_t notify_type; /* CMC, MCE, can use amdsmi_cper_notifiy_type_t to decode*/
4682  char record_id[8]; /* Unique CPER Entry ID */
4683  uint32_t flags; /* Reserved */
4684  uint64_t persistence_info; /* Reserved */
4685  uint8_t reserved[12]; /* Reserved */
4687 
4688 #pragma pack(pop)
4727 amdsmi_get_gpu_cper_entries(amdsmi_processor_handle processor_handle, uint32_t severity_mask, char *cper_data,
4728  uint64_t *buf_size, amdsmi_cper_hdr_t** cper_hdrs, uint64_t *entry_count, uint64_t *cursor);
4729 
4732 /*****************************************************************************/
4770  amdsmi_gpu_block_t block,
4771  amdsmi_ras_err_state_t *state);
4772 
4791 amdsmi_status_code_to_string(amdsmi_status_t status, const char **status_string);
4792 
4795 /*****************************************************************************/
4917 
4948  amdsmi_event_handle_t *evnt_handle);
4949 
4968 
4992  amdsmi_counter_command_t cmd, void *cmd_args);
4993 
5016  amdsmi_counter_value_t *value);
5017 
5042  amdsmi_event_group_t grp, uint32_t *available);
5043 
5046 /*****************************************************************************/
5086 
5109 
5144 amdsmi_get_gpu_compute_process_gpus(uint32_t pid, uint32_t *dv_indices, uint32_t *num_devices);
5145 
5148 /*****************************************************************************/
5180 
5199 
5216 
5236  amdsmi_xgmi_link_status_t* link_status);
5237 
5240 /*****************************************************************************/
5261  amdsmi_link_metrics_t *link_metrics);
5262 
5283 amdsmi_topo_get_numa_node_number(amdsmi_processor_handle processor_handle, uint32_t *numa_node);
5284 
5309  uint64_t *weight);
5310 
5338  amdsmi_processor_handle processor_handle_dst,
5339  uint64_t *min_bandwidth,
5340  uint64_t *max_bandwidth);
5341 
5370  amdsmi_processor_handle processor_handle_dst,
5371  uint64_t *hops, amdsmi_io_link_type_t *type);
5372 
5399  amdsmi_link_type_t link_type,
5400  amdsmi_topology_nearest_t* topology_nearest_info);
5401 
5426  amdsmi_processor_handle processor_handle_dst,
5427  bool *accessible);
5428 
5457  amdsmi_processor_handle processor_handle_dst,
5459 
5462 /*****************************************************************************/
5503  char *compute_partition, uint32_t len);
5504 
5534  amdsmi_compute_partition_type_t compute_partition);
5535 
5538 /*****************************************************************************/
5578 amdsmi_get_gpu_memory_partition(amdsmi_processor_handle processor_handle, char *memory_partition, uint32_t len);
5579 
5609  amdsmi_memory_partition_type_t memory_partition);
5627 
5645 
5648 /*****************************************************************************/
5674 
5695  uint32_t *partition_id);
5696 
5713  uint32_t profile_index);
5714 
5717 /*****************************************************************************/
5743 
5776 
5817 amdsmi_get_gpu_event_notification(int timeout_ms, uint32_t *num_elem, amdsmi_evt_notification_data_t *data);
5818 
5838 
5841 /*****************************************************************************/
5863 
5866 /*****************************************************************************/
5892 
5893 
5914 
5930 
5947 
5966 amdsmi_get_power_cap_info(amdsmi_processor_handle processor_handle, uint32_t sensor_ind,
5967  amdsmi_power_cap_info_t *info);
5968 
5984 
6002  uint16_t *xcd_count);
6003 
6006 /*****************************************************************************/
6027 
6045 
6048 /*****************************************************************************/
6070 
6091 
6108 
6124 
6146 
6164 
6187 
6190 /*****************************************************************************/
6250 amdsmi_get_gpu_process_list(amdsmi_processor_handle processor_handle, uint32_t *max_processes, amdsmi_proc_info_t *list);
6251 
6254 #ifdef ENABLE_ESMI_LIB
6255 
6256 /*****************************************************************************/
6275  uint64_t *penergy);
6276 
6291  uint64_t *penergy);
6292 
6295 /*****************************************************************************/
6311 amdsmi_status_t amdsmi_get_threads_per_core(uint32_t *threads_per_core);
6312 
6326  amdsmi_hsmp_driver_version_t *amdsmi_hsmp_driver_ver);
6327 
6341  amdsmi_smu_fw_version_t *amdsmi_smu_fw);
6342 
6356  uint32_t *proto_ver);
6357 
6372  uint32_t *prochot);
6373 
6390  uint32_t *fclk, uint32_t *mclk);
6391 
6406  uint32_t *cclk);
6407 
6424  uint16_t *freq, char **src_type);
6425 
6442  uint16_t *fmax, uint16_t *fmin);
6443 
6458  uint32_t *freq);
6459 
6462 /*****************************************************************************/
6481  uint32_t *pboostlimit);
6482 
6497  uint32_t *pc0_residency);
6498 
6513  uint32_t boostlimit);
6514 
6529  uint32_t boostlimit);
6530 
6533 /*****************************************************************************/
6552  amdsmi_ddr_bw_metrics_t *ddr_bw);
6553 
6556 /*****************************************************************************/
6575  uint32_t *ptmon);
6576 
6579 /*****************************************************************************/
6600  uint8_t dimm_addr,
6602 
6617  uint8_t dimm_addr,
6618  amdsmi_dimm_power_t *dimm_pow);
6619 
6636  uint8_t dimm_addr,
6637  amdsmi_dimm_thermal_t *dimm_temp);
6638 
6641 /*****************************************************************************/
6662  uint8_t min, uint8_t max);
6663 
6666 /*****************************************************************************/
6687  uint8_t min_link_width, uint8_t max_link_width);
6688 
6691 /*****************************************************************************/
6708 
6723 
6742  uint8_t nbio_id, uint8_t min, uint8_t max);
6743 
6760  uint8_t nbio_id, amdsmi_dpm_level_t *nbio);
6761 
6778  uint8_t rate_ctrl, uint8_t *prev_mode);
6779 
6796  uint8_t max_pstate, uint8_t min_pstate);
6797 
6800 /*****************************************************************************/
6821  amdsmi_link_id_bw_type_t link, uint32_t *io_bw);
6822 
6839  amdsmi_link_id_bw_type_t link, uint32_t *xgmi_bw);
6840 
6841 /*****************************************************************************/
6860  uint32_t *metrics_version);
6861 
6876  amdsmi_hsmp_metrics_table_t *metrics_table);
6877 
6880 /*****************************************************************************/
6899  uint32_t *pcore_ind);
6900 
6913 
6926 
6944 amdsmi_status_t amdsmi_get_esmi_err_msg(amdsmi_status_t status, const char **status_string);
6945 
6946 #endif
6947 
6950 #ifdef __cplusplus
6951 }
6952 #endif // __cplusplus
6953 
6954 #endif // __AMDSMI_H__
amdsmi_link_type_t
Link type.
Definition: amdsmi.h:925
#define AMDSMI_MAX_DATE_LENGTH
YYYY-MM-DD:HH:MM:SS.MSC.
Definition: amdsmi.h:66
amdsmi_evt_notification_type_t
Event notification event types.
Definition: amdsmi.h:1213
#define AMDSMI_MAX_NUM_CLKS
This should match MAX_NUM_CLKS.
Definition: amdsmi.h:118
amdsmi_container_types_t
Container.
Definition: amdsmi.h:225
#define AMDSMI_MAX_NUM_XGMI_LINKS
This should match MAX_NUM_XGMI_LINKS.
Definition: amdsmi.h:125
amdsmi_freq_ind_t
The values of this enum are used as frequency identifiers.
Definition: amdsmi.h:1458
amdsmi_reg_type_t
This register type for register table.
Definition: amdsmi.h:1967
uintptr_t amdsmi_event_handle_t
Handle to performance event counter.
Definition: amdsmi.h:1117
amdsmi_memory_type_t
Types of memory.
Definition: amdsmi.h:1443
amdsmi_accelerator_partition_type_t
Accelerator Partition.
Definition: amdsmi.h:366
amdsmi_clk_type_t
Clock types.
Definition: amdsmi.h:344
amdsmi_accelerator_partition_resource_type_t
Accelerator Partition Resource Types.
Definition: amdsmi.h:386
amdsmi_card_form_factor_t
Card Form Factor.
Definition: amdsmi.h:702
#define MAX_EVENT_NOTIFICATION_MSG_SIZE
Maximum number of characters an event notification message will be matches kfd message max size.
Definition: amdsmi.h:1236
#define AMDSMI_MAX_NUM_XCP
This should match AMDSMI_MAX_NUM_XCP; XCP - Accelerated Compute Processor, also referred to as the Gr...
Definition: amdsmi.h:180
amdsmi_io_link_type_t
Types for IO Link.
Definition: amdsmi.h:1499
amdsmi_init_flags_t
Initialization flags.
Definition: amdsmi.h:51
#define AMDSMI_MAX_NUM_XCC
This should match AMDSMI_MAX_NUM_XCC; XCC - Accelerated Compute Core, the collection of compute units...
Definition: amdsmi.h:166
#define AMDSMI_NUM_HBM_INSTANCES
This should match NUM_HBM_INSTANCES.
Definition: amdsmi.h:104
amdsmi_vram_type_t
vRam Types. This enum is used to identify various VRam types.
Definition: amdsmi.h:551
amdsmi_event_group_t
Event Groups Enum denoting an event group. The value of the enum is the base value for all the event ...
Definition: amdsmi.h:1126
amdsmi_ras_err_state_t
The current ECC state.
Definition: amdsmi.h:1424
amdsmi_io_bw_encoding_t
xGMI Bandwidth Encoding types
Definition: amdsmi.h:2104
amdsmi_event_type_t
Event types Event type enum. Events belonging to a particular event group amdsmi_event_group_t should...
Definition: amdsmi.h:1162
processor_type_t
Processor types detectable by AMD SMI.
Definition: amdsmi.h:268
#define AMDSMI_MAX_UTILIZATION_VALUES
The max number of values per counter type.
Definition: amdsmi.h:1530
amdsmi_fw_block_t
The values of this enum are used to identify the various firmware blocks.
Definition: amdsmi.h:463
amdsmi_mm_ip_t
GPU Capability info.
Definition: amdsmi.h:213
amdsmi_memory_page_status_t
Reserved Memory Page States.
Definition: amdsmi.h:1487
amdsmi_xgmi_status_t
XGMI Status.
Definition: amdsmi.h:1469
amdsmi_dev_perf_level_t
PowerPlay performance levels.
Definition: amdsmi.h:1096
amdsmi_virtualization_mode_t
Variant placeholder.
Definition: amdsmi.h:2031
uint32_t amdsmi_process_handle_t
Process Handle.
Definition: amdsmi.h:1042
amdsmi_utilization_counter_type_t
The utilization counter type.
Definition: amdsmi.h:1512
amdsmi_memory_partition_type_t
Memory Partitions.
Definition: amdsmi.h:420
amdsmi_voltage_metric_t
Voltage Metrics. This enum is used to identify various Volatge metrics. Corresponding values will be ...
Definition: amdsmi.h:1300
uint64_t amdsmi_bit_field_t
Bitfield used in various AMDSMI calls.
Definition: amdsmi.h:1480
amdsmi_voltage_type_t
This ennumeration is used to indicate which type of voltage reading should be obtained.
Definition: amdsmi.h:1321
amdsmi_clk_limit_type_t
The clk limit type.
Definition: amdsmi.h:1391
void * amdsmi_processor_handle
opaque handler point to underlying implementation
Definition: amdsmi.h:235
amdsmi_cache_property_type_t
cache properties
Definition: amdsmi.h:770
amdsmi_status_t
Error codes returned by amdsmi functions.
Definition: amdsmi.h:286
#define AMDSMI_MAX_NUM_JPEG
This should match AMDSMI_MAX_NUM_JPEG (8*4=32)
Definition: amdsmi.h:153
void * amdsmi_cpusocket_handle
opaque handler point to underlying implementation
Definition: amdsmi.h:245
amdsmi_vram_vendor_type_t
VRam Vendor Types.
Definition: amdsmi.h:578
amdsmi_temperature_metric_t
Temperature Metrics. This enum is used to identify various temperature metrics. Corresponding values ...
Definition: amdsmi.h:1256
amdsmi_gpu_block_t
This enum is used to identify different GPU blocks.
Definition: amdsmi.h:1358
struct __attribute__((__packed__))
HSMP Metrics table (supported only with hsmp proto version 6).
Definition: amdsmi.h:2140
amdsmi_temperature_type_t
This enumeration is used to indicate from which part of the processor a temperature reading should be...
Definition: amdsmi.h:443
#define AMDSMI_MAX_NUM_FREQUENCIES
Guaranteed maximum possible number of supported frequencies.
Definition: amdsmi.h:1082
amdsmi_counter_command_t
Event counter commands.
Definition: amdsmi.h:1191
amdsmi_xgmi_link_status_type_t
XGMI Link Status Type.
Definition: amdsmi.h:1933
#define AMDSMI_MAX_NAME
Common defines.
Definition: amdsmi.h:83
amdsmi_power_profile_preset_masks_t
Pre-set Profile Selections. These bitmasks can be AND'd with the ::amdsmi_power_profile_status_t....
Definition: amdsmi.h:1337
#define AMDSMI_MAX_NUM_GFX_CLKS
This should match MAX_NUM_GFX_CLKS.
Definition: amdsmi.h:132
#define AMDSMI_NUM_VOLTAGE_CURVE_POINTS
The number of points that make up a voltage-frequency curve definition.
Definition: amdsmi.h:1089
amdsmi_compute_partition_type_t
Compute Partition. This enum is used to identify various compute partitioning settings.
Definition: amdsmi.h:401
#define AMDSMI_MAX_NUM_VCN
This should match MAX_NUM_VCN.
Definition: amdsmi.h:111
amdsmi_status_t amdsmi_set_gpu_accelerator_partition_profile(amdsmi_processor_handle processor_handle, uint32_t profile_index)
Version 2.0: Set accelerator partition setting based on profile_index from amdsmi_get_gpu_accelerator...
amdsmi_status_t amdsmi_get_gpu_accelerator_partition_profile_config(amdsmi_processor_handle processor_handle, amdsmi_accelerator_partition_profile_config_t *profile_config)
Version 2.0: Returns gpu accelerator partition caps as currently configured in the system User must u...
amdsmi_status_t amdsmi_get_gpu_accelerator_partition_profile(amdsmi_processor_handle processor_handle, amdsmi_accelerator_partition_profile_t *profile, uint32_t *partition_id)
Version 2.0: Returns current gpu accelerator partition capabilities.
amdsmi_status_t amdsmi_get_power_cap_info(amdsmi_processor_handle processor_handle, uint32_t sensor_ind, amdsmi_power_cap_info_t *info)
Returns the power caps as currently configured in the system. Power in units of uW....
amdsmi_status_t amdsmi_get_pcie_info(amdsmi_processor_handle processor_handle, amdsmi_pcie_info_t *info)
Returns the PCIe info for the GPU.
amdsmi_status_t amdsmi_get_gpu_vram_info(amdsmi_processor_handle processor_handle, amdsmi_vram_info_t *info)
Returns vram info.
amdsmi_status_t amdsmi_get_gpu_xcd_counter(amdsmi_processor_handle processor_handle, uint16_t *xcd_count)
Returns the 'xcd_counter' from the GPU metrics associated with the device.
amdsmi_status_t amdsmi_get_gpu_kfd_info(amdsmi_processor_handle processor_handle, amdsmi_kfd_info_t *info)
Returns the KFD (Kernel Fusion Driver) information for the device.
amdsmi_status_t amdsmi_get_gpu_board_info(amdsmi_processor_handle processor_handle, amdsmi_board_info_t *info)
Returns the board part number and board information for the requested device.
amdsmi_status_t amdsmi_get_gpu_asic_info(amdsmi_processor_handle processor_handle, amdsmi_asic_info_t *info)
Returns the ASIC information for the device.
amdsmi_status_t amdsmi_get_cpu_family(uint32_t *cpu_family)
Get CPU family.
amdsmi_status_t amdsmi_first_online_core_on_cpu_socket(amdsmi_processor_handle processor_handle, uint32_t *pcore_ind)
Get first online core on socket.
amdsmi_status_t amdsmi_get_cpu_model(uint32_t *cpu_model)
Get CPU model.
amdsmi_status_t amdsmi_get_esmi_err_msg(amdsmi_status_t status, const char **status_string)
Get a description of provided AMDSMI error status for esmi errors.
uint64_t indep_throttle_status
Throttle status.
Definition: amdsmi.h:1825
uint64_t enc
In nano-secs.
Definition: amdsmi.h:1055
uint64_t pcie_nak_received_count
total number of NAKs issued on the PCIe link by the receiver
Definition: amdsmi.h:731
uint64_t power_cap
current power cap Units uW {@linux_bm} or W {@host}
Definition: amdsmi.h:744
uint64_t sdma_usage
SDMA usage in microseconds.
Definition: amdsmi.h:2008
amdsmi_range_t curr_mclk_range
The current MCLK frequency range, upper bound only in MHz.
Definition: amdsmi.h:1681
uint16_t sensor
Dimm thermal sensor[31:21](11 bit data)
Definition: amdsmi.h:2093
uint32_t partition_resource
Resources a partition can use, which may be shared.
Definition: amdsmi.h:901
uint64_t uncorrectable_count
Accumulated uncorrectable errors.
Definition: amdsmi.h:1994
uint32_t clk
In MHz.
Definition: amdsmi.h:1013
uint64_t correctable_count
Accumulated correctable errors.
Definition: amdsmi.h:1993
uint64_t vram_max_bandwidth
VRAM max bandwidth at max memory clock (GB/s)
Definition: amdsmi.h:1923
uint32_t gfx_activity_acc
new in v1
Definition: amdsmi.h:1809
uint8_t active_hbm_thrm
High Bandwidth Memory (HBM) thermal violation; 1 = active 0 = not active; Max uint8 means unsupported...
Definition: amdsmi.h:653
uint64_t frequency
Frequency coordinate (in Hz)
Definition: amdsmi.h:1648
uint32_t num_cache_instance
total number of instance of this cache type
Definition: amdsmi.h:790
uint32_t process_id
Process ID.
Definition: amdsmi.h:2005
amdsmi_utilization_counter_type_t type
Utilization counter type.
Definition: amdsmi.h:1540
uint64_t gfx
In nano-secs.
Definition: amdsmi.h:1054
uint32_t cache_size
In KB.
Definition: amdsmi.h:787
@ AMDSMI_EVT_NOTIF_NONE
Not used.
Definition: amdsmi.h:1214
@ AMDSMI_EVT_NOTIF_VMFAULT
VM page fault.
Definition: amdsmi.h:1215
uint32_t nps8_cap
bool 1 = true; 0 = false
Definition: amdsmi.h:853
amdsmi_range_t mclk_freq_limits
The range possible of MCLK values in MHz.
Definition: amdsmi.h:1683
uint8_t active_socket_thrm
Socket thermal violation; 1 = active 0 = not active; Max uint8 means unsupported.
Definition: amdsmi.h:651
@ AMDSMI_FREQ_IND_INVALID
An invalid frequency index.
Definition: amdsmi.h:1461
@ AMDSMI_FREQ_IND_MAX
Index used for the maximum frequency value.
Definition: amdsmi.h:1460
@ AMDSMI_FREQ_IND_MIN
Index used for the minimum frequency value.
Definition: amdsmi.h:1459
uint64_t page_size
Page size.
Definition: amdsmi.h:1553
amdsmi_io_bw_encoding_t bw_type
Bandwidth Type Information [1, 2, 4].
Definition: amdsmi.h:2120
uint32_t default_profile_index
The index of the default profile in the profiles array.
Definition: amdsmi.h:915
uint8_t dimm_addr
Dimm address[7:0](8 bit data)
Definition: amdsmi.h:2084
uint32_t num_supported
The number of supported policies.
Definition: amdsmi.h:1610
uint16_t average_socket_power
Power (W) /Energy (15.259uJ per 1ns)
Definition: amdsmi.h:1768
uint32_t major
Major version number.
Definition: amdsmi.h:253
uint32_t gfxclk_lock_status
Clock Lock Status. Each bit corresponds to clock instance.
Definition: amdsmi.h:1834
@ AMDSMI_MEM_TYPE_VRAM
VRAM memory.
Definition: amdsmi.h:1446
@ AMDSMI_MEM_TYPE_VIS_VRAM
VRAM memory that is visible.
Definition: amdsmi.h:1447
@ AMDSMI_MEM_TYPE_GTT
GTT memory.
Definition: amdsmi.h:1448
uint64_t acc_ppt_pwr
PVIOL; Current accumulated Package Power Tracking (PPT) count; Max uint64 means unsupported.
Definition: amdsmi.h:638
float temp
temperature in degree celcius
Definition: amdsmi.h:2096
@ AMDSMI_ACCELERATOR_PARTITION_DPX
Definition: amdsmi.h:370
@ AMDSMI_ACCELERATOR_PARTITION_QPX
Definition: amdsmi.h:374
@ AMDSMI_ACCELERATOR_PARTITION_SPX
Definition: amdsmi.h:368
@ AMDSMI_ACCELERATOR_PARTITION_TPX
Definition: amdsmi.h:372
@ AMDSMI_ACCELERATOR_PARTITION_CPX
Definition: amdsmi.h:376
uint16_t temperature_edge
v1.0 Base
Definition: amdsmi.h:1751
uint16_t average_mm_activity
UVD or VCN.
Definition: amdsmi.h:1763
uint64_t value
Coarse grain activity counter value (average)
Definition: amdsmi.h:1541
@ AMDSMI_CLK_TYPE_SYS
System clock.
Definition: amdsmi.h:345
@ AMDSMI_CLK_TYPE_DCEF
Display Controller Engine clock.
Definition: amdsmi.h:350
@ AMDSMI_CLK_TYPE_DF
Definition: amdsmi.h:348
uint64_t acc_hbm_thrm
Current accumulated High Bandwidth Memory (HBM) thermal count; Max uint64 means unsupported.
Definition: amdsmi.h:641
uint64_t time_enabled
Time that the counter was enabled in nanoseconds.
Definition: amdsmi.h:1204
uint16_t max_pcie_width
maximum number of PCIe lanes
Definition: amdsmi.h:716
uint64_t acc_gfx_clk_below_host_limit
Current graphic clock below host limit count; Max uint64 means unsupported.
Definition: amdsmi.h:642
uint16_t current_fan_speed
Fans (RPM)
Definition: amdsmi.h:1798
uint8_t range
temp range[2:0](3 bit data)
Definition: amdsmi.h:2072
char * link_name
Link name [P0, P1, G0, G1 etc].
Definition: amdsmi.h:2121
uint64_t firmware_timestamp
PMFW attached timestamp (10ns resolution)
Definition: amdsmi.h:1816
uint32_t cu_occupancy
Compute Unit usage in percent.
Definition: amdsmi.h:2009
amdsmi_range_t supported_freq_range
In MHz.
Definition: amdsmi.h:664
uint64_t pcie_replay_count
total number of the replays issued on the PCIe link
Definition: amdsmi.h:727
uint8_t is_iolink_atomics_64bit
1 = true, 0 = false, UINT8_MAX = Not defined
Definition: amdsmi.h:1076
@ AMDSMI_IOLINK_TYPE_SIZE
Max of IO Link types.
Definition: amdsmi.h:1504
@ AMDSMI_IOLINK_TYPE_UNDEFINED
unknown type.
Definition: amdsmi.h:1500
@ AMDSMI_IOLINK_TYPE_NUMIOLINKTYPES
Number of IO Link types.
Definition: amdsmi.h:1503
@ AMDSMI_IOLINK_TYPE_XGMI
XGMI.
Definition: amdsmi.h:1502
@ AMDSMI_IOLINK_TYPE_PCIEXPRESS
PCI Express.
Definition: amdsmi.h:1501
uint32_t max_bw
DDR Maximum theoritical bandwidth in GB/s.
Definition: amdsmi.h:2061
uint64_t target_graphics_version
0xFFFFFFFFFFFFFFFF if not supported
Definition: amdsmi.h:826
uint32_t pcie_lc_perf_other_end_recovery
PCIE other end recovery counter.
Definition: amdsmi.h:1918
@ AMDSMI_INIT_ALL_PROCESSORS
Initialize all processors.
Definition: amdsmi.h:52
uint16_t update_rate
Time since last update[16:8](9 bit data)
Definition: amdsmi.h:2094
uint8_t clk_locked
True/False.
Definition: amdsmi.h:1016
uint32_t num_regions
The number of voltage curve regions.
Definition: amdsmi.h:1685
uint8_t min_dpm_level
Min LCLK DPM level[7:0](8 bit data)
Definition: amdsmi.h:2132
amdsmi_range_t freq_range
The frequency range for this VDDC Curve point.
Definition: amdsmi.h:1660
uint32_t vram_bit_width
In bits.
Definition: amdsmi.h:961
uint8_t clk_deep_sleep
In MHz.
Definition: amdsmi.h:1017
uint32_t profile_index
Index in the profiles array in amdsmi_accelerator_partition_profile_t.
Definition: amdsmi.h:886
uint32_t current
The current policy index.
Definition: amdsmi.h:1611
uint8_t dimm_addr
Dimm address[7:0](8 bit data)
Definition: amdsmi.h:2095
amdsmi_memory_page_status_t status
Page "reserved" status.
Definition: amdsmi.h:1554
@ AMDSMI_EVNT_GRP_XGMI
Data Fabric (XGMI) related events.
Definition: amdsmi.h:1127
@ AMDSMI_EVNT_GRP_XGMI_DATA_OUT
XGMI Outbound data.
Definition: amdsmi.h:1128
uint32_t num_partitions
On MI300X: SPX=>1, DPX=>2, QPX=>4, CPX=>8; length of resources.
Definition: amdsmi.h:884
@ AMDSMI_RAS_ERR_STATE_PARITY
ECC errors present, but type unknown.
Definition: amdsmi.h:1427
@ AMDSMI_RAS_ERR_STATE_SING_C
Single correctable error.
Definition: amdsmi.h:1428
@ AMDSMI_RAS_ERR_STATE_MULT_UC
Multiple uncorrectable errors.
Definition: amdsmi.h:1429
@ AMDSMI_RAS_ERR_STATE_POISON
Definition: amdsmi.h:1430
@ AMDSMI_RAS_ERR_STATE_ENABLED
ECC is enabled.
Definition: amdsmi.h:1432
@ AMDSMI_RAS_ERR_STATE_NONE
No current errors.
Definition: amdsmi.h:1425
@ AMDSMI_RAS_ERR_STATE_DISABLED
ECC is disabled.
Definition: amdsmi.h:1426
uint16_t current_socket_power
In Watts.
Definition: amdsmi.h:1830
uint32_t vendor_id
Use 32 bit to be compatible with other platform.
Definition: amdsmi.h:818
uint32_t min_clk
In MHz.
Definition: amdsmi.h:1014
uint8_t active_gfx_clk_below_host_limit
Graphics clock below host limit violation; 1 = active 0 = not active; Max uint8 means unsupported.
Definition: amdsmi.h:654
uint64_t system_clock_counter
Driver attached timestamp (in ns)
Definition: amdsmi.h:1772
uint64_t per_hbm_thrm
High Bandwidth Memory (HBM) thermal violation % (greater than 0% is a violation); Max uint64 means un...
Definition: amdsmi.h:647
@ AGG_BW0
Aggregate Bandwidth.
Definition: amdsmi.h:2105
@ RD_BW0
Read Bandwidth.
Definition: amdsmi.h:2106
@ WR_BW0
Write Bandwdith.
Definition: amdsmi.h:2107
uint32_t vram_total
In MB.
Definition: amdsmi.h:622
uint64_t ppt_residency_acc
Accumulated throttler residencies.
Definition: amdsmi.h:1894
uint64_t per_prochot_thrm
Processor hot violation % (greater than 0% is a violation); Max uint64 means unsupported.
Definition: amdsmi.h:643
uint64_t vram_size
vram size in MB
Definition: amdsmi.h:960
uint64_t write
total data transfered for each link in KB
Definition: amdsmi.h:946
uint8_t debug
SMU fw Debug version number.
Definition: amdsmi.h:2049
amdsmi_processor_handle processor_handle
Handler of device that corresponds to the event.
Definition: amdsmi.h:1244
uint16_t average_umc_activity
memory controller
Definition: amdsmi.h:1762
@ AMDSMI_EVNT_XGMI_0_BEATS_TX
Throughput = BEATS/time_running 10^9 bytes/sec.
Definition: amdsmi.h:1169
@ AMDSMI_EVNT_XGMI_DATA_OUT_3
Outbound beats to neighbor 3.
Definition: amdsmi.h:1179
@ AMDSMI_EVNT_XGMI_0_NOP_TX
NOPs sent to neighbor 0.
Definition: amdsmi.h:1166
@ AMDSMI_EVNT_XGMI_1_NOP_TX
NOPs sent to neighbor 1.
Definition: amdsmi.h:1170
@ AMDSMI_EVNT_XGMI_0_RESPONSE_TX
Outgoing responses to neighbor 0.
Definition: amdsmi.h:1168
@ AMDSMI_EVNT_XGMI_1_BEATS_TX
Data beats sent to neighbor 1; Each beat represents 32 bytes.
Definition: amdsmi.h:1173
@ AMDSMI_EVNT_XGMI_DATA_OUT_4
Outbound beats to neighbor 4.
Definition: amdsmi.h:1180
@ AMDSMI_EVNT_XGMI_DATA_OUT_1
Outbound beats to neighbor 1.
Definition: amdsmi.h:1177
@ AMDSMI_EVNT_XGMI_DATA_OUT_2
Outbound beats to neighbor 2.
Definition: amdsmi.h:1178
@ AMDSMI_EVNT_XGMI_1_REQUEST_TX
Outgoing requests to neighbor 1.
Definition: amdsmi.h:1171
@ AMDSMI_EVNT_XGMI_DATA_OUT_5
Outbound beats to neighbor 5.
Definition: amdsmi.h:1181
@ AMDSMI_EVNT_XGMI_0_REQUEST_TX
Outgoing requests to neighbor 0.
Definition: amdsmi.h:1167
@ AMDSMI_EVNT_XGMI_1_RESPONSE_TX
Outgoing responses to neighbor 1.
Definition: amdsmi.h:1172
uint64_t device_id
The device id of a GPU.
Definition: amdsmi.h:821
uint32_t num_links
number of links
Definition: amdsmi.h:939
uint64_t deferred_count
Accumulated deferred errors.
Definition: amdsmi.h:1995
uint64_t lower_bound
Lower bound of range.
Definition: amdsmi.h:598
uint64_t pcie_l0_to_recov_count_acc
PCIE L0 to recovery state transition accumulated count.
Definition: amdsmi.h:1843
uint16_t pcie_link_width
Link width (number of lanes) /speed (0.1 GT/s)
Definition: amdsmi.h:1803
uint32_t gfx_activity
In %.
Definition: amdsmi.h:1031
uint8_t active_vr_thrm
Voltage regulator violation; 1 = active 0 = not active; Max uint8 means unsupported.
Definition: amdsmi.h:652
uint32_t minor
Minor version.
Definition: amdsmi.h:1637
uint16_t pcie_width
current PCIe width
Definition: amdsmi.h:724
uint32_t utilized_bw
DDR bandwidth utilization in GB/s.
Definition: amdsmi.h:2062
uint64_t value
Use uint64_t to make it universal.
Definition: amdsmi.h:1959
uint64_t per_ppt_pwr
PVIOL; Package Power Tracking (PPT) violation % (greater than 0% is a violation); Max uint64 means un...
Definition: amdsmi.h:644
amdsmi_range_t current_freq_range
In MHz.
Definition: amdsmi.h:665
uint16_t average_gfxclk_frequency
Average clocks (MHz)
Definition: amdsmi.h:1777
@ AMDSMI_MEM_PAGE_STATUS_UNRESERVABLE
Unable to reserve this page.
Definition: amdsmi.h:1491
@ AMDSMI_MEM_PAGE_STATUS_RESERVED
Reserved. This gpu page is reserved and not available for use.
Definition: amdsmi.h:1488
@ AMDSMI_MEM_PAGE_STATUS_PENDING
Definition: amdsmi.h:1489
uint32_t oam_id
0xFFFF if not supported
Definition: amdsmi.h:824
uint64_t read
total data received for each link in KB
Definition: amdsmi.h:945
uint32_t max_num_cu_shared
Indicates how many Compute Units share this cache instance.
Definition: amdsmi.h:789
uint64_t acc_vr_thrm
Current accumulated voltage regulator count; Max uint64 means unsupported.
Definition: amdsmi.h:640
uint32_t num_of_compute_units
0xFFFFFFFF if not supported
Definition: amdsmi.h:825
@ AMDSMI_DEV_PERF_LEVEL_STABLE_STD
Stable power state with profiling clocks.
Definition: amdsmi.h:1103
@ AMDSMI_DEV_PERF_LEVEL_STABLE_PEAK
Stable power state with peak clocks.
Definition: amdsmi.h:1104
@ AMDSMI_DEV_PERF_LEVEL_AUTO
Performance level is "auto".
Definition: amdsmi.h:1097
@ AMDSMI_DEV_PERF_LEVEL_STABLE_MIN_SCLK
Stable power state with minimum system clock.
Definition: amdsmi.h:1106
@ AMDSMI_DEV_PERF_LEVEL_STABLE_MIN_MCLK
Stable power state with minimum memory clock.
Definition: amdsmi.h:1105
@ AMDSMI_DEV_PERF_LEVEL_DETERMINISM
Performance determinism state.
Definition: amdsmi.h:1107
@ AMDSMI_DEV_PERF_LEVEL_LOW
Keep PowerPlay levels "low", regardless of workload.
Definition: amdsmi.h:1099
@ AMDSMI_DEV_PERF_LEVEL_HIGH
Keep PowerPlay levels "high", regardless of workload.
Definition: amdsmi.h:1100
@ AMDSMI_DEV_PERF_LEVEL_MANUAL
Definition: amdsmi.h:1101
@ AMDSMI_DEV_PERF_LEVEL_UNKNOWN
Unknown performance level.
Definition: amdsmi.h:1109
uint32_t subvendor_id
The subsystem vendor id.
Definition: amdsmi.h:820
uint16_t voltage_soc
In mV.
Definition: amdsmi.h:1821
uint8_t major
SMU fw Major version number.
Definition: amdsmi.h:2051
uint32_t max_pcie_interface_version
maximum PCIe link generation
Definition: amdsmi.h:720
uint32_t pcie_speed
current PCIe speed in MT/s
Definition: amdsmi.h:725
amdsmi_nps_caps_t memory_caps
Possible memory partition capabilities.
Definition: amdsmi.h:885
uint64_t page_address
Start address of page.
Definition: amdsmi.h:1552
uint32_t mem_activity_acc
new in v1
Definition: amdsmi.h:1810
uint32_t pcie_bandwidth
current instantaneous PCIe bandwidth in Mb/s
Definition: amdsmi.h:726
uint16_t xgmi_link_speed
XGMI bus bitrate in GB/s.
Definition: amdsmi.h:1837
uint64_t socket_power
Units in uW {@host}, Host only.
Definition: amdsmi.h:997
uint32_t power_limit
The power limit in W {@linux_bm}, Linux only.
Definition: amdsmi.h:1003
uint32_t max_clk
In MHz.
Definition: amdsmi.h:1015
amdsmi_card_form_factor_t slot_type
card form factor
Definition: amdsmi.h:719
uint16_t voltage_gfx
In mV.
Definition: amdsmi.h:1822
uint64_t vram_max_bandwidth
The VRAM max bandwidth at current memory clock (GB/s)
Definition: amdsmi.h:962
uint32_t current_socket_power
Units in W {@linux_bm}, Linux only.
Definition: amdsmi.h:998
uint64_t per_gfx_clk_below_host_limit
Graphics clock below host limit violation % (greater than 0% is a violation); Max uint64 means unsupp...
Definition: amdsmi.h:648
amdsmi_accelerator_partition_type_t profile_type
SPX, DPX, QPX, CPX and so on.
Definition: amdsmi.h:883
uint32_t utilized_pct
DDR bandwidth utilization in % of theoritical max.
Definition: amdsmi.h:2063
uint64_t socket_thm_residency_acc
Accumulated throttler residencies.
Definition: amdsmi.h:1910
uint32_t average_socket_power
Units in W {@linux_bm}, Linux only.
Definition: amdsmi.h:999
uint8_t max_dpm_level
Max LCLK DPM level[15:8](8 bit data)
Definition: amdsmi.h:2131
uint64_t per_socket_thrm
TVIOL; Socket thermal violation % (greater than 0% is a violation); Max uint64 means unsupported.
Definition: amdsmi.h:645
uint32_t bit_rate
current link speed in Gb/s
Definition: amdsmi.h:942
uint32_t soc_voltage
SOC voltage measurement in mV {@linux_bm} or V {@host}.
Definition: amdsmi.h:1001
amdsmi_link_type_t link_type
type of the link
Definition: amdsmi.h:944
uint64_t per_vr_thrm
Voltage regulator violation % (greater than 0% is a violation); Max uint64 means unsupported.
Definition: amdsmi.h:646
@ AMDSMI_COARSE_GRAIN_MEM_ACTIVITY
Memory Activity.
Definition: amdsmi.h:1516
@ AMDSMI_COARSE_GRAIN_GFX_ACTIVITY
Corse grain activity counters.
Definition: amdsmi.h:1515
@ AMDSMI_FINE_GRAIN_GFX_ACTIVITY
Fine grain activity counters.
Definition: amdsmi.h:1519
@ AMDSMI_COARSE_DECODER_ACTIVITY
Definition: amdsmi.h:1517
@ AMDSMI_MEMORY_PARTITION_NPS8
Definition: amdsmi.h:430
@ AMDSMI_MEMORY_PARTITION_NPS1
Definition: amdsmi.h:422
@ AMDSMI_MEMORY_PARTITION_NPS2
Definition: amdsmi.h:424
@ AMDSMI_MEMORY_PARTITION_NPS4
Definition: amdsmi.h:427
amdsmi_status_t amdsmi_get_cpu_current_io_bandwidth(amdsmi_processor_handle processor_handle, amdsmi_link_id_bw_type_t link, uint32_t *io_bw)
Get current input output bandwidth.
uint32_t major
Major version.
Definition: amdsmi.h:1636
@ AMDSMI_VOLT_LOWEST
Historical minimum voltage.
Definition: amdsmi.h:1309
@ AMDSMI_VOLT_MAX_CRIT
Voltage critical max value.
Definition: amdsmi.h:1307
@ AMDSMI_VOLT_HIGHEST
Historical maximum voltage.
Definition: amdsmi.h:1310
@ AMDSMI_VOLT_MIN
Voltage min value.
Definition: amdsmi.h:1306
@ AMDSMI_VOLT_AVERAGE
Average voltage.
Definition: amdsmi.h:1308
@ AMDSMI_VOLT_CURRENT
Voltage current value.
Definition: amdsmi.h:1301
@ AMDSMI_VOLT_MAX
Voltage max value.
Definition: amdsmi.h:1304
@ AMDSMI_VOLT_MIN_CRIT
Voltage critical min value.
Definition: amdsmi.h:1305
amdsmi_evt_notification_type_t event
Event type.
Definition: amdsmi.h:1245
uint32_t vram_used
In MB.
Definition: amdsmi.h:623
uint32_t nps4_cap
bool 1 = true; 0 = false
Definition: amdsmi.h:852
uint32_t umc_activity
In %.
Definition: amdsmi.h:1032
@ AMDSMI_VOLT_TYPE_INVALID
Invalid type.
Definition: amdsmi.h:1326
@ AMDSMI_VOLT_TYPE_VDDGFX
Vddgfx GPU voltage.
Definition: amdsmi.h:1324
uint8_t unused
reserved fields
Definition: amdsmi.h:2052
@ CLK_LIMIT_MAX
Clock values in MHz.
Definition: amdsmi.h:1393
@ CLK_LIMIT_MIN
Clock values in MHz.
Definition: amdsmi.h:1392
uint8_t minor
SMU fw Minor version number.
Definition: amdsmi.h:2050
uint32_t throttle_status
Throttle status.
Definition: amdsmi.h:1796
uint16_t voltage_mem
In mV.
Definition: amdsmi.h:1823
uint16_t pcie_link_speed
in 0.1 GT/s; v1 mod. (8->16)
Definition: amdsmi.h:1804
uint8_t ref_rate
DDR refresh rate mode[3](1 bit data)
Definition: amdsmi.h:2073
uint64_t time_running
Time that the counter was running in nanoseconds.
Definition: amdsmi.h:1205
uint16_t num_partition
Number of current partition.
Definition: amdsmi.h:1914
uint64_t vram_mem
In MB.
Definition: amdsmi.h:1061
uint64_t pcie_l0_to_recovery_count
total number of times the PCIe link transitioned from L0 to the recovery state
Definition: amdsmi.h:728
uint64_t pcie_bandwidth_acc
PCIE accumulated bandwidth (GB/sec)
Definition: amdsmi.h:1839
uint64_t accumulation_counter
v1.6 additions
Definition: amdsmi.h:1873
uint64_t dpm_cap
dpm power cap Units MHz {@linux_bm} or Hz {@host}
Definition: amdsmi.h:746
uint64_t max_power_cap
maximum power cap Units uW {@linux_bm} or W {@host}
Definition: amdsmi.h:748
amdsmi_range_t curr_sclk_range
The current SCLK frequency range in MHz.
Definition: amdsmi.h:1680
uint32_t max_pcie_speed
maximum PCIe speed in GT/s
Definition: amdsmi.h:717
uint64_t value
Counter value.
Definition: amdsmi.h:1203
@ AMDSMI_STATUS_NOT_INIT
Processor not initialized.
Definition: amdsmi.h:311
@ AMDSMI_STATUS_NON_AMD_CPU
System has different cpu than AMD.
Definition: amdsmi.h:320
@ AMDSMI_STATUS_INVAL
Invalid parameters.
Definition: amdsmi.h:289
@ AMDSMI_STATUS_BUSY
Processor busy.
Definition: amdsmi.h:309
@ AMDSMI_STATUS_UNKNOWN_ERROR
An unknown error occurred.
Definition: amdsmi.h:336
@ AMDSMI_STATUS_DRIVER_NOT_LOADED
Processor driver not loaded.
Definition: amdsmi.h:313
@ AMDSMI_STATUS_FILE_ERROR
Problem accessing a file.
Definition: amdsmi.h:302
@ AMDSMI_STATUS_DRM_ERROR
Error when call libdrm.
Definition: amdsmi.h:294
@ AMDSMI_STATUS_CORRUPTED_EEPROM
EEPROM is corrupted.
Definition: amdsmi.h:332
@ AMDSMI_STATUS_ARG_PTR_NULL
Parsed argument is invalid.
Definition: amdsmi.h:329
@ AMDSMI_STATUS_IO
I/O Error.
Definition: amdsmi.h:300
@ AMDSMI_STATUS_NO_HSMP_DRV
HSMP driver not found.
Definition: amdsmi.h:323
@ AMDSMI_STATUS_HSMP_TIMEOUT
HSMP message timed out.
Definition: amdsmi.h:326
@ AMDSMI_STATUS_NO_DATA
No data was found for a given input.
Definition: amdsmi.h:315
@ AMDSMI_STATUS_RETRY
Retry operation.
Definition: amdsmi.h:297
@ AMDSMI_STATUS_UNEXPECTED_SIZE
An unexpected amount of data was read.
Definition: amdsmi.h:317
@ AMDSMI_STATUS_SETTING_UNAVAILABLE
Setting is not available.
Definition: amdsmi.h:331
@ AMDSMI_STATUS_FILE_NOT_FOUND
file or directory not found
Definition: amdsmi.h:328
@ AMDSMI_STATUS_INTERNAL_EXCEPTION
An internal exception was caught.
Definition: amdsmi.h:304
@ AMDSMI_STATUS_NO_HSMP_SUP
HSMP not supported.
Definition: amdsmi.h:324
@ AMDSMI_STATUS_MAP_ERROR
The internal library error did not map to a status code.
Definition: amdsmi.h:335
@ AMDSMI_STATUS_FAIL_LOAD_SYMBOL
Fail to load symbol.
Definition: amdsmi.h:293
@ AMDSMI_STATUS_INSUFFICIENT_SIZE
Not enough resources were available for the operation.
Definition: amdsmi.h:316
@ AMDSMI_STATUS_INIT_ERROR
An error occurred when initializing internal data structures.
Definition: amdsmi.h:306
@ AMDSMI_STATUS_OUT_OF_RESOURCES
Not enough memory.
Definition: amdsmi.h:303
@ AMDSMI_STATUS_NO_SLOT
No more free slot.
Definition: amdsmi.h:312
@ AMDSMI_STATUS_NO_MSR_DRV
MSR driver not found.
Definition: amdsmi.h:322
@ AMDSMI_STATUS_INTERRUPT
An interrupt occurred during execution of function.
Definition: amdsmi.h:299
@ AMDSMI_STATUS_SUCCESS
Call succeeded.
Definition: amdsmi.h:287
@ AMDSMI_STATUS_NO_ENERGY_DRV
Energy driver not found.
Definition: amdsmi.h:321
@ AMDSMI_STATUS_ADDRESS_FAULT
Bad address.
Definition: amdsmi.h:301
@ AMDSMI_STATUS_MORE_DATA
There is more data than the buffer size the user passed.
Definition: amdsmi.h:333
@ AMDSMI_STATUS_NOT_YET_IMPLEMENTED
Not implemented yet.
Definition: amdsmi.h:291
@ AMDSMI_STATUS_NO_DRV
No Energy and HSMP driver present.
Definition: amdsmi.h:327
@ AMDSMI_STATUS_NO_PERM
Permission Denied.
Definition: amdsmi.h:298
@ AMDSMI_STATUS_NOT_FOUND
Processor Not found.
Definition: amdsmi.h:310
@ AMDSMI_STATUS_FAIL_LOAD_MODULE
Fail to load lib.
Definition: amdsmi.h:292
@ AMDSMI_STATUS_AMDGPU_RESTART_ERR
AMDGPU restart failed.
Definition: amdsmi.h:330
@ AMDSMI_STATUS_NOT_SUPPORTED
Command not supported.
Definition: amdsmi.h:290
@ AMDSMI_STATUS_UNEXPECTED_DATA
The data read or provided to function is not what was expected.
Definition: amdsmi.h:318
@ AMDSMI_STATUS_API_FAILED
API call failed.
Definition: amdsmi.h:295
@ AMDSMI_STATUS_TIMEOUT
Timeout in API call.
Definition: amdsmi.h:296
@ AMDSMI_STATUS_NO_HSMP_MSG_SUP
HSMP message/feature not supported.
Definition: amdsmi.h:325
@ AMDSMI_STATUS_INPUT_OUT_OF_BOUNDS
The provided input is out of allowable or safe range.
Definition: amdsmi.h:305
@ AMDSMI_STATUS_REFCOUNT_OVERFLOW
An internal reference counter exceeded INT32_MAX.
Definition: amdsmi.h:307
uint8_t active_prochot_thrm
Processor hot violation; 1 = active 0 = not active; Max uint8 means unsupported.
Definition: amdsmi.h:649
uint32_t pasid
PASID (Not working in ROCm 6.4+, deprecating in 7.0)
Definition: amdsmi.h:2006
uint64_t voltage
Voltage coordinate (in mV)
Definition: amdsmi.h:1649
uint64_t pcie_nak_sent_count
total number of NAKs issued on the PCIe link by the device
Definition: amdsmi.h:730
uint32_t cache_properties
amdsmi_cache_property_type_t which is a bitmask
Definition: amdsmi.h:786
uint16_t xgmi_link_width
XGMI bus width in GB/s.
Definition: amdsmi.h:1836
uint16_t update_rate
Time since last update[16:8](9 bit data)
Definition: amdsmi.h:2083
uint64_t acc_counter
Current accumulated counter; Max uint64 means unsupported.
Definition: amdsmi.h:636
uint64_t prochot_residency_acc
Accumulated throttler residencies.
Definition: amdsmi.h:1878
const char * build
Full Build version string.
Definition: amdsmi.h:1639
uint64_t pcie_replay_rover_count_acc
PCIE replay rollover accumulated count.
Definition: amdsmi.h:1847
uint64_t default_power_cap
default power cap Units uW {@linux_bm} or W {@host}
Definition: amdsmi.h:745
uint64_t mem
In bytes.
Definition: amdsmi.h:1052
uint32_t year
Last 2 digits of the Year released - To Be Depricated.
Definition: amdsmi.h:1635
@ AMDSMI_TEMP_CRITICAL_HYST
Definition: amdsmi.h:1270
@ AMDSMI_TEMP_CRITICAL
Definition: amdsmi.h:1268
@ AMDSMI_TEMP_OFFSET
Definition: amdsmi.h:1286
@ AMDSMI_TEMP_EMERGENCY
Definition: amdsmi.h:1273
@ AMDSMI_TEMP_LOWEST
Historical minimum temperature.
Definition: amdsmi.h:1288
@ AMDSMI_TEMP_CRIT_MIN
Definition: amdsmi.h:1280
@ AMDSMI_TEMP_SHUTDOWN
Shutdown temperature.
Definition: amdsmi.h:1290
@ AMDSMI_TEMP_EMERGENCY_HYST
Definition: amdsmi.h:1277
@ AMDSMI_TEMP_CURRENT
Temperature current value.
Definition: amdsmi.h:1257
@ AMDSMI_TEMP_MIN
Temperature min value.
Definition: amdsmi.h:1261
@ AMDSMI_TEMP_HIGHEST
Historical maximum temperature.
Definition: amdsmi.h:1289
@ AMDSMI_TEMP_CRIT_MIN_HYST
Definition: amdsmi.h:1283
@ AMDSMI_TEMP_MIN_HYST
Definition: amdsmi.h:1265
@ AMDSMI_TEMP_MAX_HYST
Definition: amdsmi.h:1262
@ AMDSMI_TEMP_MAX
Temperature max value.
Definition: amdsmi.h:1260
amdsmi_range_t sclk_freq_limits
The range possible of SCLK values in MHz.
Definition: amdsmi.h:1682
uint32_t num_partitions_share_resource
If it is greater than 1, then resource is shared.
Definition: amdsmi.h:902
uint16_t power
Dimm power consumption[31:17](15 bits data)
Definition: amdsmi.h:2082
uint64_t pcie_replay_count_acc
PCIE replay accumulated count.
Definition: amdsmi.h:1845
uint32_t release
Patch, build or stepping version.
Definition: amdsmi.h:1638
uint8_t is_iolink_atomics_32bit
1 = true, 0 = false, UINT8_MAX = Not defined
Definition: amdsmi.h:1075
@ AMDSMI_GPU_BLOCK_XGMI_WAFL
XGMI block.
Definition: amdsmi.h:1369
@ AMDSMI_GPU_BLOCK_LAST
The highest bit position for supported blocks.
Definition: amdsmi.h:1382
@ AMDSMI_GPU_BLOCK_GFX
GFX block.
Definition: amdsmi.h:1364
@ AMDSMI_GPU_BLOCK_IH
IH block.
Definition: amdsmi.h:1379
@ AMDSMI_GPU_BLOCK_VCN
VCN block.
Definition: amdsmi.h:1377
@ AMDSMI_GPU_BLOCK_INVALID
Used to indicate an invalid block.
Definition: amdsmi.h:1359
@ AMDSMI_GPU_BLOCK_MP0
MP0 block.
Definition: amdsmi.h:1373
@ AMDSMI_GPU_BLOCK_HDP
HDP block.
Definition: amdsmi.h:1368
@ AMDSMI_GPU_BLOCK_MPIO
MPIO block.
Definition: amdsmi.h:1380
@ AMDSMI_GPU_BLOCK_ATHUB
ATHUB block.
Definition: amdsmi.h:1366
@ AMDSMI_GPU_BLOCK_MP1
MP1 block.
Definition: amdsmi.h:1374
@ AMDSMI_GPU_BLOCK_PCIE_BIF
PCIE_BIF block.
Definition: amdsmi.h:1367
@ AMDSMI_GPU_BLOCK_SDMA
SDMA block.
Definition: amdsmi.h:1363
@ AMDSMI_GPU_BLOCK_JPEG
JPEG block.
Definition: amdsmi.h:1378
@ AMDSMI_GPU_BLOCK_UMC
UMC block.
Definition: amdsmi.h:1362
@ AMDSMI_GPU_BLOCK_FUSE
Fuse block.
Definition: amdsmi.h:1375
@ AMDSMI_GPU_BLOCK_DF
DF block.
Definition: amdsmi.h:1370
@ AMDSMI_GPU_BLOCK_MMHUB
MMHUB block.
Definition: amdsmi.h:1365
@ AMDSMI_GPU_BLOCK_SMN
SMN block.
Definition: amdsmi.h:1371
@ AMDSMI_GPU_BLOCK_SEM
SEM block.
Definition: amdsmi.h:1372
@ AMDSMI_GPU_BLOCK_MCA
MCA block.
Definition: amdsmi.h:1376
amdsmi_od_volt_curve_t curve
The current voltage curve.
Definition: amdsmi.h:1684
uint32_t num_resources
length of index_of_resources_profile
Definition: amdsmi.h:887
uint16_t current_gfxclk
Current clocks (MHz)
Definition: amdsmi.h:1788
uint32_t nps2_cap
bool 1 = true; 0 = false
Definition: amdsmi.h:851
uint8_t is_iolink_bi_directional
1 = true, 0 = false, UINT8_MAX = Not defined
Definition: amdsmi.h:1078
uint32_t mem_voltage
MEM voltage measurement in mV {@linux_bm} or V {@host}.
Definition: amdsmi.h:1002
uint64_t reference_timestamp
Represents CPU timestamp in microseconds (uS)
Definition: amdsmi.h:634
uint8_t active_ppt_pwr
Package Power Tracking (PPT) violation; 1 = active 0 = not active; Max uint8 means unsupported.
Definition: amdsmi.h:650
uint64_t pcie_replay_roll_over_count
total number of replay rollovers issued on the PCIe link
Definition: amdsmi.h:729
uint64_t min_power_cap
minimum power cap Units uW {@linux_bm} or W {@host}
Definition: amdsmi.h:747
uint64_t cpu_mem
In MB.
Definition: amdsmi.h:1060
uint8_t is_iolink_coherent
1 = true, 0 = false, UINT8_MAX = Not defined
Definition: amdsmi.h:1074
uint32_t num_profiles
The length of profiles array.
Definition: amdsmi.h:912
@ AMDSMI_CNTR_CMD_STOP
Definition: amdsmi.h:1193
@ AMDSMI_CNTR_CMD_START
Start the counter.
Definition: amdsmi.h:1192
@ AMDSMI_XGMI_LINK_UP
The XGMI Link is up.
Definition: amdsmi.h:1935
@ AMDSMI_XGMI_LINK_DOWN
The XGMI Link is down.
Definition: amdsmi.h:1934
@ AMDSMI_XGMI_LINK_DISABLE
The XGMI Link is disabled.
Definition: amdsmi.h:1936
@ AMDSMI_PWR_PROF_PRST_COMPUTE_MASK
Compute Saving Profile.
Definition: amdsmi.h:1341
@ AMDSMI_PWR_PROF_PRST_POWER_SAVING_MASK
Power Saving Profile.
Definition: amdsmi.h:1340
@ AMDSMI_PWR_PROF_PRST_VIDEO_MASK
Video Power Profile.
Definition: amdsmi.h:1339
@ AMDSMI_PWR_PROF_PRST_BOOTUP_DEFAULT
Default Boot Up Profile.
Definition: amdsmi.h:1346
@ AMDSMI_PWR_PROF_PRST_LAST
Invalid power profile.
Definition: amdsmi.h:1347
@ AMDSMI_PWR_PROF_PRST_CUSTOM_MASK
Custom Power Profile.
Definition: amdsmi.h:1338
@ AMDSMI_PWR_PROF_PRST_VR_MASK
VR Power Profile.
Definition: amdsmi.h:1342
uint16_t average_gfx_activity
Average Utilization (in %)
Definition: amdsmi.h:1761
amdsmi_frequencies_t transfer_rate
Transfer rates (T/s) that are possible.
Definition: amdsmi.h:1625
uint64_t acc_socket_thrm
TVIOL; Current accumulated Socket thermal count; Max uint64 means unsupported.
Definition: amdsmi.h:639
uint8_t is_iolink_dma
1 = true, 0 = false, UINT8_MAX = Not defined
Definition: amdsmi.h:1077
uint32_t mm_activity
In %.
Definition: amdsmi.h:1033
uint32_t pcie_lc_perf_other_end_recovery_count
PCIe other end recovery counter.
Definition: amdsmi.h:732
uint64_t violation_timestamp
Violation time. Units in nanoseconds (ns) {@linux_bm}, in milliseconds (ms) {@host}.
Definition: amdsmi.h:635
amdsmi_range_t volt_range
The voltage range for this VDDC Curve point.
Definition: amdsmi.h:1661
uint64_t acc_prochot_thrm
Current accumulated processor hot violation count; Max uint64 means unsupported.
Definition: amdsmi.h:637
uint64_t vram_usage
VRAM usage in MB.
Definition: amdsmi.h:2007
amdsmi_status_t amdsmi_get_cpu_current_xgmi_bw(amdsmi_processor_handle processor_handle, amdsmi_link_id_bw_type_t link, uint32_t *xgmi_bw)
Get current input output bandwidth.
uint32_t gfx_voltage
GFX voltage measurement in mV {@linux_bm} or V {@host}.
Definition: amdsmi.h:1000
@ AMDSMI_COMPUTE_PARTITION_QPX
work together with shared memory
Definition: amdsmi.h:409
@ AMDSMI_COMPUTE_PARTITION_TPX
Definition: amdsmi.h:407
@ AMDSMI_COMPUTE_PARTITION_CPX
Definition: amdsmi.h:411
@ AMDSMI_COMPUTE_PARTITION_SPX
Definition: amdsmi.h:403
@ AMDSMI_COMPUTE_PARTITION_DPX
Definition: amdsmi.h:405
uint32_t ecc_correction_schema_flag
ecc_correction_schema mask
Definition: amdsmi.h:1984
uint32_t pcie_nak_sent_count_acc
PCIE NAK sent accumulated count.
Definition: amdsmi.h:1867
uint32_t total_links
The total links in the status array.
Definition: amdsmi.h:1945
uint32_t nps1_cap
bool 1 = true; 0 = false
Definition: amdsmi.h:850
uint32_t minor
Minor version number.
Definition: amdsmi.h:254
uint64_t upper_bound
Upper bound of range.
Definition: amdsmi.h:599
uint32_t max_bandwidth
max bandwidth of the link in Gb/s
Definition: amdsmi.h:943
uint64_t energy_accumulator
v1 mod. (32->64)
Definition: amdsmi.h:1769
uint32_t pcie_interface_version
PCIe interface version.
Definition: amdsmi.h:718
uint64_t gtt_mem
In MB.
Definition: amdsmi.h:1059
uint32_t pcie_nak_rcvd_count_acc
PCIE NAK received accumulated count.
Definition: amdsmi.h:1868
uint64_t pcie_bandwidth_inst
PCIE instantaneous bandwidth (GB/sec)
Definition: amdsmi.h:1841
amdsmi_status_t amdsmi_get_xgmi_plpd(amdsmi_processor_handle processor_handle, amdsmi_dpm_policy_t *xgmi_plpd)
Get the xgmi per-link power down policy parameter for the processor.
amdsmi_status_t amdsmi_set_xgmi_plpd(amdsmi_processor_handle processor_handle, uint32_t policy_id)
Set the xgmi per-link power down policy parameter for the processor.
amdsmi_status_t amdsmi_clean_gpu_local_data(amdsmi_processor_handle processor_handle)
Run the cleaner shader to clean up data in LDS/GPRs.
amdsmi_status_t amdsmi_set_gpu_perf_level(amdsmi_processor_handle processor_handle, amdsmi_dev_perf_level_t perf_lvl)
Set the PowerPlay performance level associated with the device with provided processor handle with th...
amdsmi_status_t amdsmi_get_soc_pstate(amdsmi_processor_handle processor_handle, amdsmi_dpm_policy_t *policy)
Get the soc pstate policy for the processor.
amdsmi_status_t amdsmi_set_gpu_overdrive_level(amdsmi_processor_handle processor_handle, uint32_t od)
Set the overdrive percent associated with the device with provided processor handle with the provided...
amdsmi_status_t amdsmi_set_gpu_process_isolation(amdsmi_processor_handle processor_handle, uint32_t pisolate)
Enable/disable the system Process Isolation.
amdsmi_status_t amdsmi_set_soc_pstate(amdsmi_processor_handle processor_handle, uint32_t policy_id)
Set the soc pstate policy for the processor.
amdsmi_status_t amdsmi_get_gpu_process_isolation(amdsmi_processor_handle processor_handle, uint32_t *pisolate)
Get the status of the Process Isolation.
amdsmi_status_t amdsmi_set_clk_freq(amdsmi_processor_handle processor_handle, amdsmi_clk_type_t clk_type, uint64_t freq_bitmask)
Control the set of allowed frequencies that can be used for the specified clock. It is not supported ...
amdsmi_status_t amdsmi_get_gpu_metrics_info(amdsmi_processor_handle processor_handle, amdsmi_gpu_metrics_t *pgpu_metrics)
This function retrieves the gpu metrics information. It is not supported on virtual machine guest.
amdsmi_status_t amdsmi_get_gpu_power_profile_presets(amdsmi_processor_handle processor_handle, uint32_t sensor_ind, amdsmi_power_profile_status_t *status)
Get the list of available preset power profiles and an indication of which profile is currently activ...
amdsmi_status_t amdsmi_get_gpu_busy_percent(amdsmi_processor_handle processor_handle, uint32_t *gpu_busy_percent)
Get GPU busy percent from gpu_busy_percent sysfs file.
amdsmi_status_t amdsmi_set_gpu_clk_limit(amdsmi_processor_handle processor_handle, amdsmi_clk_type_t clk_type, amdsmi_clk_limit_type_t limit_type, uint64_t clk_value)
This function sets the clock sets the clock min/max level.
amdsmi_status_t amdsmi_get_gpu_pm_metrics_info(amdsmi_processor_handle processor_handle, amdsmi_name_value_t **pm_metrics, uint32_t *num_of_metrics)
Get the pm metrics table with provided device index.
amdsmi_status_t amdsmi_get_utilization_count(amdsmi_processor_handle processor_handle, amdsmi_utilization_counter_t utilization_counters[], uint32_t count, uint64_t *timestamp)
Get coarse grain utilization counter of the specified device.
amdsmi_status_t amdsmi_get_gpu_metrics_header_info(amdsmi_processor_handle processor_handle, amd_metrics_table_header_t *header_value)
Get the 'metrics_header_info' from the GPU metrics associated with the device.
amdsmi_status_t amdsmi_reset_gpu(amdsmi_processor_handle processor_handle)
Reset the gpu associated with the device with provided processor handle. It is not supported on virtu...
amdsmi_status_t amdsmi_set_gpu_od_volt_info(amdsmi_processor_handle processor_handle, uint32_t vpoint, uint64_t clkvalue, uint64_t voltvalue)
This function sets 1 of the 3 voltage curve points. It is not supported on virtual machine guest.
amdsmi_status_t amdsmi_set_gpu_clk_range(amdsmi_processor_handle processor_handle, uint64_t minclkvalue, uint64_t maxclkvalue, amdsmi_clk_type_t clkType)
This function sets the clock range information. It is not supported on virtual machine guest.
amdsmi_status_t amdsmi_get_gpu_mem_overdrive_level(amdsmi_processor_handle processor_handle, uint32_t *od)
Get the GPU memory clock overdrive percent associated with the device with provided processor handle....
amdsmi_status_t amdsmi_get_clk_freq(amdsmi_processor_handle processor_handle, amdsmi_clk_type_t clk_type, amdsmi_frequencies_t *f)
Get the list of possible system clock speeds of device for a specified clock type....
void amdsmi_free_name_value_pairs(void *p)
Frees heap memory allocated by reg_table and pm_metrics.
amdsmi_status_t amdsmi_get_gpu_perf_level(amdsmi_processor_handle processor_handle, amdsmi_dev_perf_level_t *perf)
Get the performance level of the device. It is not supported on virtual machine guest.
amdsmi_status_t amdsmi_set_gpu_perf_determinism_mode(amdsmi_processor_handle processor_handle, uint64_t clkvalue)
Enter performance determinism mode with provided processor handle. It is not supported on virtual mac...
amdsmi_status_t amdsmi_get_gpu_od_volt_info(amdsmi_processor_handle processor_handle, amdsmi_od_volt_freq_data_t *odv)
This function retrieves the overdrive GFX & MCLK information. If valid for the GPU it will also popul...
amdsmi_status_t amdsmi_get_gpu_od_volt_curve_regions(amdsmi_processor_handle processor_handle, uint32_t *num_regions, amdsmi_freq_volt_region_t *buffer)
This function will retrieve the current valid regions in the frequency/voltage space....
amdsmi_status_t amdsmi_get_gpu_reg_table_info(amdsmi_processor_handle processor_handle, amdsmi_reg_type_t reg_type, amdsmi_name_value_t **reg_metrics, uint32_t *num_of_metrics)
Get the register metrics table with provided device index and register type.
amdsmi_status_t amdsmi_get_gpu_overdrive_level(amdsmi_processor_handle processor_handle, uint32_t *od)
Get the overdrive percent associated with the device with provided processor handle....
amdsmi_status_t amdsmi_set_gpu_od_clk_info(amdsmi_processor_handle processor_handle, amdsmi_freq_ind_t level, uint64_t clkvalue, amdsmi_clk_type_t clkType)
This function sets the clock frequency information. It is not supported on virtual machine guest.
amdsmi_status_t amdsmi_set_gpu_compute_partition(amdsmi_processor_handle processor_handle, amdsmi_compute_partition_type_t compute_partition)
Modifies a selected device's compute partition setting.
amdsmi_status_t amdsmi_get_gpu_compute_partition(amdsmi_processor_handle processor_handle, char *compute_partition, uint32_t len)
Retrieves the current compute partitioning for a desired device.
amdsmi_status_t amdsmi_get_cpu_ddr_bw(amdsmi_processor_handle processor_handle, amdsmi_ddr_bw_metrics_t *ddr_bw)
Get the DDR bandwidth data.
amdsmi_status_t amdsmi_get_cpu_dimm_power_consumption(amdsmi_processor_handle processor_handle, uint8_t dimm_addr, amdsmi_dimm_power_t *dimm_pow)
Get DIMM power consumption.
amdsmi_status_t amdsmi_get_cpu_dimm_temp_range_and_refresh_rate(amdsmi_processor_handle processor_handle, uint8_t dimm_addr, amdsmi_temp_range_refresh_rate_t *rate)
Get DIMM temperature range and refresh rate.
amdsmi_status_t amdsmi_get_cpu_dimm_thermal_sensor(amdsmi_processor_handle processor_handle, uint8_t dimm_addr, amdsmi_dimm_thermal_t *dimm_temp)
Get DIMM thermal sensor value.
amdsmi_status_t amdsmi_get_gpu_total_ecc_count(amdsmi_processor_handle processor_handle, amdsmi_error_count_t *ec)
Returns the total number of ECC errors (correctable, uncorrectable and deferred) in the given GPU....
amdsmi_status_t amdsmi_get_gpu_ecc_count(amdsmi_processor_handle processor_handle, amdsmi_gpu_block_t block, amdsmi_error_count_t *ec)
Retrieve the error counts for a GPU block. It is not supported on virtual machine guest.
amdsmi_status_t amdsmi_get_gpu_ecc_enabled(amdsmi_processor_handle processor_handle, uint64_t *enabled_blocks)
Retrieve the enabled ECC bit-mask. It is not supported on virtual machine guest.
amdsmi_status_t amdsmi_get_gpu_cper_entries(amdsmi_processor_handle processor_handle, uint32_t severity_mask, char *cper_data, uint64_t *buf_size, amdsmi_cper_hdr_t **cper_hdrs, uint64_t *entry_count, uint64_t *cursor)
Retrieve CPER entries cached in the driver.
amdsmi_status_t amdsmi_get_cpu_socket_energy(amdsmi_processor_handle processor_handle, uint64_t *penergy)
Get the socket energy for a given socket.
amdsmi_status_t amdsmi_get_cpu_core_energy(amdsmi_processor_handle processor_handle, uint64_t *penergy)
Get the core energy for a given core.
amdsmi_status_t amdsmi_status_code_to_string(amdsmi_status_t status, const char **status_string)
Get a description of a provided AMDSMI error status.
amdsmi_status_t amdsmi_get_gpu_ecc_status(amdsmi_processor_handle processor_handle, amdsmi_gpu_block_t block, amdsmi_ras_err_state_t *state)
Retrieve the ECC status for a GPU block. It is not supported on virtual machine guest.
amdsmi_status_t amdsmi_set_gpu_event_notification_mask(amdsmi_processor_handle processor_handle, uint64_t mask)
Specify which events to collect for a device.
amdsmi_status_t amdsmi_stop_gpu_event_notification(amdsmi_processor_handle processor_handle)
Close any file handles and free any resources used by event notification for a GPU.
amdsmi_status_t amdsmi_init_gpu_event_notification(amdsmi_processor_handle processor_handle)
Prepare to collect event notifications for a GPU.
amdsmi_status_t amdsmi_get_gpu_event_notification(int timeout_ms, uint32_t *num_elem, amdsmi_evt_notification_data_t *data)
Collect event notifications, waiting a specified amount of time.
amdsmi_status_t amdsmi_get_gpu_vbios_info(amdsmi_processor_handle processor_handle, amdsmi_vbios_info_t *info)
Returns the static information for the vBIOS on the device.
amdsmi_status_t amdsmi_get_fw_info(amdsmi_processor_handle processor_handle, amdsmi_fw_info_t *info)
Returns the firmware versions running on the device.
amdsmi_status_t amdsmi_set_cpu_gmi3_link_width_range(amdsmi_processor_handle processor_handle, uint8_t min_link_width, uint8_t max_link_width)
Set gmi3 link width range.
amdsmi_status_t amdsmi_get_power_info(amdsmi_processor_handle processor_handle, amdsmi_power_info_t *info)
Returns the current power and voltage of the GPU.
amdsmi_status_t amdsmi_get_gpu_vram_usage(amdsmi_processor_handle processor_handle, amdsmi_vram_usage_t *info)
Returns the VRAM usage (both total and used memory) in MegaBytes.
amdsmi_status_t amdsmi_get_gpu_activity(amdsmi_processor_handle processor_handle, amdsmi_engine_usage_t *info)
Returns the current usage of the GPU engines (GFX, MM and MEM). Each usage is reported as a percentag...
amdsmi_status_t amdsmi_get_clock_info(amdsmi_processor_handle processor_handle, amdsmi_clk_type_t clk_type, amdsmi_clk_info_t *info)
Returns the measurements of the clocks in the GPU for the GFX and multimedia engines and Memory....
amdsmi_status_t amdsmi_get_violation_status(amdsmi_processor_handle processor_handle, amdsmi_violation_status_t *info)
Returns the violations for a processor.
amdsmi_status_t amdsmi_is_gpu_power_management_enabled(amdsmi_processor_handle processor_handle, bool *enabled)
Returns is power management enabled.
amdsmi_status_t amdsmi_get_power_info_v2(amdsmi_processor_handle processor_handle, uint32_t sensor_ind, amdsmi_power_info_t *info)
Returns the current power and voltage of the GPU.
amdsmi_status_t amdsmi_get_hsmp_metrics_table(amdsmi_processor_handle processor_handle, amdsmi_hsmp_metrics_table_t *metrics_table)
Get HSMP metrics table.
amdsmi_status_t amdsmi_get_hsmp_metrics_table_version(amdsmi_processor_handle processor_handle, uint32_t *metrics_version)
Get HSMP metrics table version.
amdsmi_status_t amdsmi_get_cpu_fclk_mclk(amdsmi_processor_handle processor_handle, uint32_t *fclk, uint32_t *mclk)
Get Data fabric clock and Memory clock in MHz.
amdsmi_status_t amdsmi_get_cpu_prochot_status(amdsmi_processor_handle processor_handle, uint32_t *prochot)
Get normalized status of the processor's PROCHOT status.
amdsmi_status_t amdsmi_get_cpu_hsmp_driver_version(amdsmi_processor_handle processor_handle, amdsmi_hsmp_driver_version_t *amdsmi_hsmp_driver_ver)
Get HSMP Driver Version.
amdsmi_status_t amdsmi_get_cpu_hsmp_proto_ver(amdsmi_processor_handle processor_handle, uint32_t *proto_ver)
Get HSMP protocol Version.
amdsmi_status_t amdsmi_get_cpu_smu_fw_version(amdsmi_processor_handle processor_handle, amdsmi_smu_fw_version_t *amdsmi_smu_fw)
Get SMU Firmware Version.
amdsmi_status_t amdsmi_get_cpu_socket_current_active_freq_limit(amdsmi_processor_handle processor_handle, uint16_t *freq, char **src_type)
Get current active frequency limit of the socket.
amdsmi_status_t amdsmi_get_cpu_core_current_freq_limit(amdsmi_processor_handle processor_handle, uint32_t *freq)
Get socket frequency limit of the core.
amdsmi_status_t amdsmi_get_threads_per_core(uint32_t *threads_per_core)
Get Number of threads Per Core.
amdsmi_status_t amdsmi_get_cpu_socket_freq_range(amdsmi_processor_handle processor_handle, uint16_t *fmax, uint16_t *fmin)
Get socket frequency range.
amdsmi_status_t amdsmi_get_cpu_cclk_limit(amdsmi_processor_handle processor_handle, uint32_t *cclk)
Get core clock in MHz.
amdsmi_status_t amdsmi_topo_get_numa_node_number(amdsmi_processor_handle processor_handle, uint32_t *numa_node)
Retrieve the NUMA CPU node number for a device.
amdsmi_status_t amdsmi_topo_get_link_type(amdsmi_processor_handle processor_handle_src, amdsmi_processor_handle processor_handle_dst, uint64_t *hops, amdsmi_io_link_type_t *type)
Retrieve the hops and the connection type between 2 GPUs.
amdsmi_status_t amdsmi_topo_get_p2p_status(amdsmi_processor_handle processor_handle_src, amdsmi_processor_handle processor_handle_dst, amdsmi_io_link_type_t *type, amdsmi_p2p_capability_t *cap)
Retrieve connection type and P2P capabilities between 2 GPUs.
amdsmi_status_t amdsmi_get_minmax_bandwidth_between_processors(amdsmi_processor_handle processor_handle_src, amdsmi_processor_handle processor_handle_dst, uint64_t *min_bandwidth, uint64_t *max_bandwidth)
Retreive minimal and maximal io link bandwidth between 2 GPUs.
amdsmi_status_t amdsmi_is_P2P_accessible(amdsmi_processor_handle processor_handle_src, amdsmi_processor_handle processor_handle_dst, bool *accessible)
Return P2P availability status between 2 GPUs.
amdsmi_status_t amdsmi_get_link_metrics(amdsmi_processor_handle processor_handle, amdsmi_link_metrics_t *link_metrics)
Return link metric information.
amdsmi_status_t amdsmi_topo_get_link_weight(amdsmi_processor_handle processor_handle_src, amdsmi_processor_handle processor_handle_dst, uint64_t *weight)
Retrieve the weight for a connection between 2 GPUs.
amdsmi_status_t amdsmi_get_link_topology_nearest(amdsmi_processor_handle processor_handle, amdsmi_link_type_t link_type, amdsmi_topology_nearest_t *topology_nearest_info)
Retrieve the set of GPUs that are nearest to a given device at a specific interconnectivity level.
amdsmi_status_t amdsmi_get_gpu_subsystem_name(amdsmi_processor_handle processor_handle, char *name, size_t len)
Get the name string for the device subsytem.
amdsmi_status_t amdsmi_get_gpu_virtualization_mode(amdsmi_processor_handle processor_handle, amdsmi_virtualization_mode_t *mode)
Returns the virtualization mode for the target device.
amdsmi_status_t amdsmi_get_gpu_revision(amdsmi_processor_handle processor_handle, uint16_t *revision)
Get the device revision associated with the device.
amdsmi_status_t amdsmi_get_gpu_vendor_name(amdsmi_processor_handle processor_handle, char *name, size_t len)
Get the name string for a give vendor ID.
amdsmi_status_t amdsmi_get_gpu_id(amdsmi_processor_handle processor_handle, uint16_t *id)
Get the device id associated with the device with provided device handler.
amdsmi_status_t amdsmi_get_gpu_vram_vendor(amdsmi_processor_handle processor_handle, char *brand, uint32_t len)
Get the vram vendor string of a device.
amdsmi_status_t amdsmi_get_gpu_subsystem_id(amdsmi_processor_handle processor_handle, uint16_t *id)
Get the subsystem device id associated with the device with provided processor handle.
amdsmi_status_t amdsmi_shut_down(void)
Shutdown the AMD SMI library.
amdsmi_status_t amdsmi_init(uint64_t init_flags)
Initialize the AMD SMI library.
amdsmi_status_t amdsmi_get_gpu_memory_partition_config(amdsmi_processor_handle processor_handle, amdsmi_memory_partition_config_t *config)
Version 2.0: Returns current gpu memory partition capabilities.
amdsmi_status_t amdsmi_set_gpu_memory_partition_mode(amdsmi_processor_handle processor_handle, amdsmi_memory_partition_type_t mode)
Version 2.0: Set accelerator partition setting based on profile_index from amdsmi_get_gpu_accelerator...
amdsmi_status_t amdsmi_get_gpu_memory_partition(amdsmi_processor_handle processor_handle, char *memory_partition, uint32_t len)
Retrieves the current memory partition for a desired device.
amdsmi_status_t amdsmi_set_gpu_memory_partition(amdsmi_processor_handle processor_handle, amdsmi_memory_partition_type_t memory_partition)
Modifies a selected device's current memory partition setting.
amdsmi_status_t amdsmi_get_gpu_bad_page_threshold(amdsmi_processor_handle processor_handle, uint32_t *threshold)
Get the bad pages threshold of a processor. It is not supported on virtual machine guest.
amdsmi_status_t amdsmi_get_gpu_memory_total(amdsmi_processor_handle processor_handle, amdsmi_memory_type_t mem_type, uint64_t *total)
Get the total amount of memory that exists.
amdsmi_status_t amdsmi_get_gpu_ras_block_features_enabled(amdsmi_processor_handle processor_handle, amdsmi_gpu_block_t block, amdsmi_ras_err_state_t *state)
Returns if RAS features are enabled or disabled for given block. It is not supported on virtual machi...
amdsmi_status_t amdsmi_get_gpu_bad_page_info(amdsmi_processor_handle processor_handle, uint32_t *num_pages, amdsmi_retired_page_record_t *info)
Get the bad pages of a processor. It is not supported on virtual machine guest.
amdsmi_status_t amdsmi_get_gpu_memory_reserved_pages(amdsmi_processor_handle processor_handle, uint32_t *num_pages, amdsmi_retired_page_record_t *records)
Get information about reserved ("retired") memory pages. It is not supported on virtual machine guest...
amdsmi_status_t amdsmi_get_gpu_memory_usage(amdsmi_processor_handle processor_handle, amdsmi_memory_type_t mem_type, uint64_t *used)
Get the current memory usage.
amdsmi_status_t amdsmi_gpu_validate_ras_eeprom(amdsmi_processor_handle processor_handle)
Verify the checksum of RAS EEPROM. It is not supported on virtual machine guest.
amdsmi_status_t amdsmi_get_gpu_ras_feature_info(amdsmi_processor_handle processor_handle, amdsmi_ras_feature_t *ras_feature)
Returns RAS features info.
amdsmi_status_t amdsmi_set_gpu_pci_bandwidth(amdsmi_processor_handle processor_handle, uint64_t bw_bitmask)
Control the set of allowed PCIe bandwidths that can be used. It is not supported on virtual machine g...
amdsmi_status_t amdsmi_get_gpu_topo_numa_affinity(amdsmi_processor_handle processor_handle, int32_t *numa_node)
Get the NUMA node associated with a device.
amdsmi_status_t amdsmi_get_gpu_pci_throughput(amdsmi_processor_handle processor_handle, uint64_t *sent, uint64_t *received, uint64_t *max_pkt_sz)
Get PCIe traffic information. It is not supported on virtual machine guest.
amdsmi_status_t amdsmi_get_gpu_pci_bandwidth(amdsmi_processor_handle processor_handle, amdsmi_pcie_bandwidth_t *bandwidth)
Get the list of possible PCIe bandwidths that are available. It is not supported on virtual machine g...
amdsmi_status_t amdsmi_get_gpu_pci_replay_counter(amdsmi_processor_handle processor_handle, uint64_t *counter)
Get PCIe replay counter.
amdsmi_status_t amdsmi_get_gpu_bdf_id(amdsmi_processor_handle processor_handle, uint64_t *bdfid)
Get the unique PCI device identifier associated for a device.
amdsmi_status_t amdsmi_set_cpu_core_boostlimit(amdsmi_processor_handle processor_handle, uint32_t boostlimit)
Set the core boostlimit value.
amdsmi_status_t amdsmi_get_cpu_socket_c0_residency(amdsmi_processor_handle processor_handle, uint32_t *pc0_residency)
Get the socket c0 residency.
amdsmi_status_t amdsmi_set_cpu_socket_boostlimit(amdsmi_processor_handle processor_handle, uint32_t boostlimit)
Set the socket boostlimit value.
amdsmi_status_t amdsmi_get_cpu_core_boostlimit(amdsmi_processor_handle processor_handle, uint32_t *pboostlimit)
Get the core boost limit.
amdsmi_status_t amdsmi_get_gpu_available_counters(amdsmi_processor_handle processor_handle, amdsmi_event_group_t grp, uint32_t *available)
Get the number of currently available counters. It is not supported on virtual machine guest.
amdsmi_status_t amdsmi_gpu_read_counter(amdsmi_event_handle_t evt_handle, amdsmi_counter_value_t *value)
Read the current value of a performance counter.
amdsmi_status_t amdsmi_gpu_control_counter(amdsmi_event_handle_t evt_handle, amdsmi_counter_command_t cmd, void *cmd_args)
Issue performance counter control commands. It is not supported on virtual machine guest.
amdsmi_status_t amdsmi_gpu_counter_group_supported(amdsmi_processor_handle processor_handle, amdsmi_event_group_t group)
Tell if an event group is supported by a given device. It is not supported on virtual machine guest.
amdsmi_status_t amdsmi_gpu_destroy_counter(amdsmi_event_handle_t evnt_handle)
Deallocate a performance counter object.
amdsmi_status_t amdsmi_gpu_create_counter(amdsmi_processor_handle processor_handle, amdsmi_event_type_t type, amdsmi_event_handle_t *evnt_handle)
Create a performance counter object.
amdsmi_status_t amdsmi_set_gpu_fan_speed(amdsmi_processor_handle processor_handle, uint32_t sensor_ind, uint64_t speed)
Set the fan speed for the specified device with the provided speed, in RPMs. It is not supported on v...
amdsmi_status_t amdsmi_reset_gpu_fan(amdsmi_processor_handle processor_handle, uint32_t sensor_ind)
Reset the fan to automatic driver control. It is not supported on virtual machine guest.
amdsmi_status_t amdsmi_get_temp_metric(amdsmi_processor_handle processor_handle, amdsmi_temperature_type_t sensor_type, amdsmi_temperature_metric_t metric, int64_t *temperature)
Get the temperature metric value for the specified metric, from the specified temperature sensor on t...
amdsmi_status_t amdsmi_get_gpu_fan_speed(amdsmi_processor_handle processor_handle, uint32_t sensor_ind, int64_t *speed)
Get the fan speed for the specified device as a value relative to AMDSMI_MAX_FAN_SPEED....
amdsmi_status_t amdsmi_get_gpu_fan_speed_max(amdsmi_processor_handle processor_handle, uint32_t sensor_ind, uint64_t *max_speed)
Get the max. fan speed of the device with provided processor handle. It is not supported on virtual m...
amdsmi_status_t amdsmi_get_gpu_cache_info(amdsmi_processor_handle processor_handle, amdsmi_gpu_cache_info_t *info)
Returns gpu cache info.
amdsmi_status_t amdsmi_get_gpu_fan_rpms(amdsmi_processor_handle processor_handle, uint32_t sensor_ind, int64_t *speed)
Get the fan speed in RPMs of the device with the specified processor handle and 0-based sensor index....
amdsmi_status_t amdsmi_get_gpu_volt_metric(amdsmi_processor_handle processor_handle, amdsmi_voltage_type_t sensor_type, amdsmi_voltage_metric_t metric, int64_t *voltage)
Get the voltage metric value for the specified metric, from the specified voltage sensor on the speci...
amdsmi_status_t amdsmi_get_cpu_socket_power_cap_max(amdsmi_processor_handle processor_handle, uint32_t *pmax)
Get the maximum power cap value for a given socket.
amdsmi_status_t amdsmi_set_gpu_power_profile(amdsmi_processor_handle processor_handle, uint32_t reserved, amdsmi_power_profile_preset_masks_t profile)
Set the power performance profile. It is not supported on virtual machine guest.
amdsmi_status_t amdsmi_set_cpu_socket_power_cap(amdsmi_processor_handle processor_handle, uint32_t pcap)
Set the power cap value for a given socket.
amdsmi_status_t amdsmi_set_power_cap(amdsmi_processor_handle processor_handle, uint32_t sensor_ind, uint64_t cap)
Set the maximum gpu power cap value. It is not supported on virtual machine guest.
amdsmi_status_t amdsmi_get_cpu_socket_power(amdsmi_processor_handle processor_handle, uint32_t *ppower)
Get the socket power.
amdsmi_status_t amdsmi_get_cpu_socket_power_cap(amdsmi_processor_handle processor_handle, uint32_t *pcap)
Get the socket power cap.
amdsmi_status_t amdsmi_get_cpu_pwr_svi_telemetry_all_rails(amdsmi_processor_handle processor_handle, uint32_t *power)
Get the SVI based power telemetry for all rails.
amdsmi_status_t amdsmi_set_cpu_pwr_efficiency_mode(amdsmi_processor_handle processor_handle, uint8_t mode)
Set the power efficiency profile policy.
amdsmi_status_t amdsmi_get_energy_count(amdsmi_processor_handle processor_handle, uint64_t *energy_accumulator, float *counter_resolution, uint64_t *timestamp)
Get the energy accumulator counter of the processor with provided processor handle....
amdsmi_status_t amdsmi_get_processor_info(amdsmi_processor_handle processor_handle, size_t len, char *name)
Get information about the given processor.
amdsmi_status_t amdsmi_get_processor_handles(amdsmi_socket_handle socket_handle, uint32_t *processor_count, amdsmi_processor_handle *processor_handles)
Get the list of the processor handles associated to a socket.
amdsmi_status_t amdsmi_get_gpu_device_uuid(amdsmi_processor_handle processor_handle, unsigned int *uuid_length, char *uuid)
Returns the UUID of the device.
amdsmi_status_t amdsmi_get_processor_type(amdsmi_processor_handle processor_handle, processor_type_t *processor_type)
Get the processor type of the processor_handle.
amdsmi_status_t amdsmi_get_socket_info(amdsmi_socket_handle socket_handle, size_t len, char *name)
Get information about the given socket.
amdsmi_status_t amdsmi_get_cpu_handles(uint32_t *cpu_count, amdsmi_processor_handle *processor_handles)
Get the list of cpu handles in the system.
amdsmi_status_t amdsmi_get_cpucore_handles(uint32_t *cores_count, amdsmi_processor_handle *processor_handles)
Get the list of the cpu core handles in a system.
amdsmi_status_t amdsmi_get_gpu_enumeration_info(amdsmi_processor_handle processor_handle, amdsmi_enumeration_info_t *info)
Returns the Enumeration information for the device.
amdsmi_status_t amdsmi_get_socket_handles(uint32_t *socket_count, amdsmi_socket_handle *socket_handles)
Get the list of socket handles in the system.
amdsmi_status_t amdsmi_get_processor_handle_from_bdf(amdsmi_bdf_t bdf, amdsmi_processor_handle *processor_handle)
Get processor handle with the matching bdf.
amdsmi_status_t amdsmi_get_processor_handles_by_type(amdsmi_socket_handle socket_handle, processor_type_t processor_type, amdsmi_processor_handle *processor_handles, uint32_t *processor_count)
Get processor list as per processor type.
amdsmi_status_t amdsmi_get_gpu_device_bdf(amdsmi_processor_handle processor_handle, amdsmi_bdf_t *bdf)
Returns BDF of the given device.
amdsmi_status_t amdsmi_get_processor_count_from_handles(amdsmi_processor_handle *processor_handles, uint32_t *processor_count, uint32_t *nr_cpusockets, uint32_t *nr_cpucores, uint32_t *nr_gpus)
Get respective processor counts from the processor handles.
amdsmi_status_t amdsmi_get_gpu_process_list(amdsmi_processor_handle processor_handle, uint32_t *max_processes, amdsmi_proc_info_t *list)
Returns the list of process information running on a given GPU. If pdh.dll is not present on the syst...
amdsmi_status_t amdsmi_cpu_apb_disable(amdsmi_processor_handle processor_handle, uint8_t pstate)
Disable APB.
amdsmi_status_t amdsmi_set_cpu_socket_lclk_dpm_level(amdsmi_processor_handle processor_handle, uint8_t nbio_id, uint8_t min, uint8_t max)
Set NBIO lclk dpm level value.
amdsmi_status_t amdsmi_set_cpu_pcie_link_rate(amdsmi_processor_handle processor_handle, uint8_t rate_ctrl, uint8_t *prev_mode)
Set pcie link rate.
amdsmi_status_t amdsmi_get_cpu_socket_lclk_dpm_level(amdsmi_processor_handle processor_handle, uint8_t nbio_id, amdsmi_dpm_level_t *nbio)
Get NBIO LCLK dpm level.
amdsmi_status_t amdsmi_set_cpu_df_pstate_range(amdsmi_processor_handle processor_handle, uint8_t max_pstate, uint8_t min_pstate)
Set df pstate range.
amdsmi_status_t amdsmi_cpu_apb_enable(amdsmi_processor_handle processor_handle)
Enable APB.
amdsmi_status_t amdsmi_get_gpu_driver_info(amdsmi_processor_handle processor_handle, amdsmi_driver_info_t *info)
Returns the driver version information.
amdsmi_status_t amdsmi_get_gpu_compute_process_info(amdsmi_process_info_t *procs, uint32_t *num_items)
Get process information about processes currently using GPU.
amdsmi_status_t amdsmi_get_gpu_compute_process_info_by_pid(uint32_t pid, amdsmi_process_info_t *proc)
Get process information about a specific process.
amdsmi_status_t amdsmi_get_gpu_compute_process_gpus(uint32_t pid, uint32_t *dv_indices, uint32_t *num_devices)
Get the device indices currently being used by a process.
amdsmi_status_t amdsmi_get_cpu_socket_temperature(amdsmi_processor_handle processor_handle, uint32_t *ptmon)
Get socket temperature.
amdsmi_status_t amdsmi_get_lib_version(amdsmi_version_t *version)
Get the build version information for the currently running build of AMDSMI.
amdsmi_status_t amdsmi_set_cpu_xgmi_width(amdsmi_processor_handle processor_handle, uint8_t min, uint8_t max)
Set xgmi width.
amdsmi_status_t amdsmi_get_gpu_xgmi_link_status(amdsmi_processor_handle processor_handle, amdsmi_xgmi_link_status_t *link_status)
Get the XGMI link status.
amdsmi_status_t amdsmi_gpu_xgmi_error_status(amdsmi_processor_handle processor_handle, amdsmi_xgmi_status_t *status)
Retrieve the XGMI error status for a device. It is not supported on virtual machine guest.
amdsmi_status_t amdsmi_reset_gpu_xgmi_error(amdsmi_processor_handle processor_handle)
Reset the XGMI error status for a device. It is not supported on virtual machine guest.
amdsmi_status_t amdsmi_get_xgmi_info(amdsmi_processor_handle processor_handle, amdsmi_xgmi_info_t *info)
Returns XGMI information for the GPU.
Structure holds the gpu metrics table header for a device.
Definition: amdsmi.h:1695
Accelerator Partition Profile Configurations.
Definition: amdsmi.h:911
Accelerator Partition Resource Profile.
Definition: amdsmi.h:882
Accelerator Partition Resources. This struct is used to identify various partition resource profiles.
Definition: amdsmi.h:898
ASIC Information.
Definition: amdsmi.h:816
Board Information.
Definition: amdsmi.h:982
Clock Information.
Definition: amdsmi.h:1012
Counter value.
Definition: amdsmi.h:1202
Definition: amdsmi.h:4644
Definition: amdsmi.h:4669
Definition: amdsmi.h:4648
Definition: amdsmi.h:4660
DDR bandwidth metrics.
Definition: amdsmi.h:2060
DIMM Power(mW), power update rate(ms) and dimm address.
Definition: amdsmi.h:2081
DIMM temperature(°C) and update rate(ms) and dimm address.
Definition: amdsmi.h:2092
max and min LCLK DPM level on a given NBIO ID. Valid max and min DPM level values are 0 - 1.
Definition: amdsmi.h:2130
The dpm policy.
Definition: amdsmi.h:1595
DPM Policy.
Definition: amdsmi.h:1609
Driver Information.
Definition: amdsmi.h:971
Engine Usage amdsmi_engine_usage_t: This structure holds common GPU activity values seen in both BM o...
Definition: amdsmi.h:1030
Structure holds enumeration information.
Definition: amdsmi.h:689
This structure holds error counts.
Definition: amdsmi.h:1992
Event notification data returned from event notification API.
Definition: amdsmi.h:1243
This structure holds 2 amdsmi_range_t's, one for frequency and one for voltage. These 2 ranges indica...
Definition: amdsmi.h:1659
This structure holds information about clock frequencies.
Definition: amdsmi.h:1582
Frequency Range.
Definition: amdsmi.h:663
Definition: amdsmi.h:803
Firmware Information.
Definition: amdsmi.h:801
Definition: amdsmi.h:785
GPU Cache Information.
Definition: amdsmi.h:783
Structure holds the gpu metrics values for a device.
Definition: amdsmi.h:1743
The following structures hold the gpu statistics for a device.
Definition: amdsmi.h:1710
This structure holds HSMP Driver version information.
Definition: amdsmi.h:252
Structure holds kfd information.
Definition: amdsmi.h:836
Memory Partition Configuration. This structure is used to identify various memory partition configura...
Definition: amdsmi.h:865
This structure holds the name value pairs.
Definition: amdsmi.h:1957
Definition: amdsmi.h:849
This structure represents a point on the frequency-voltage plane.
Definition: amdsmi.h:1647
OD Vold Curve AMDSMI_NUM_VOLTAGE_CURVE_POINTS number of amdsmi_od_vddc_point_t's.
Definition: amdsmi.h:1670
This structure holds the frequency-voltage values for a device.
Definition: amdsmi.h:1679
IO Link P2P Capability.
Definition: amdsmi.h:1073
This structure holds information about the possible PCIe bandwidths. Specifically,...
Definition: amdsmi.h:1624
Definition: amdsmi.h:723
Definition: amdsmi.h:715
pcie information
Definition: amdsmi.h:714
Power Cap Information.
Definition: amdsmi.h:743
Power Information.
Definition: amdsmi.h:996
This structure contains information about which power profiles are supported by the system for a give...
Definition: amdsmi.h:1571
Definition: amdsmi.h:1053
Definition: amdsmi.h:1058
Process Information.
Definition: amdsmi.h:1049
This structure contains information specific to a process.
Definition: amdsmi.h:2004
This structure represents a range (e.g., frequencies or voltages).
Definition: amdsmi.h:597
This structure holds ras feature.
Definition: amdsmi.h:1980
Reserved Memory Page Record.
Definition: amdsmi.h:1551
This structure holds SMU Firmware version information.
Definition: amdsmi.h:2048
temperature range and refresh rate metrics of a DIMM
Definition: amdsmi.h:2071
Topology Nearest.
Definition: amdsmi.h:2017
The utilization counter data.
Definition: amdsmi.h:1539
VBios Information.
Definition: amdsmi.h:757
This structure holds version information.
Definition: amdsmi.h:1634
This structure hold violation status information. Note: for MI3x asics and higher,...
Definition: amdsmi.h:633
VRam Information.
Definition: amdsmi.h:957
VRam Usage.
Definition: amdsmi.h:621
XGMI Information.
Definition: amdsmi.h:608
bdf types
Definition: amdsmi.h:674
Definition: amdsmi.h:4659
This union holds memory partition bitmask.
Definition: amdsmi.h:848