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  * =============================================================================
3  * The University of Illinois/NCSA
4  * Open Source License (NCSA)
5  *
6  * Copyright (c) 2022, Advanced Micro Devices, Inc.
7  * All rights reserved.
8  *
9  * Developed by:
10  *
11  * AMD Research and AMD ROC Software Development
12  *
13  * Advanced Micro Devices, Inc.
14  *
15  * www.amd.com
16  *
17  * Permission is hereby granted, free of charge, to any person obtaining a copy
18  * of this software and associated documentation files (the "Software"), to
19  * deal with the Software without restriction, including without limitation
20  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
21  * and/or sell copies of the Software, and to permit persons to whom the
22  * Software is furnished to do so, subject to the following conditions:
23  *
24  * - Redistributions of source code must retain the above copyright notice,
25  * this list of conditions and the following disclaimers.
26  * - Redistributions in binary form must reproduce the above copyright
27  * notice, this list of conditions and the following disclaimers in
28  * the documentation and/or other materials provided with the distribution.
29  * - Neither the names of <Name of Development Group, Name of Institution>,
30  * nor the names of its contributors may be used to endorse or promote
31  * products derived from this Software without specific prior written
32  * permission.
33  *
34  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
35  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
36  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
37  * THE CONTRIBUTORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
38  * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
39  * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
40  * DEALINGS WITH THE SOFTWARE.
41  *
42  */
43 #ifndef INCLUDE_AMDSMI_H_
44 #define INCLUDE_AMDSMI_H_
45 
51 #include <stdlib.h>
52 #include <stdbool.h>
53 #ifdef __cplusplus
54 extern "C" {
55 #include <cstdint>
56 #else
57 #include <stdint.h>
58 #endif // __cplusplus
59 
65 typedef enum {
66  AMDSMI_INIT_ALL_PROCESSORS = 0x0, // Default option
67  AMDSMI_INIT_AMD_CPUS = (1 << 0),
68  AMDSMI_INIT_AMD_GPUS = (1 << 1),
69  AMDSMI_INIT_NON_AMD_CPUS = (1 << 2),
70  AMDSMI_INIT_NON_AMD_GPUS = (1 << 3)
72 
73 /* Maximum size definitions AMDSMI */
74 #define AMDSMI_MAX_MM_IP_COUNT 8
75 #define AMDSMI_MAX_DATE_LENGTH 32
76 #define AMDSMI_MAX_STRING_LENGTH 64
77 #define AMDSMI_NORMAL_STRING_LENGTH 32
78 #define AMDSMI_MAX_DEVICES 32
79 #define AMDSMI_MAX_NAME 32
80 #define AMDSMI_MAX_DRIVER_VERSION_LENGTH 80
81 #define AMDSMI_PRODUCT_NAME_LENGTH 128
82 #define AMDSMI_MAX_CONTAINER_TYPE 2
83 
84 #define AMDSMI_GPU_UUID_SIZE 38
85 
86 /* string format */
87 #define AMDSMI_TIME_FORMAT "%02d:%02d:%02d.%03d"
88 #define AMDSMI_DATE_FORMAT "%04d-%02d-%02d:%02d:%02d:%02d.%03d"
89 
95 #define AMDSMI_LIB_VERSION_YEAR 23
96 
98 #define AMDSMI_LIB_VERSION_MAJOR 2
99 
101 #define AMDSMI_LIB_VERSION_MINOR 0
102 
104 #define AMDSMI_LIB_VERSION_RELEASE 1
105 
106 #define AMDSMI_LIB_VERSION_CREATE_STRING(YEAR, MAJOR, MINOR, RELEASE) (#YEAR "." #MAJOR "." #MINOR "." #RELEASE)
107 #define AMDSMI_LIB_VERSION_EXPAND_PARTS(YEAR_STR, MAJOR_STR, MINOR_STR, RELEASE_STR) AMDSMI_LIB_VERSION_CREATE_STRING(YEAR_STR, MAJOR_STR, MINOR_STR, RELEASE_STR)
108 #define AMDSMI_LIB_VERSION_STRING AMDSMI_LIB_VERSION_EXPAND_PARTS(AMDSMI_LIB_VERSION_YEAR, AMDSMI_LIB_VERSION_MAJOR, AMDSMI_LIB_VERSION_MINOR, AMDSMI_LIB_VERSION_RELEASE)
109 
110 typedef enum {
111  AMDSMI_MM_UVD,
112  AMDSMI_MM_VCE,
113  AMDSMI_MM_VCN,
114  AMDSMI_MM__MAX
115 } amdsmi_mm_ip_t;
116 
117 typedef enum {
118  CONTAINER_LXC,
119  CONTAINER_DOCKER,
120 } amdsmi_container_types_t;
121 
124 typedef void *amdsmi_socket_handle;
125 
129 typedef enum {
130  UNKNOWN = 0,
131  AMD_GPU,
132  AMD_CPU,
133  NON_AMD_GPU,
134  NON_AMD_CPU
136 
140 // Please avoid status codes that are multiples of 256 (256, 512, etc..)
141 // Return values in the shell get modulo 256 applied, meaning any multiple of 256 ends up as 0
142 typedef enum {
144  // Library usage errors
164  // Device related errors
169  // Data and size errors
174  // General errors
175  AMDSMI_STATUS_MAP_ERROR = 0xFFFFFFFE,
178 
182 typedef enum {
183  CLK_TYPE_SYS = 0x0,
184  CLK_TYPE_FIRST = CLK_TYPE_SYS,
185  CLK_TYPE_GFX = CLK_TYPE_SYS,
186  CLK_TYPE_DF,
189  CLK_TYPE_SOC,
190  CLK_TYPE_MEM,
191  CLK_TYPE_PCIE,
192  CLK_TYPE_VCLK0,
193  CLK_TYPE_VCLK1,
194  CLK_TYPE_DCLK0,
195  CLK_TYPE_DCLK1,
196  CLK_TYPE__MAX = CLK_TYPE_DCLK1
198 
203 typedef enum {
204  TEMPERATURE_TYPE_EDGE,
205  TEMPERATURE_TYPE_FIRST = TEMPERATURE_TYPE_EDGE,
206  TEMPERATURE_TYPE_JUNCTION,
207  TEMPERATURE_TYPE_VRAM,
208  TEMPERATURE_TYPE_HBM_0,
209  TEMPERATURE_TYPE_HBM_1,
210  TEMPERATURE_TYPE_HBM_2,
211  TEMPERATURE_TYPE_HBM_3,
212  TEMPERATURE_TYPE_PLX,
213  TEMPERATURE_TYPE__MAX = TEMPERATURE_TYPE_PLX
215 
220 typedef enum {
221  FW_ID_SMU = 1,
222  FW_ID_FIRST = FW_ID_SMU,
223  FW_ID_CP_CE,
224  FW_ID_CP_PFP,
225  FW_ID_CP_ME,
226  FW_ID_CP_MEC_JT1,
227  FW_ID_CP_MEC_JT2,
228  FW_ID_CP_MEC1,
229  FW_ID_CP_MEC2,
230  FW_ID_RLC,
231  FW_ID_SDMA0,
232  FW_ID_SDMA1,
233  FW_ID_SDMA2,
234  FW_ID_SDMA3,
235  FW_ID_SDMA4,
236  FW_ID_SDMA5,
237  FW_ID_SDMA6,
238  FW_ID_SDMA7,
239  FW_ID_VCN,
240  FW_ID_UVD,
241  FW_ID_VCE,
242  FW_ID_ISP,
243  FW_ID_DMCU_ERAM, /*eRAM*/
244  FW_ID_DMCU_ISR, /*ISR*/
245  FW_ID_RLC_RESTORE_LIST_GPM_MEM,
246  FW_ID_RLC_RESTORE_LIST_SRM_MEM,
247  FW_ID_RLC_RESTORE_LIST_CNTL,
248  FW_ID_RLC_V,
249  FW_ID_MMSCH,
250  FW_ID_PSP_SYSDRV,
251  FW_ID_PSP_SOSDRV,
252  FW_ID_PSP_TOC,
253  FW_ID_PSP_KEYDB,
254  FW_ID_DFC,
255  FW_ID_PSP_SPL,
256  FW_ID_DRV_CAP,
257  FW_ID_MC,
258  FW_ID_PSP_BL,
259  FW_ID_CP_PM4,
260  FW_ID_RLC_P,
261  FW_ID_SEC_POLICY_STAGE2,
262  FW_ID_REG_ACCESS_WHITELIST,
263  FW_ID_IMU_DRAM,
264  FW_ID_IMU_IRAM,
265  FW_ID_SDMA_TH0,
266  FW_ID_SDMA_TH1,
267  FW_ID_CP_MES,
268  FW_ID_MES_STACK,
269  FW_ID_MES_THREAD1,
270  FW_ID_MES_THREAD1_STACK,
271  FW_ID_RLX6,
272  FW_ID_RLX6_DRAM_BOOT,
273  FW_ID_RS64_ME,
274  FW_ID_RS64_ME_P0_DATA,
275  FW_ID_RS64_ME_P1_DATA,
276  FW_ID_RS64_PFP,
277  FW_ID_RS64_PFP_P0_DATA,
278  FW_ID_RS64_PFP_P1_DATA,
279  FW_ID_RS64_MEC,
280  FW_ID_RS64_MEC_P0_DATA,
281  FW_ID_RS64_MEC_P1_DATA,
282  FW_ID_RS64_MEC_P2_DATA,
283  FW_ID_RS64_MEC_P3_DATA,
284  FW_ID_PPTABLE,
285  FW_ID_PSP_SOC,
286  FW_ID_PSP_DBG,
287  FW_ID_PSP_INTF,
288  FW_ID_RLX6_CORE1,
289  FW_ID_RLX6_DRAM_BOOT_CORE1,
290  FW_ID_RLCV_LX7,
291  FW_ID_RLC_SAVE_RESTORE_LIST,
292  FW_ID_ASD,
293  FW_ID_TA_RAS,
294  FW_ID_XGMI,
295  FW_ID_RLC_SRLG,
296  FW_ID_RLC_SRLS,
297  FW_ID_SMC,
298  FW_ID_DMCU,
299  FW_ID__MAX
301 
305 typedef struct {
306  uint64_t lower_bound;
307  uint64_t upper_bound;
308  uint64_t reserved[2];
310 
311 typedef struct {
312  uint8_t xgmi_lanes;
313  uint64_t xgmi_hive_id;
314  uint64_t xgmi_node_id;
315  uint32_t index;
316  uint32_t reserved[9];
318 
319 typedef struct {
320  uint32_t vram_total;
321  uint32_t vram_used;
322  uint32_t reserved[2];
324 
325 typedef struct {
326  amdsmi_range_t supported_freq_range;
327  amdsmi_range_t current_freq_range;
328  uint32_t reserved[8];
330 
331 typedef union {
332  struct {
333  uint64_t function_number : 3;
334  uint64_t device_number : 5;
335  uint64_t bus_number : 8;
336  uint64_t domain_number : 48;
337  };
338  uint64_t as_uint;
339 } amdsmi_bdf_t;
340 
341 typedef struct {
342  uint64_t power_cap;
343  uint64_t default_power_cap;
344  uint64_t dpm_cap;
345  uint64_t min_power_cap;
346  uint64_t max_power_cap;
347  uint64_t reserved[3];
349 
350 typedef struct {
351  char name[AMDSMI_MAX_STRING_LENGTH];
352  char build_date[AMDSMI_MAX_DATE_LENGTH];
353  char part_number[AMDSMI_MAX_STRING_LENGTH];
354  char version[AMDSMI_NORMAL_STRING_LENGTH];
355  uint32_t reserved[16];
357 
358 typedef struct {
359  uint8_t num_fw_info;
360  struct {
361  amdsmi_fw_block_t fw_id;
362  uint64_t fw_version;
363  uint64_t reserved[2];
364  } fw_info_list[FW_ID__MAX];
365  uint32_t reserved[7];
367 
368 typedef struct {
369  char market_name[AMDSMI_MAX_STRING_LENGTH];
370  uint32_t vendor_id; //< Use 32 bit to be compatible with other platform.
371  uint32_t subvendor_id; //< The subsystem vendor id
372  uint64_t device_id; //< The unique id of a GPU
373  uint32_t rev_id;
374  char asic_serial[AMDSMI_NORMAL_STRING_LENGTH];
375  uint32_t reserved[3];
377 
378 typedef struct {
379  uint64_t serial_number;
380  bool is_master;
381  char model_number[AMDSMI_NORMAL_STRING_LENGTH];
382  char product_serial[AMDSMI_NORMAL_STRING_LENGTH];
383  char fru_id[AMDSMI_NORMAL_STRING_LENGTH];
384  char product_name[AMDSMI_PRODUCT_NAME_LENGTH];
385  char manufacturer_name[AMDSMI_NORMAL_STRING_LENGTH];
387 
388 typedef struct {
389  uint32_t average_socket_power;
390  uint32_t gfx_voltage; // GFX voltage measurement in mV
391  uint32_t soc_voltage; // SOC voltage measurement in mV
392  uint32_t mem_voltage; // MEM voltage measurement in mV
393  uint32_t power_limit; // The power limit;
394  uint32_t reserved[11];
396 
397 typedef struct {
398  uint32_t cur_clk;
399  uint32_t min_clk;
400  uint32_t max_clk;
401  uint32_t reserved[5];
403 
404 typedef struct {
405  uint32_t gfx_activity;
406  uint32_t umc_activity;
407  uint32_t mm_activity;
408  uint32_t reserved[13];
410 
411 typedef uint32_t amdsmi_process_handle_t;
412 
413 typedef struct {
414  char name[AMDSMI_NORMAL_STRING_LENGTH];
415  amdsmi_process_handle_t pid;
416  uint64_t mem;
417  struct {
418  uint64_t gfx;
419  uint64_t enc;
420  uint32_t reserved[12];
421  } engine_usage;
422  struct {
423  uint64_t gtt_mem;
424  uint64_t cpu_mem;
425  uint64_t vram_mem;
426  uint32_t reserved[10];
427  } memory_usage;
428  char container_name[AMDSMI_NORMAL_STRING_LENGTH];
429  uint32_t reserved[4];
431 
433 #define AMDSMI_MAX_NUM_FREQUENCIES 32
434 
437 #define AMDSMI_MAX_FAN_SPEED 255
438 
440 #define AMDSMI_NUM_VOLTAGE_CURVE_POINTS 3
444 typedef enum {
446  AMDSMI_DEV_PERF_LEVEL_FIRST = AMDSMI_DEV_PERF_LEVEL_AUTO,
447 
462 
463  AMDSMI_DEV_PERF_LEVEL_LAST = AMDSMI_DEV_PERF_LEVEL_DETERMINISM,
464 
467 
480 typedef uintptr_t amdsmi_event_handle_t;
481 
488 typedef enum {
491  AMDSMI_EVNT_GRP_INVALID = 0xFFFFFFFF
493 
500 typedef enum {
501  AMDSMI_EVNT_FIRST = AMDSMI_EVNT_GRP_XGMI,
502 
503  AMDSMI_EVNT_XGMI_FIRST = AMDSMI_EVNT_GRP_XGMI,
504  AMDSMI_EVNT_XGMI_0_NOP_TX = AMDSMI_EVNT_XGMI_FIRST,
509 
522  // ie, Throughput = BEATS/time_running 10^9 bytes/sec
532 
533  AMDSMI_EVNT_XGMI_LAST = AMDSMI_EVNT_XGMI_1_BEATS_TX, // 5
534 
535  AMDSMI_EVNT_XGMI_DATA_OUT_FIRST = AMDSMI_EVNT_GRP_XGMI_DATA_OUT, // 10
536 
537  /*
538  * @brief Events in the AMDSMI_EVNT_GRP_XGMI_DATA_OUT group measure
539  * the number of beats sent on an XGMI link. Each beat represents
540  * 32 bytes. AMDSMI_EVNT_XGMI_DATA_OUT_n represents the number of
541  * outbound beats (each representing 32 bytes) on link n.<br><br>
542  *
543  * XGMI throughput can be calculated by multiplying a event
544  * such as ::AMDSMI_EVNT_XGMI_DATA_OUT_n by 32 and dividing by
545  * the time for which event collection occurred,
546  * ::amdsmi_counter_value_t.time_running (which is in nanoseconds). To get
547  * bytes per second, multiply this value by 10<sup>9</sup>.<br>
548  * <br>
549  * Throughput = BEATS/time_running * 10<sup>9</sup> (bytes/second)<br>
550  */
551  // ie, Throughput = BEATS/time_running 10^9 bytes/sec
552  AMDSMI_EVNT_XGMI_DATA_OUT_0 = AMDSMI_EVNT_XGMI_DATA_OUT_FIRST,
558  AMDSMI_EVNT_XGMI_DATA_OUT_LAST = AMDSMI_EVNT_XGMI_DATA_OUT_5,
559 
560  AMDSMI_EVNT_LAST = AMDSMI_EVNT_XGMI_DATA_OUT_LAST,
562 
566 typedef enum {
571 
575 typedef struct {
576  uint64_t value;
577  uint64_t time_enabled;
579  uint64_t time_running;
582 
586 typedef enum {
588  AMDSMI_EVT_NOTIF_FIRST = AMDSMI_EVT_NOTIF_VMFAULT,
589  AMDSMI_EVT_NOTIF_THERMAL_THROTTLE = 2,
590  AMDSMI_EVT_NOTIF_GPU_PRE_RESET = 3,
591  AMDSMI_EVT_NOTIF_GPU_POST_RESET = 4,
592 
593  AMDSMI_EVT_NOTIF_LAST = AMDSMI_EVT_NOTIF_GPU_POST_RESET
595 
599 #define AMDSMI_EVENT_MASK_FROM_INDEX(i) (1ULL << ((i) - 1))
600 
602 #define MAX_EVENT_NOTIFICATION_MSG_SIZE 64
603 
607 typedef struct {
612 
618 typedef enum {
620  AMDSMI_TEMP_FIRST = AMDSMI_TEMP_CURRENT,
621 
652 
653  AMDSMI_TEMP_LAST = AMDSMI_TEMP_HIGHEST
655 
661 typedef enum {
663 
664  AMDSMI_VOLT_FIRST = AMDSMI_VOLT_CURRENT,
672 
673  AMDSMI_VOLT_LAST = AMDSMI_VOLT_HIGHEST
675 
680 typedef enum {
681  AMDSMI_VOLT_TYPE_FIRST = 0,
682 
683  AMDSMI_VOLT_TYPE_VDDGFX = AMDSMI_VOLT_TYPE_FIRST,
685  AMDSMI_VOLT_TYPE_LAST = AMDSMI_VOLT_TYPE_VDDGFX,
686  AMDSMI_VOLT_TYPE_INVALID = 0xFFFFFFFF
688 
695 typedef enum {
701 
703  AMDSMI_PWR_PROF_PRST_3D_FULL_SCR_MASK = 0x20,
706 
708  AMDSMI_PWR_PROF_PRST_INVALID = 0xFFFFFFFFFFFFFFFF
710 
714 typedef enum {
715  AMDSMI_GPU_BLOCK_INVALID = 0x0000000000000000,
717  AMDSMI_GPU_BLOCK_FIRST = 0x0000000000000001,
718 
719  AMDSMI_GPU_BLOCK_UMC = AMDSMI_GPU_BLOCK_FIRST,
720  AMDSMI_GPU_BLOCK_SDMA = 0x0000000000000002,
721  AMDSMI_GPU_BLOCK_GFX = 0x0000000000000004,
722  AMDSMI_GPU_BLOCK_MMHUB = 0x0000000000000008,
723  AMDSMI_GPU_BLOCK_ATHUB = 0x0000000000000010,
724  AMDSMI_GPU_BLOCK_PCIE_BIF = 0x0000000000000020,
725  AMDSMI_GPU_BLOCK_HDP = 0x0000000000000040,
726  AMDSMI_GPU_BLOCK_XGMI_WAFL = 0x0000000000000080,
727  AMDSMI_GPU_BLOCK_DF = 0x0000000000000100,
728  AMDSMI_GPU_BLOCK_SMN = 0x0000000000000200,
729  AMDSMI_GPU_BLOCK_SEM = 0x0000000000000400,
730  AMDSMI_GPU_BLOCK_MP0 = 0x0000000000000800,
731  AMDSMI_GPU_BLOCK_MP1 = 0x0000000000001000,
732  AMDSMI_GPU_BLOCK_FUSE = 0x0000000000002000,
733 
736  AMDSMI_GPU_BLOCK_RESERVED = 0x8000000000000000
738 
742 typedef enum {
751 
752  AMDSMI_RAS_ERR_STATE_LAST = AMDSMI_RAS_ERR_STATE_ENABLED,
753  AMDSMI_RAS_ERR_STATE_INVALID = 0xFFFFFFFF
755 
759 typedef enum {
760  AMDSMI_MEM_TYPE_FIRST = 0,
761 
762  AMDSMI_MEM_TYPE_VRAM = AMDSMI_MEM_TYPE_FIRST,
765 
766  AMDSMI_MEM_TYPE_LAST = AMDSMI_MEM_TYPE_GTT
768 
772 typedef enum {
775  AMDSMI_FREQ_IND_INVALID = 0xFFFFFFFF
777 
781 typedef enum {
782  AMDSMI_XGMI_STATUS_NO_ERRORS = 0,
783  AMDSMI_XGMI_STATUS_ERROR,
784  AMDSMI_XGMI_STATUS_MULTIPLE_ERRORS,
786 
790 typedef uint64_t amdsmi_bit_field_t;
791 
795 typedef enum {
803 
807 typedef enum {
812  AMDSMI_IOLINK_TYPE_SIZE = 0xFFFFFFFF
814 
818 typedef enum {
821  AMDSMI_COARSE_GRAIN_GFX_ACTIVITY = AMDSMI_UTILIZATION_COUNTER_FIRST,
823  AMDSMI_UTILIZATION_COUNTER_LAST = AMDSMI_COARSE_GRAIN_MEM_ACTIVITY
825 
829 typedef struct {
831  uint64_t value;
833 
837 typedef struct {
838  uint64_t page_address;
839  uint64_t page_size;
842 
846 #define AMDSMI_MAX_NUM_POWER_PROFILES (sizeof(amdsmi_bit_field_t) * 8)
847 
853 typedef struct {
858 
863 
867  uint32_t num_profiles;
869 
873 typedef struct {
877  uint32_t num_supported;
878 
882  uint32_t current;
883 
888  uint64_t frequency[AMDSMI_MAX_NUM_FREQUENCIES];
890 
896 typedef struct {
901 
906  uint32_t lanes[AMDSMI_MAX_NUM_FREQUENCIES];
908 
912 typedef struct {
913  uint32_t year;
914  uint32_t major;
915  uint32_t minor;
916  uint32_t release;
917  const char *build;
919 
923 typedef struct {
924  uint64_t frequency;
925  uint64_t voltage;
927 
933 typedef struct {
937 
941 typedef struct {
948 
952 typedef struct {
958 
963  uint32_t num_regions;
965 
973 typedef struct {
974  // TODO(amd) Doxygen documents
976  uint16_t structure_size;
977  uint8_t format_revision;
978  uint8_t content_revision;
981 
985 // Below is the assumed version of gpu_metric data on the device. If the device
986 // is using this version, we can read data directly into amdsmi_gpu_metrics_t.
987 // If the device is using an older format, a conversion of formats will be
988 // required.
989 // DGPU targets have a format version of 1. APU targets have a format version of
990 // 2. Currently, only version 1 (DGPU) gpu_metrics is supported.
991 #define AMDSMI_GPU_METRICS_API_FORMAT_VER 1
992 // The content version increments when gpu_metrics is extended with new and/or
993 // existing field sizes are changed.
994 #define AMDSMI_GPU_METRICS_API_CONTENT_VER_1 1
995 #define AMDSMI_GPU_METRICS_API_CONTENT_VER_2 2
996 #define AMDSMI_GPU_METRICS_API_CONTENT_VER_3 3
997 
998 // This should match NUM_HBM_INSTANCES
999 #define AMDSMI_NUM_HBM_INSTANCES 4
1000 
1001 // Unit conversion factor for HBM temperatures
1002 #define CENTRIGRADE_TO_MILLI_CENTIGRADE 1000
1003 
1004 typedef struct {
1005 // TODO(amd) Doxygen documents
1007  amd_metrics_table_header_t common_header;
1008 
1009 /* Temperature */
1010  uint16_t temperature_edge;
1011  uint16_t temperature_hotspot;
1012  uint16_t temperature_mem;
1013  uint16_t temperature_vrgfx;
1014  uint16_t temperature_vrsoc;
1015  uint16_t temperature_vrmem;
1016 
1017 /* Utilization */
1018  uint16_t average_gfx_activity;
1019  uint16_t average_umc_activity; // memory controller
1020  uint16_t average_mm_activity; // UVD or VCN
1021 
1022 /* Power/Energy */
1023  uint16_t average_socket_power;
1024  uint64_t energy_accumulator; // v1 mod. (32->64)
1025 
1026 /* Driver attached timestamp (in ns) */
1027  uint64_t system_clock_counter; // v1 mod. (moved from top of struct)
1028 
1029 /* Average clocks */
1030  uint16_t average_gfxclk_frequency;
1031  uint16_t average_socclk_frequency;
1032  uint16_t average_uclk_frequency;
1033  uint16_t average_vclk0_frequency;
1034  uint16_t average_dclk0_frequency;
1035  uint16_t average_vclk1_frequency;
1036  uint16_t average_dclk1_frequency;
1037 
1038 /* Current clocks */
1039  uint16_t current_gfxclk;
1040  uint16_t current_socclk;
1041  uint16_t current_uclk;
1042  uint16_t current_vclk0;
1043  uint16_t current_dclk0;
1044  uint16_t current_vclk1;
1045  uint16_t current_dclk1;
1046 
1047 /* Throttle status */
1048  uint32_t throttle_status;
1049 
1050 /* Fans */
1051  uint16_t current_fan_speed;
1052 
1053 /* Link width/speed */
1054  uint16_t pcie_link_width; // v1 mod.(8->16)
1055  uint16_t pcie_link_speed; // in 0.1 GT/s; v1 mod. (8->16)
1056 
1057  uint16_t padding; // new in v1
1058 
1059  uint32_t gfx_activity_acc; // new in v1
1060  uint32_t mem_actvity_acc; // new in v1
1061  uint16_t temperature_hbm[AMDSMI_NUM_HBM_INSTANCES]; // new in v1
1064 
1068 typedef struct {
1071  uint64_t reserved[2];
1073 
1077 typedef struct {
1078  uint16_t pcie_lanes;
1079  uint32_t pcie_speed;
1080  uint32_t pcie_interface_version;
1081  uint32_t reserved[5];
1086 typedef struct {
1087  uint32_t process_id;
1088  uint32_t pasid;
1089  uint64_t vram_usage;
1090  uint64_t sdma_usage;
1091  uint32_t cu_occupancy;
1093 
1096 #define AMDSMI_DEFAULT_VARIANT 0xFFFFFFFFFFFFFFFF
1097 
1098 /*****************************************************************************/
1122 amdsmi_status_t amdsmi_init(uint64_t init_flags);
1123 
1133 
1136 /*****************************************************************************/
1169  amdsmi_socket_handle* socket_handles);
1170 
1186  amdsmi_socket_handle socket_handle,
1187  size_t len, char *name);
1188 
1220 amdsmi_status_t amdsmi_get_processor_handles(amdsmi_socket_handle socket_handle,
1221  uint32_t *processor_count,
1222  amdsmi_processor_handle* processor_handles);
1223 
1239  processor_type_t* processor_type);
1240 
1254 
1257 /*****************************************************************************/
1287 
1320  size_t len);
1321 
1345  uint32_t len);
1346 
1367 
1400 amdsmi_get_gpu_subsystem_name(amdsmi_processor_handle processor_handle, char *name, size_t len);
1401 
1404 /*****************************************************************************/
1429 
1463 
1484 
1508  uint64_t *received, uint64_t *max_pkt_sz);
1509 
1530  uint64_t *counter);
1531 
1534 /*****************************************************************************/
1571 
1574 /*****************************************************************************/
1608 amdsmi_get_energy_count(amdsmi_processor_handle processor_handle, uint64_t *power,
1609  float *counter_resolution, uint64_t *timestamp);
1610 
1613 /*****************************************************************************/
1637  amdsmi_set_power_cap(amdsmi_processor_handle processor_handle, uint32_t sensor_ind, uint64_t cap);
1638 
1657  amdsmi_set_gpu_power_profile(amdsmi_processor_handle processor_handle, uint32_t reserved,
1659 
1662 /*****************************************************************************/
1691  uint64_t *total);
1692 
1715  uint64_t *used);
1716 
1735 
1759  amdsmi_ras_err_state_t *state);
1760 
1794  amdsmi_retired_page_record_t *records);
1795 
1827  int64_t *speed);
1828 
1853  uint32_t sensor_ind, int64_t *speed);
1854 
1878  uint32_t sensor_ind, uint64_t *max_speed);
1879 
1908  amdsmi_temperature_type_t sensor_type,
1909  amdsmi_temperature_metric_t metric, int64_t *temperature);
1910 
1939  amdsmi_voltage_type_t sensor_type,
1940  amdsmi_voltage_metric_t metric, int64_t *voltage);
1941 
1944 /*****************************************************************************/
1963 amdsmi_status_t amdsmi_reset_gpu_fan(amdsmi_processor_handle processor_handle, uint32_t sensor_ind);
1964 
1986  uint32_t sensor_ind, uint64_t speed);
1987 
1990 /*****************************************************************************/
2023  amdsmi_utilization_counter_t utilization_counters[],
2024  uint32_t count,
2025  uint64_t *timestamp);
2026 
2041 
2055 
2076  amdsmi_dev_perf_level_t *perf);
2077 
2098 
2120 
2142 
2154 
2175 
2195  amdsmi_gpu_metrics_t *pgpu_metrics);
2196 
2218  uint64_t maxclkvalue,
2219  amdsmi_clk_type_t clkType);
2220 
2242  uint64_t clkvalue,
2243  amdsmi_clk_type_t clkType);
2244 
2265  uint64_t clkvalue, uint64_t voltvalue);
2266 
2303  uint32_t *num_regions, amdsmi_freq_volt_region_t *buffer);
2304 
2337  amdsmi_get_gpu_power_profile_presets(amdsmi_processor_handle processor_handle, uint32_t sensor_ind,
2339 
2342 /*****************************************************************************/
2368 
2407 
2441  amdsmi_clk_type_t clk_type, uint64_t freq_bitmask);
2442 
2445 /*****************************************************************************/
2465 
2468 /*****************************************************************************/
2499 
2525  uint64_t *enabled_blocks);
2526 
2550  amdsmi_ras_err_state_t *state);
2551 
2566 amdsmi_status_code_to_string(amdsmi_status_t status, const char **status_string);
2567 
2570 /*****************************************************************************/
2689 
2716  amdsmi_event_handle_t *evnt_handle);
2717 
2732 
2752  amdsmi_counter_command_t cmd, void *cmd_args);
2753 
2772  amdsmi_counter_value_t *value);
2773 
2794  amdsmi_event_group_t grp, uint32_t *available);
2795 
2798 /*****************************************************************************/
2834 
2853 
2884 amdsmi_get_gpu_compute_process_gpus(uint32_t pid, uint32_t *dv_indices,
2885  uint32_t *num_devices);
2886 
2889 /*****************************************************************************/
2917 
2932 
2935 /*****************************************************************************/
2957 amdsmi_topo_get_numa_node_number(amdsmi_processor_handle processor_handle, uint32_t *numa_node);
2958 
2979  uint64_t *weight);
2980 
3004  uint64_t *min_bandwidth, uint64_t *max_bandwidth);
3005 
3030  amdsmi_processor_handle processor_handle_dst,
3031  uint64_t *hops, AMDSMI_IO_LINK_TYPE *type);
3032 
3053  bool *accessible);
3054 
3057 /*****************************************************************************/
3079 
3108 
3146  uint32_t *num_elem, amdsmi_evt_notification_data_t *data);
3147 
3163 
3177 
3193 amdsmi_get_gpu_device_uuid(amdsmi_processor_handle processor_handle, unsigned int *uuid_length, char *uuid);
3194 
3195 /*****************************************************************************/
3215 amdsmi_get_gpu_driver_version(amdsmi_processor_handle processor_handle, int *length, char *version);
3216 
3219 /*****************************************************************************/
3240 
3253 
3267 amdsmi_get_power_cap_info(amdsmi_processor_handle processor_handle, uint32_t sensor_ind,
3268  amdsmi_power_cap_info_t *info);
3269 
3283 
3286 /*****************************************************************************/
3302 
3315 
3318 /*****************************************************************************/
3336 
3350 
3368 
3383 
3386 /*****************************************************************************/
3418 amdsmi_get_gpu_process_list(amdsmi_processor_handle processor_handle, uint32_t *max_processes, amdsmi_process_handle_t *list);
3419 
3434 amdsmi_get_gpu_process_info(amdsmi_processor_handle processor_handle, amdsmi_process_handle_t process, amdsmi_proc_info_t *info);
3435 
3438 /*****************************************************************************/
3457 
3460 #ifdef __cplusplus
3461 }
3462 #endif // __cplusplus
3463 #endif // INCLUDE_AMDSMI_H_
#define AMDSMI_MAX_DATE_LENGTH
Definition: amdsmi.h:75
amdsmi_evt_notification_type_t
Definition: amdsmi.h:586
@ AMDSMI_EVT_NOTIF_VMFAULT
VM page fault.
Definition: amdsmi.h:587
amdsmi_freq_ind_t
The values of this enum are used as frequency identifiers.
Definition: amdsmi.h:772
@ AMDSMI_FREQ_IND_INVALID
An invalid frequency index.
Definition: amdsmi.h:775
@ AMDSMI_FREQ_IND_MAX
Index used for the maximum frequency value.
Definition: amdsmi.h:774
@ AMDSMI_FREQ_IND_MIN
Index used for the minimum frequency value.
Definition: amdsmi.h:773
uintptr_t amdsmi_event_handle_t
Available clock types.
Definition: amdsmi.h:480
amdsmi_memory_type_t
Types of memory.
Definition: amdsmi.h:759
@ AMDSMI_MEM_TYPE_VRAM
VRAM memory.
Definition: amdsmi.h:762
@ AMDSMI_MEM_TYPE_VIS_VRAM
VRAM memory that is visible.
Definition: amdsmi.h:763
@ AMDSMI_MEM_TYPE_GTT
GTT memory.
Definition: amdsmi.h:764
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_clk_type_t
Definition: amdsmi.h:182
@ CLK_TYPE_DF
running on a separate clock)
Definition: amdsmi.h:186
@ CLK_TYPE_SYS
System clock.
Definition: amdsmi.h:183
@ CLK_TYPE_DCEF
Display Controller Engine clock.
Definition: amdsmi.h:188
#define MAX_EVENT_NOTIFICATION_MSG_SIZE
Maximum number of characters an event notification message will be.
Definition: amdsmi.h:602
amdsmi_init_flags_t
Initialization flags.
Definition: amdsmi.h:65
amdsmi_event_group_t
Enum denoting an event group. The value of the enum is the base value for all the event enums in the ...
Definition: amdsmi.h:488
@ AMDSMI_EVNT_GRP_XGMI
Data Fabric (XGMI) related events.
Definition: amdsmi.h:489
@ AMDSMI_EVNT_GRP_XGMI_DATA_OUT
XGMI Outbound data.
Definition: amdsmi.h:490
amdsmi_ras_err_state_t
The current ECC state.
Definition: amdsmi.h:742
@ AMDSMI_RAS_ERR_STATE_PARITY
ECC errors present, but type unknown.
Definition: amdsmi.h:745
@ AMDSMI_RAS_ERR_STATE_SING_C
Single correctable error.
Definition: amdsmi.h:746
@ AMDSMI_RAS_ERR_STATE_MULT_UC
Multiple uncorrectable errors.
Definition: amdsmi.h:747
@ AMDSMI_RAS_ERR_STATE_POISON
page. Treat as uncorrectable.
Definition: amdsmi.h:748
@ AMDSMI_RAS_ERR_STATE_ENABLED
ECC is enabled.
Definition: amdsmi.h:750
@ AMDSMI_RAS_ERR_STATE_NONE
No current errors.
Definition: amdsmi.h:743
@ AMDSMI_RAS_ERR_STATE_DISABLED
ECC is disabled.
Definition: amdsmi.h:744
amdsmi_event_type_t
Event type enum. Events belonging to a particular event group amdsmi_event_group_t should begin enume...
Definition: amdsmi.h:500
@ AMDSMI_EVNT_XGMI_0_BEATS_TX
Data beats sent to neighbor 0; Each beat represents 32 bytes.
Definition: amdsmi.h:523
@ AMDSMI_EVNT_XGMI_DATA_OUT_3
Outbound beats to neighbor 3.
Definition: amdsmi.h:555
@ AMDSMI_EVNT_XGMI_0_NOP_TX
NOPs sent to neighbor 0.
Definition: amdsmi.h:504
@ AMDSMI_EVNT_XGMI_1_NOP_TX
NOPs sent to neighbor 1.
Definition: amdsmi.h:524
@ AMDSMI_EVNT_XGMI_0_RESPONSE_TX
neighbor 0
Definition: amdsmi.h:507
@ AMDSMI_EVNT_XGMI_1_BEATS_TX
Definition: amdsmi.h:529
@ AMDSMI_EVNT_XGMI_DATA_OUT_4
Outbound beats to neighbor 4.
Definition: amdsmi.h:556
@ AMDSMI_EVNT_XGMI_DATA_OUT_1
Outbound beats to neighbor 1.
Definition: amdsmi.h:553
@ AMDSMI_EVNT_XGMI_DATA_OUT_2
Outbound beats to neighbor 2.
Definition: amdsmi.h:554
@ AMDSMI_EVNT_XGMI_1_REQUEST_TX
neighbor 1
Definition: amdsmi.h:525
@ AMDSMI_EVNT_XGMI_DATA_OUT_5
Outbound beats to neighbor 5.
Definition: amdsmi.h:557
@ AMDSMI_EVNT_XGMI_0_REQUEST_TX
neighbor 0
Definition: amdsmi.h:505
@ AMDSMI_EVNT_XGMI_1_RESPONSE_TX
neighbor 1
Definition: amdsmi.h:527
processor_type_t
Device types detectable by AMD SMI.
Definition: amdsmi.h:129
amdsmi_fw_block_t
The values of this enum are used to identify the various firmware blocks.
Definition: amdsmi.h:220
amdsmi_memory_page_status_t
Reserved Memory Page States.
Definition: amdsmi.h:795
@ AMDSMI_MEM_PAGE_STATUS_UNRESERVABLE
Unable to reserve this page.
Definition: amdsmi.h:801
@ AMDSMI_MEM_PAGE_STATUS_RESERVED
and not available for use
Definition: amdsmi.h:796
@ AMDSMI_MEM_PAGE_STATUS_PENDING
Definition: amdsmi.h:798
amdsmi_xgmi_status_t
XGMI Status.
Definition: amdsmi.h:781
amdsmi_dev_perf_level_t
PowerPlay performance levels.
Definition: amdsmi.h:444
@ AMDSMI_DEV_PERF_LEVEL_STABLE_STD
clocks
Definition: amdsmi.h:454
@ AMDSMI_DEV_PERF_LEVEL_STABLE_PEAK
Stable power state with peak clocks.
Definition: amdsmi.h:456
@ AMDSMI_DEV_PERF_LEVEL_AUTO
Performance level is "auto".
Definition: amdsmi.h:445
@ AMDSMI_DEV_PERF_LEVEL_STABLE_MIN_SCLK
system clock
Definition: amdsmi.h:459
@ AMDSMI_DEV_PERF_LEVEL_STABLE_MIN_MCLK
memory clock
Definition: amdsmi.h:457
@ AMDSMI_DEV_PERF_LEVEL_DETERMINISM
Performance determinism state.
Definition: amdsmi.h:461
@ AMDSMI_DEV_PERF_LEVEL_LOW
regardless of workload
Definition: amdsmi.h:448
@ AMDSMI_DEV_PERF_LEVEL_HIGH
regardless of workload
Definition: amdsmi.h:450
@ AMDSMI_DEV_PERF_LEVEL_MANUAL
setting the AMDSMI_CLK_TYPE_SYS speed
Definition: amdsmi.h:452
@ AMDSMI_DEV_PERF_LEVEL_UNKNOWN
Unknown performance level.
Definition: amdsmi.h:465
amdsmi_voltage_metric_t
Voltage Metrics. This enum is used to identify various Volatge metrics. Corresponding values will be ...
Definition: amdsmi.h:661
@ AMDSMI_VOLT_LOWEST
Historical minimum voltage.
Definition: amdsmi.h:670
@ AMDSMI_VOLT_MAX_CRIT
Voltage critical max value.
Definition: amdsmi.h:668
@ AMDSMI_VOLT_HIGHEST
Historical maximum voltage.
Definition: amdsmi.h:671
@ AMDSMI_VOLT_MIN
Voltage min value.
Definition: amdsmi.h:667
@ AMDSMI_VOLT_AVERAGE
Average voltage.
Definition: amdsmi.h:669
@ AMDSMI_VOLT_CURRENT
Voltage current value.
Definition: amdsmi.h:662
@ AMDSMI_VOLT_MAX
Voltage max value.
Definition: amdsmi.h:665
@ AMDSMI_VOLT_MIN_CRIT
Voltage critical min value.
Definition: amdsmi.h:666
uint64_t amdsmi_bit_field_t
Bitfield used in various AMDSMI calls.
Definition: amdsmi.h:790
amdsmi_voltage_type_t
This ennumeration is used to indicate which type of voltage reading should be obtained.
Definition: amdsmi.h:680
@ AMDSMI_VOLT_TYPE_INVALID
Invalid type.
Definition: amdsmi.h:686
@ AMDSMI_VOLT_TYPE_VDDGFX
voltage
Definition: amdsmi.h:683
void * amdsmi_processor_handle
opaque handler point to underlying implementation
Definition: amdsmi.h:123
amdsmi_status_t
Error codes returned by amdsmi functions.
Definition: amdsmi.h:142
@ AMDSMI_STATUS_NOT_INIT
Device not initialized.
Definition: amdsmi.h:167
@ AMDSMI_STATUS_INVAL
Invalid parameters.
Definition: amdsmi.h:145
@ AMDSMI_STATUS_BUSY
Device busy.
Definition: amdsmi.h:165
@ AMDSMI_STATUS_UNKNOWN_ERROR
An unknown error occurred.
Definition: amdsmi.h:176
@ AMDSMI_STATUS_FILE_ERROR
Problem accessing a file.
Definition: amdsmi.h:158
@ AMDSMI_STATUS_DRM_ERROR
Error when call libdrm.
Definition: amdsmi.h:150
@ AMDSMI_STATUS_IO
I/O Error.
Definition: amdsmi.h:156
@ AMDSMI_STATUS_NO_DATA
No data was found for a given input.
Definition: amdsmi.h:170
@ AMDSMI_STATUS_RETRY
Retry operation.
Definition: amdsmi.h:153
@ AMDSMI_STATUS_UNEXPECTED_SIZE
An unexpected amount of data was read.
Definition: amdsmi.h:172
@ AMDSMI_STATUS_INTERNAL_EXCEPTION
An internal exception was caught.
Definition: amdsmi.h:160
@ AMDSMI_STATUS_MAP_ERROR
The internal library error did not map to a status code.
Definition: amdsmi.h:175
@ AMDSMI_STATUS_FAIL_LOAD_SYMBOL
Fail to load symbol.
Definition: amdsmi.h:149
@ AMDSMI_STATUS_INSUFFICIENT_SIZE
Not enough resources were available for the operation.
Definition: amdsmi.h:171
@ AMDSMI_STATUS_INIT_ERROR
An error occurred when initializing internal data structures.
Definition: amdsmi.h:162
@ AMDSMI_STATUS_OUT_OF_RESOURCES
Not enough memory.
Definition: amdsmi.h:159
@ AMDSMI_STATUS_NO_SLOT
No more free slot.
Definition: amdsmi.h:168
@ AMDSMI_STATUS_INTERRUPT
An interrupt occurred during execution of function.
Definition: amdsmi.h:155
@ AMDSMI_STATUS_SUCCESS
Call succeeded.
Definition: amdsmi.h:143
@ AMDSMI_STATUS_ADDRESS_FAULT
Bad address.
Definition: amdsmi.h:157
@ AMDSMI_STATUS_NOT_YET_IMPLEMENTED
Not implemented yet.
Definition: amdsmi.h:147
@ AMDSMI_STATUS_NO_PERM
Permission Denied.
Definition: amdsmi.h:154
@ AMDSMI_STATUS_NOT_FOUND
Device Not found.
Definition: amdsmi.h:166
@ AMDSMI_STATUS_FAIL_LOAD_MODULE
Fail to load lib.
Definition: amdsmi.h:148
@ AMDSMI_STATUS_NOT_SUPPORTED
Command not supported.
Definition: amdsmi.h:146
@ AMDSMI_STATUS_UNEXPECTED_DATA
The data read or provided to function is not what was expected.
Definition: amdsmi.h:173
@ AMDSMI_STATUS_API_FAILED
API call failed.
Definition: amdsmi.h:151
@ AMDSMI_STATUS_TIMEOUT
Timeout in API call.
Definition: amdsmi.h:152
@ AMDSMI_STATUS_INPUT_OUT_OF_BOUNDS
The provided input is out of allowable or safe range.
Definition: amdsmi.h:161
@ AMDSMI_STATUS_REFCOUNT_OVERFLOW
An internal reference counter exceeded INT32_MAX.
Definition: amdsmi.h:163
AMDSMI_IO_LINK_TYPE
Types for IO Link.
Definition: amdsmi.h:807
@ AMDSMI_IOLINK_TYPE_SIZE
Max of IO Link types.
Definition: amdsmi.h:812
@ AMDSMI_IOLINK_TYPE_UNDEFINED
unknown type.
Definition: amdsmi.h:808
@ AMDSMI_IOLINK_TYPE_NUMIOLINKTYPES
Number of IO Link types.
Definition: amdsmi.h:811
@ AMDSMI_IOLINK_TYPE_XGMI
XGMI.
Definition: amdsmi.h:810
@ AMDSMI_IOLINK_TYPE_PCIEXPRESS
PCI Express.
Definition: amdsmi.h:809
amdsmi_temperature_metric_t
Temperature Metrics. This enum is used to identify various temperature metrics. Corresponding values ...
Definition: amdsmi.h:618
@ AMDSMI_TEMP_CRITICAL_HYST
Definition: amdsmi.h:632
@ AMDSMI_TEMP_CRITICAL
greater than corresponding temp_max values.
Definition: amdsmi.h:630
@ AMDSMI_TEMP_OFFSET
Definition: amdsmi.h:648
@ AMDSMI_TEMP_EMERGENCY
Definition: amdsmi.h:635
@ AMDSMI_TEMP_LOWEST
temperature reading by the chip.
Definition: amdsmi.h:650
@ AMDSMI_TEMP_CRIT_MIN
Definition: amdsmi.h:642
@ AMDSMI_TEMP_EMERGENCY_HYST
Definition: amdsmi.h:639
@ AMDSMI_TEMP_CURRENT
Temperature current value.
Definition: amdsmi.h:619
@ AMDSMI_TEMP_MIN
Temperature min value.
Definition: amdsmi.h:623
@ AMDSMI_TEMP_HIGHEST
Historical maximum temperature.
Definition: amdsmi.h:651
@ AMDSMI_TEMP_CRIT_MIN_HYST
Definition: amdsmi.h:645
@ AMDSMI_TEMP_MIN_HYST
Definition: amdsmi.h:627
@ AMDSMI_TEMP_MAX_HYST
Definition: amdsmi.h:624
@ AMDSMI_TEMP_MAX
Temperature max value.
Definition: amdsmi.h:622
amdsmi_gpu_block_t
This enum is used to identify different GPU blocks.
Definition: amdsmi.h:714
@ AMDSMI_GPU_BLOCK_XGMI_WAFL
XGMI block.
Definition: amdsmi.h:726
@ AMDSMI_GPU_BLOCK_LAST
for supported blocks
Definition: amdsmi.h:734
@ AMDSMI_GPU_BLOCK_GFX
GFX block.
Definition: amdsmi.h:721
@ AMDSMI_GPU_BLOCK_INVALID
invalid block
Definition: amdsmi.h:715
@ AMDSMI_GPU_BLOCK_MP0
MP0 block.
Definition: amdsmi.h:730
@ AMDSMI_GPU_BLOCK_HDP
HDP block.
Definition: amdsmi.h:725
@ AMDSMI_GPU_BLOCK_ATHUB
ATHUB block.
Definition: amdsmi.h:723
@ AMDSMI_GPU_BLOCK_MP1
MP1 block.
Definition: amdsmi.h:731
@ AMDSMI_GPU_BLOCK_PCIE_BIF
PCIE_BIF block.
Definition: amdsmi.h:724
@ AMDSMI_GPU_BLOCK_SDMA
SDMA block.
Definition: amdsmi.h:720
@ AMDSMI_GPU_BLOCK_UMC
UMC block.
Definition: amdsmi.h:719
@ AMDSMI_GPU_BLOCK_FUSE
Fuse block.
Definition: amdsmi.h:732
@ AMDSMI_GPU_BLOCK_DF
DF block.
Definition: amdsmi.h:727
@ AMDSMI_GPU_BLOCK_MMHUB
MMHUB block.
Definition: amdsmi.h:722
@ AMDSMI_GPU_BLOCK_SMN
SMN block.
Definition: amdsmi.h:728
@ AMDSMI_GPU_BLOCK_SEM
SEM block.
Definition: amdsmi.h:729
AMDSMI_UTILIZATION_COUNTER_TYPE
The utilization counter type.
Definition: amdsmi.h:818
@ AMDSMI_COARSE_GRAIN_MEM_ACTIVITY
Memory Activity.
Definition: amdsmi.h:822
@ AMDSMI_UTILIZATION_COUNTER_FIRST
GFX Activity.
Definition: amdsmi.h:819
amdsmi_status_t amdsmi_get_gpu_device_bdf(amdsmi_processor_handle processor_handle, amdsmi_bdf_t *bdf)
Returns BDF of the given device.
amdsmi_temperature_type_t
This enumeration is used to indicate from which part of the device a temperature reading should be ob...
Definition: amdsmi.h:203
#define AMDSMI_MAX_NUM_FREQUENCIES
Guaranteed maximum possible number of supported frequencies.
Definition: amdsmi.h:433
amdsmi_counter_command_t
Definition: amdsmi.h:566
@ AMDSMI_CNTR_CMD_STOP
be used before reading.
Definition: amdsmi.h:568
@ AMDSMI_CNTR_CMD_START
Start the counter.
Definition: amdsmi.h:567
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:695
@ AMDSMI_PWR_PROF_PRST_COMPUTE_MASK
Compute Saving Profile.
Definition: amdsmi.h:699
@ AMDSMI_PWR_PROF_PRST_POWER_SAVING_MASK
Power Saving Profile.
Definition: amdsmi.h:698
@ AMDSMI_PWR_PROF_PRST_VIDEO_MASK
Video Power Profile.
Definition: amdsmi.h:697
@ AMDSMI_PWR_PROF_PRST_BOOTUP_DEFAULT
Default Boot Up Profile.
Definition: amdsmi.h:704
@ AMDSMI_PWR_PROF_PRST_LAST
Invalid power profile.
Definition: amdsmi.h:705
@ AMDSMI_PWR_PROF_PRST_CUSTOM_MASK
Custom Power Profile.
Definition: amdsmi.h:696
@ AMDSMI_PWR_PROF_PRST_VR_MASK
VR Power Profile.
Definition: amdsmi.h:700
#define AMDSMI_NUM_VOLTAGE_CURVE_POINTS
The number of points that make up a voltage-frequency curve definition.
Definition: amdsmi.h:440
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_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_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_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_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_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_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 *type)
Retrieve the hops and the connection type between 2 GPUs.
amdsmi_status_t amdsmi_get_minmax_bandwith_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_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_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_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_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_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, uint32_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_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_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_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_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_pcie_link_caps(amdsmi_processor_handle processor_handle, amdsmi_pcie_info_t *info)
Get max PCIe capabilities of the device with provided processor handle.
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_pcie_link_status(amdsmi_processor_handle processor_handle, amdsmi_pcie_info_t *info)
Get current PCIE info of the device with provided processor handle. It is not supported on virtual ma...
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_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_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....
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 voltage/frequency curve information. It is not supported on virtual machi...
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_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_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_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_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_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_energy_count(amdsmi_processor_handle processor_handle, uint64_t *power, float *counter_resolution, uint64_t *timestamp)
Get the energy accumulator counter of the processor with provided processor handle....
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_lib_version(amdsmi_version_t *version)
Get the build version information for the currently running build of AMDSMI.
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_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. It is not supported on virtual machine ...
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_xgmi_info(amdsmi_processor_handle processor_handle, amdsmi_xgmi_info_t *info)
Returns XGMI information for the GPU.
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 and uncorrectable) in the given GPU....
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_get_power_info(amdsmi_processor_handle processor_handle, amdsmi_power_info_t *info)
Returns the current power and voltage of the GPU. The voltage is in units of mV and the power in unit...
amdsmi_status_t amdsmi_get_gpu_vram_usage(amdsmi_processor_handle processor_handle, amdsmi_vram_info_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_gpu_process_list(amdsmi_processor_handle processor_handle, uint32_t *max_processes, amdsmi_process_handle_t *list)
Returns the list of processes running on a given GPU including itself.
amdsmi_status_t amdsmi_get_gpu_process_info(amdsmi_processor_handle processor_handle, amdsmi_process_handle_t process, amdsmi_proc_info_t *info)
Returns the process information of a given process. Engine usage show how much time the process spend...
amdsmi_status_t amdsmi_get_gpu_driver_version(amdsmi_processor_handle processor_handle, int *length, char *version)
Returns the driver version information.
The following structures hold the gpu metrics values for a device.
Definition: amdsmi.h:973
Definition: amdsmi.h:368
Definition: amdsmi.h:378
Definition: amdsmi.h:397
Definition: amdsmi.h:575
uint64_t time_enabled
Definition: amdsmi.h:577
uint64_t time_running
Definition: amdsmi.h:579
uint64_t value
Counter value.
Definition: amdsmi.h:576
Definition: amdsmi.h:404
This structure holds error counts.
Definition: amdsmi.h:1068
uint64_t uncorrectable_count
Accumulated uncorrectable errors.
Definition: amdsmi.h:1070
uint64_t correctable_count
Accumulated correctable errors.
Definition: amdsmi.h:1069
Definition: amdsmi.h:607
amdsmi_processor_handle processor_handle
Handler of device that corresponds to the event.
Definition: amdsmi.h:608
amdsmi_evt_notification_type_t event
Event type.
Definition: amdsmi.h:609
This structure holds 2 amdsmi_range_t's, one for frequency and one for voltage. These 2 ranges indica...
Definition: amdsmi.h:933
amdsmi_range_t freq_range
The frequency range for this VDDC Curve point.
Definition: amdsmi.h:934
amdsmi_range_t volt_range
The voltage range for this VDDC Curve point.
Definition: amdsmi.h:935
This structure holds information about clock frequencies.
Definition: amdsmi.h:873
uint32_t current
Definition: amdsmi.h:882
uint32_t num_supported
Definition: amdsmi.h:877
Definition: amdsmi.h:325
Definition: amdsmi.h:358
Definition: amdsmi.h:1004
This structure represents a point on the frequency-voltage plane.
Definition: amdsmi.h:923
uint64_t frequency
Frequency coordinate (in Hz)
Definition: amdsmi.h:924
uint64_t voltage
Voltage coordinate (in mV)
Definition: amdsmi.h:925
Definition: amdsmi.h:941
This structure holds the frequency-voltage values for a device.
Definition: amdsmi.h:952
amdsmi_range_t curr_mclk_range
(upper bound only)
Definition: amdsmi.h:954
amdsmi_range_t mclk_freq_limits
The range possible of MCLK values.
Definition: amdsmi.h:957
uint32_t num_regions
The number of voltage curve regions.
Definition: amdsmi.h:963
amdsmi_range_t curr_sclk_range
The current SCLK frequency range.
Definition: amdsmi.h:953
amdsmi_range_t sclk_freq_limits
The range possible of SCLK values.
Definition: amdsmi.h:956
amdsmi_od_volt_curve_t curve
The current voltage curve.
Definition: amdsmi.h:962
This structure holds information about the possible PCIe bandwidths. Specifically,...
Definition: amdsmi.h:896
amdsmi_frequencies_t transfer_rate
Definition: amdsmi.h:900
This structure holds pcie info.
Definition: amdsmi.h:1077
Definition: amdsmi.h:341
Definition: amdsmi.h:388
This structure contains information about which power profiles are supported by the system for a give...
Definition: amdsmi.h:853
amdsmi_bit_field_t available_profiles
Definition: amdsmi.h:857
amdsmi_power_profile_preset_masks_t current
Definition: amdsmi.h:862
uint32_t num_profiles
Definition: amdsmi.h:867
Definition: amdsmi.h:413
This structure contains information specific to a process.
Definition: amdsmi.h:1086
uint64_t sdma_usage
SDMA usage in microseconds.
Definition: amdsmi.h:1090
uint32_t process_id
Process ID.
Definition: amdsmi.h:1087
uint32_t cu_occupancy
Compute Unit usage in percent.
Definition: amdsmi.h:1091
uint32_t pasid
PASID.
Definition: amdsmi.h:1088
uint64_t vram_usage
VRAM usage.
Definition: amdsmi.h:1089
This structure represents a range (e.g., frequencies or voltages).
Definition: amdsmi.h:305
uint64_t lower_bound
Lower bound of range.
Definition: amdsmi.h:306
uint64_t upper_bound
Upper bound of range.
Definition: amdsmi.h:307
Reserved Memory Page Record.
Definition: amdsmi.h:837
uint64_t page_size
Page size.
Definition: amdsmi.h:839
amdsmi_memory_page_status_t status
Page "reserved" status.
Definition: amdsmi.h:840
uint64_t page_address
Start address of page.
Definition: amdsmi.h:838
The utilization counter data.
Definition: amdsmi.h:829
uint64_t value
Utilization counter value.
Definition: amdsmi.h:831
AMDSMI_UTILIZATION_COUNTER_TYPE type
Utilization counter type.
Definition: amdsmi.h:830
Definition: amdsmi.h:350
This structure holds version information.
Definition: amdsmi.h:912
uint32_t minor
Minor version.
Definition: amdsmi.h:915
uint32_t major
Major version.
Definition: amdsmi.h:914
const char * build
Full Build version string.
Definition: amdsmi.h:917
uint32_t year
Last 2 digits of the Year released.
Definition: amdsmi.h:913
uint32_t release
Patch, build or stepping version.
Definition: amdsmi.h:916
Definition: amdsmi.h:319
Definition: amdsmi.h:311
Definition: amdsmi.h:331