rocm_smi.h Source File

rocm_smi.h Source File#

ROCmSMI: rocm_smi.h Source File
rocm_smi.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) 2017-2023, 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 ROCM_SMI_ROCM_SMI_H_
44 #define ROCM_SMI_ROCM_SMI_H_
45 
46 #ifdef __cplusplus
47 extern "C" {
48 #include <cstdint>
49 #else
50 #include <stdint.h>
51 #endif // __cplusplus
52 
53 #include <stddef.h>
54 #include <stdbool.h>
55 
56 #include "rocm_smi/kfd_ioctl.h"
57 
74 #define RSMI_MAX_NUM_FREQUENCIES 33
75 
78 #define RSMI_MAX_FAN_SPEED 255
79 
81 #define RSMI_NUM_VOLTAGE_CURVE_POINTS 3
82 
83 
87 typedef enum {
109  RSMI_INITIALIZATION_ERROR = RSMI_STATUS_INIT_ERROR,
135 
137 } rsmi_status_t;
138 
145 typedef enum {
152  RSMI_INIT_FLAG_RESRV_TEST1 = 0x800000000000000,
154 
158 typedef enum {
160  RSMI_DEV_PERF_LEVEL_FIRST = RSMI_DEV_PERF_LEVEL_AUTO,
161 
176 
177  RSMI_DEV_PERF_LEVEL_LAST = RSMI_DEV_PERF_LEVEL_DETERMINISM,
178 
182 typedef rsmi_dev_perf_level_t rsmi_dev_perf_level;
184 
191 typedef enum {
192  RSMI_SW_COMP_FIRST = 0x0,
193 
194  RSMI_SW_COMP_DRIVER = RSMI_SW_COMP_FIRST,
195 
196  RSMI_SW_COMP_LAST = RSMI_SW_COMP_DRIVER
198 
206 typedef uintptr_t rsmi_event_handle_t;
207 
214 typedef enum {
217  RSMI_EVNT_GRP_INVALID = 0xFFFFFFFF
219 
226 typedef enum {
227  RSMI_EVNT_FIRST = RSMI_EVNT_GRP_XGMI,
228 
229  RSMI_EVNT_XGMI_FIRST = RSMI_EVNT_GRP_XGMI,
230  RSMI_EVNT_XGMI_0_NOP_TX = RSMI_EVNT_XGMI_FIRST,
235 
248  // ie, Throughput = BEATS/time_running 10^9 bytes/sec
258 
259  RSMI_EVNT_XGMI_LAST = RSMI_EVNT_XGMI_1_BEATS_TX, // 5
260 
261  RSMI_EVNT_XGMI_DATA_OUT_FIRST = RSMI_EVNT_GRP_XGMI_DATA_OUT, // 10
262 
263  /*
264  * @brief Events in the RSMI_EVNT_GRP_XGMI_DATA_OUT group measure
265  * the number of beats sent on an XGMI link. Each beat represents
266  * 32 bytes. RSMI_EVNT_XGMI_DATA_OUT_n represents the number of
267  * outbound beats (each representing 32 bytes) on link n.<br><br>
268  *
269  * XGMI throughput can be calculated by multiplying a event
270  * such as ::RSMI_EVNT_XGMI_DATA_OUT_n by 32 and dividing by
271  * the time for which event collection occurred,
272  * ::rsmi_counter_value_t.time_running (which is in nanoseconds). To get
273  * bytes per second, multiply this value by 10<sup>9</sup>.<br>
274  * <br>
275  * Throughput = BEATS/time_running * 10<sup>9</sup> (bytes/second)<br>
276  */
277  // ie, Throughput = BEATS/time_running 10^9 bytes/sec
278  RSMI_EVNT_XGMI_DATA_OUT_0 = RSMI_EVNT_XGMI_DATA_OUT_FIRST,
284  RSMI_EVNT_XGMI_DATA_OUT_LAST = RSMI_EVNT_XGMI_DATA_OUT_5,
285 
286  RSMI_EVNT_LAST = RSMI_EVNT_XGMI_DATA_OUT_LAST,
288 
292 typedef enum {
297 
301 typedef struct {
302  uint64_t value;
303  uint64_t time_enabled;
305  uint64_t time_running;
308 
312 typedef enum {
313  RSMI_EVT_NOTIF_VMFAULT = KFD_SMI_EVENT_VMFAULT,
314  RSMI_EVT_NOTIF_FIRST = RSMI_EVT_NOTIF_VMFAULT,
315  RSMI_EVT_NOTIF_THERMAL_THROTTLE = KFD_SMI_EVENT_THERMAL_THROTTLE,
316  RSMI_EVT_NOTIF_GPU_PRE_RESET = KFD_SMI_EVENT_GPU_PRE_RESET,
317  RSMI_EVT_NOTIF_GPU_POST_RESET = KFD_SMI_EVENT_GPU_POST_RESET,
318 
319  RSMI_EVT_NOTIF_LAST = RSMI_EVT_NOTIF_GPU_POST_RESET
321 
325 #define RSMI_EVENT_MASK_FROM_INDEX(i) (1ULL << ((i) - 1))
326 
328 #define MAX_EVENT_NOTIFICATION_MSG_SIZE 64
329 
333 typedef struct {
334  uint32_t dv_ind;
338 
342 typedef enum {
344  RSMI_CLK_TYPE_FIRST = RSMI_CLK_TYPE_SYS,
351 
352  // Add new clocks to the end (not in the middle) and update
353  // RSMI_CLK_TYPE_LAST
354  RSMI_CLK_TYPE_LAST = RSMI_CLK_TYPE_MEM,
355  RSMI_CLK_INVALID = 0xFFFFFFFF
358 typedef rsmi_clk_type_t rsmi_clk_type;
360 
365 typedef enum {
366  RSMI_COMPUTE_PARTITION_INVALID = 0,
379 typedef rsmi_compute_partition_type_t rsmi_compute_partition_type;
381 
386 typedef enum {
387  RSMI_MEMORY_PARTITION_UNKNOWN = 0,
403 typedef rsmi_memory_partition_type_t rsmi_memory_partition_type;
405 
411 typedef enum {
413  RSMI_TEMP_FIRST = RSMI_TEMP_CURRENT,
414 
445 
446  RSMI_TEMP_LAST = RSMI_TEMP_HIGHEST
449 typedef rsmi_temperature_metric_t rsmi_temperature_metric;
451 
456 typedef enum {
457  RSMI_TEMP_TYPE_FIRST = 0,
458 
459  RSMI_TEMP_TYPE_EDGE = RSMI_TEMP_TYPE_FIRST,
467  RSMI_TEMP_TYPE_LAST = RSMI_TEMP_TYPE_HBM_3,
468  RSMI_TEMP_TYPE_INVALID = 0xFFFFFFFF
470 
476 typedef enum {
477  /* Utilization */
478  RSMI_ACTIVITY_GFX = (0x1 << 0),
479  RSMI_ACTIVITY_UMC = (0x1 << 1),
480  RSMI_ACTIVITY_MM = (0x1 << 2)
482 
483 
489 typedef enum {
491 
492  RSMI_VOLT_FIRST = RSMI_VOLT_CURRENT,
500 
501  RSMI_VOLT_LAST = RSMI_VOLT_HIGHEST
503 
508 typedef enum {
509  RSMI_VOLT_TYPE_FIRST = 0,
510 
511  RSMI_VOLT_TYPE_VDDGFX = RSMI_VOLT_TYPE_FIRST,
513  RSMI_VOLT_TYPE_LAST = RSMI_VOLT_TYPE_VDDGFX,
514  RSMI_VOLT_TYPE_INVALID = 0xFFFFFFFF
516 
523 typedef enum {
529 
531  RSMI_PWR_PROF_PRST_3D_FULL_SCR_MASK = 0x20,
534 
536  RSMI_PWR_PROF_PRST_INVALID = 0xFFFFFFFFFFFFFFFF
539 typedef rsmi_power_profile_preset_masks_t rsmi_power_profile_preset_masks;
541 
545 typedef enum {
546  RSMI_GPU_BLOCK_INVALID = 0x0000000000000000,
548  RSMI_GPU_BLOCK_FIRST = 0x0000000000000001,
549 
550  RSMI_GPU_BLOCK_UMC = RSMI_GPU_BLOCK_FIRST,
551  RSMI_GPU_BLOCK_SDMA = 0x0000000000000002,
552  RSMI_GPU_BLOCK_GFX = 0x0000000000000004,
553  RSMI_GPU_BLOCK_MMHUB = 0x0000000000000008,
554  RSMI_GPU_BLOCK_ATHUB = 0x0000000000000010,
555  RSMI_GPU_BLOCK_PCIE_BIF = 0x0000000000000020,
556  RSMI_GPU_BLOCK_HDP = 0x0000000000000040,
557  RSMI_GPU_BLOCK_XGMI_WAFL = 0x0000000000000080,
558  RSMI_GPU_BLOCK_DF = 0x0000000000000100,
559  RSMI_GPU_BLOCK_SMN = 0x0000000000000200,
560  RSMI_GPU_BLOCK_SEM = 0x0000000000000400,
561  RSMI_GPU_BLOCK_MP0 = 0x0000000000000800,
562  RSMI_GPU_BLOCK_MP1 = 0x0000000000001000,
563  RSMI_GPU_BLOCK_FUSE = 0x0000000000002000,
564 
567  RSMI_GPU_BLOCK_RESERVED = 0x8000000000000000
570 typedef rsmi_gpu_block_t rsmi_gpu_block;
572 
576 typedef enum {
585 
586  RSMI_RAS_ERR_STATE_LAST = RSMI_RAS_ERR_STATE_ENABLED,
587  RSMI_RAS_ERR_STATE_INVALID = 0xFFFFFFFF
589 
593 typedef enum {
594  RSMI_MEM_TYPE_FIRST = 0,
595 
596  RSMI_MEM_TYPE_VRAM = RSMI_MEM_TYPE_FIRST,
599 
600  RSMI_MEM_TYPE_LAST = RSMI_MEM_TYPE_GTT
602 
606 typedef enum {
609  RSMI_FREQ_IND_INVALID = 0xFFFFFFFF
612 typedef rsmi_freq_ind_t rsmi_freq_ind;
614 
615 
620 typedef enum {
621  RSMI_FW_BLOCK_FIRST = 0,
622 
623  RSMI_FW_BLOCK_ASD = RSMI_FW_BLOCK_FIRST,
624  RSMI_FW_BLOCK_CE,
625  RSMI_FW_BLOCK_DMCU,
626  RSMI_FW_BLOCK_MC,
627  RSMI_FW_BLOCK_ME,
628  RSMI_FW_BLOCK_MEC,
629  RSMI_FW_BLOCK_MEC2,
630  RSMI_FW_BLOCK_MES,
631  RSMI_FW_BLOCK_MES_KIQ,
632  RSMI_FW_BLOCK_PFP,
633  RSMI_FW_BLOCK_RLC,
634  RSMI_FW_BLOCK_RLC_SRLC,
635  RSMI_FW_BLOCK_RLC_SRLG,
636  RSMI_FW_BLOCK_RLC_SRLS,
637  RSMI_FW_BLOCK_SDMA,
638  RSMI_FW_BLOCK_SDMA2,
639  RSMI_FW_BLOCK_SMC,
640  RSMI_FW_BLOCK_SOS,
641  RSMI_FW_BLOCK_TA_RAS,
642  RSMI_FW_BLOCK_TA_XGMI,
643  RSMI_FW_BLOCK_UVD,
644  RSMI_FW_BLOCK_VCE,
645  RSMI_FW_BLOCK_VCN,
646 
647  RSMI_FW_BLOCK_LAST = RSMI_FW_BLOCK_VCN
649 
653 typedef enum {
654  RSMI_XGMI_STATUS_NO_ERRORS = 0,
655  RSMI_XGMI_STATUS_ERROR,
656  RSMI_XGMI_STATUS_MULTIPLE_ERRORS,
658 
662 typedef uint64_t rsmi_bit_field_t;
664 typedef rsmi_bit_field_t rsmi_bit_field;
666 
670 typedef enum {
678 
682 typedef enum _RSMI_IO_LINK_TYPE {
687  RSMI_IOLINK_TYPE_SIZE = 0xFFFFFFFF
689 
692 #define CPU_NODE_INDEX 0xFFFFFFFF
693 
697 typedef enum {
700  RSMI_COARSE_GRAIN_GFX_ACTIVITY = RSMI_UTILIZATION_COUNTER_FIRST,
702  RSMI_UTILIZATION_COUNTER_LAST = RSMI_COARSE_GRAIN_MEM_ACTIVITY
704 
708 typedef enum {
711  RSMI_INVALID_POWER = 0xFFFFFFFF
713 
717 typedef struct {
719  uint64_t value;
721 
725 typedef struct {
726  uint64_t page_address;
727  uint64_t page_size;
730 
734 #define RSMI_MAX_NUM_POWER_PROFILES (sizeof(rsmi_bit_field_t) * 8)
735 
741 typedef struct {
746 
751 
755  uint32_t num_profiles;
758 typedef rsmi_power_profile_status_t rsmi_power_profile_status;
760 
764 typedef struct {
769 
773  uint32_t num_supported;
774 
778  uint32_t current;
779 
784  uint64_t frequency[RSMI_MAX_NUM_FREQUENCIES];
787 typedef rsmi_frequencies_t rsmi_frequencies;
789 
795 typedef struct {
800 
805  uint32_t lanes[RSMI_MAX_NUM_FREQUENCIES];
807 
809 typedef rsmi_pcie_bandwidth_t rsmi_pcie_bandwidth;
811 
816 typedef struct {
817  /* Utilization */
822 
826 typedef struct {
827  uint32_t major;
828  uint32_t minor;
829  uint32_t patch;
830  const char *build;
833 typedef rsmi_version_t rsmi_version;
835 
838 typedef struct {
839  uint64_t lower_bound;
840  uint64_t upper_bound;
841 } rsmi_range_t;
843 typedef rsmi_range_t rsmi_range;
845 
849 typedef struct {
850  uint64_t frequency;
851  uint64_t voltage;
854 typedef rsmi_od_vddc_point_t rsmi_od_vddc_point;
856 
862 typedef struct {
867 typedef rsmi_freq_volt_region_t rsmi_freq_volt_region;
869 
873 typedef struct {
881 typedef rsmi_od_volt_curve_t rsmi_od_volt_curve;
883 
887 typedef struct {
893 
898  uint32_t num_regions;
901 typedef rsmi_od_volt_freq_data_t rsmi_od_volt_freq_data;
903 
904 
913  // TODO(amd) Doxygen documents
914  // Note: This should match: AMDGpuMetricsHeader_v1_t
916  uint16_t structure_size;
917  uint8_t format_revision;
918  uint8_t content_revision;
920 };
924 
932 #define CENTRIGRADE_TO_MILLI_CENTIGRADE 1000
933 
937 #define RSMI_NUM_HBM_INSTANCES 4
938 
942 #define RSMI_MAX_NUM_VCNS 4
943 
947 #define RSMI_MAX_NUM_JPEG_ENGS 32
948 
952 #define RSMI_MAX_NUM_CLKS 4
953 
957 #define RSMI_MAX_NUM_XGMI_LINKS 8
958 
962 #define RSMI_MAX_NUM_GFX_CLKS 8
963 
964 
965 typedef struct {
966  // TODO(amd) Doxygen documents
967  // Note: This structure is extended to fit the needs of different GPU metric
968  // versions when exposing data through the structure.
969  // Depending on the version, some data members will hold data, and
970  // some will not. A good example is the set of 'current clocks':
971  // - current_gfxclk, current_socclk, current_vclk0, current_dclk0
972  // These are single-valued data members, up to version 1.3.
973  // For version 1.4 and up these are multi-valued data members (arrays)
974  // and their counterparts;
975  // - current_gfxclks[], current_socclks[], current_vclk0s[],
976  // current_dclk0s[]
977  // will hold the data
979 
980  /*
981  * v1.0 Base
982  */
983  struct metrics_table_header_t common_header;
984 
985  // Temperature
986  uint16_t temperature_edge;
987  uint16_t temperature_hotspot;
988  uint16_t temperature_mem;
989  uint16_t temperature_vrgfx;
990  uint16_t temperature_vrsoc;
991  uint16_t temperature_vrmem;
992 
993  // Utilization
994  uint16_t average_gfx_activity;
995  uint16_t average_umc_activity; // memory controller
996  uint16_t average_mm_activity; // UVD or VCN
997 
998  // Power/Energy
999  uint16_t average_socket_power;
1000  uint64_t energy_accumulator; // v1 mod. (32->64)
1001 
1002  // Driver attached timestamp (in ns)
1003  uint64_t system_clock_counter; // v1 mod. (moved from top of struct)
1004 
1005  // Average clocks
1006  uint16_t average_gfxclk_frequency;
1007  uint16_t average_socclk_frequency;
1008  uint16_t average_uclk_frequency;
1009  uint16_t average_vclk0_frequency;
1010  uint16_t average_dclk0_frequency;
1011  uint16_t average_vclk1_frequency;
1012  uint16_t average_dclk1_frequency;
1013 
1014  // Current clocks
1015  uint16_t current_gfxclk;
1016  uint16_t current_socclk;
1017  uint16_t current_uclk;
1018  uint16_t current_vclk0;
1019  uint16_t current_dclk0;
1020  uint16_t current_vclk1;
1021  uint16_t current_dclk1;
1022 
1023  // Throttle status
1024  uint32_t throttle_status;
1025 
1026  // Fans
1027  uint16_t current_fan_speed;
1028 
1029  // Link width/speed
1030  uint16_t pcie_link_width; // v1 mod.(8->16)
1031  uint16_t pcie_link_speed; // in 0.1 GT/s; v1 mod. (8->16)
1032 
1033 
1034  /*
1035  * v1.1 additions
1036  */
1037  uint32_t gfx_activity_acc; // new in v1
1038  uint32_t mem_activity_acc; // new in v1
1039  uint16_t temperature_hbm[RSMI_NUM_HBM_INSTANCES]; // new in v1
1040 
1041 
1042  /*
1043  * v1.2 additions
1044  */
1045  // PMFW attached timestamp (10ns resolution)
1046  uint64_t firmware_timestamp;
1047 
1048 
1049  /*
1050  * v1.3 additions
1051  */
1052  // Voltage (mV)
1053  uint16_t voltage_soc;
1054  uint16_t voltage_gfx;
1055  uint16_t voltage_mem;
1056 
1057  // Throttle status
1058  uint64_t indep_throttle_status;
1059 
1060 
1061  /*
1062  * v1.4 additions
1063  */
1064  // Power (Watts)
1065  uint16_t current_socket_power;
1066 
1067  // Utilization (%)
1068  uint16_t vcn_activity[RSMI_MAX_NUM_VCNS]; // VCN instances activity percent (encode/decode)
1069 
1070  // Clock Lock Status. Each bit corresponds to clock instance
1071  uint32_t gfxclk_lock_status;
1072 
1073  // XGMI bus width and bitrate (in Gbps)
1074  uint16_t xgmi_link_width;
1075  uint16_t xgmi_link_speed;
1076 
1077  // PCIE accumulated bandwidth (GB/sec)
1078  uint64_t pcie_bandwidth_acc;
1079 
1080  // PCIE instantaneous bandwidth (GB/sec)
1081  uint64_t pcie_bandwidth_inst;
1082 
1083  // PCIE L0 to recovery state transition accumulated count
1084  uint64_t pcie_l0_to_recov_count_acc;
1085 
1086  // PCIE replay accumulated count
1087  uint64_t pcie_replay_count_acc;
1088 
1089  // PCIE replay rollover accumulated count
1090  uint64_t pcie_replay_rover_count_acc;
1091 
1092  // XGMI accumulated data transfer size(KiloBytes)
1093  uint64_t xgmi_read_data_acc[RSMI_MAX_NUM_XGMI_LINKS];
1094  uint64_t xgmi_write_data_acc[RSMI_MAX_NUM_XGMI_LINKS];
1095 
1096  // XGMI accumulated data transfer size(KiloBytes)
1097  uint16_t current_gfxclks[RSMI_MAX_NUM_GFX_CLKS];
1098  uint16_t current_socclks[RSMI_MAX_NUM_CLKS];
1099  uint16_t current_vclk0s[RSMI_MAX_NUM_CLKS];
1100  uint16_t current_dclk0s[RSMI_MAX_NUM_CLKS];
1101 
1102  /*
1103  * v1.5 additions
1104  */
1105  // JPEG activity percent (encode/decode)
1106  uint16_t jpeg_activity[RSMI_MAX_NUM_JPEG_ENGS];
1107 
1108  // PCIE NAK sent accumulated count
1109  uint32_t pcie_nak_sent_count_acc;
1110 
1111  // PCIE NAK received accumulated count
1112  uint32_t pcie_nak_rcvd_count_acc;
1113 
1114 
1117 
1121 typedef struct {
1122  uint64_t correctable_err;
1125 
1129 typedef struct {
1130  uint32_t process_id;
1131  uint32_t pasid;
1132  uint64_t vram_usage;
1133  uint64_t sdma_usage;
1134  uint32_t cu_occupancy;
1136 
1137 
1141 typedef struct rsmi_func_id_iter_handle * rsmi_func_id_iter_handle_t;
1142 
1145 #define RSMI_DEFAULT_VARIANT 0xFFFFFFFFFFFFFFFF
1146 
1152 typedef union id {
1153  uint64_t id;
1154  const char *name;
1155  union {
1169  rsmi_gpu_block_t gpu_block_type;
1170  };
1172 
1173 
1174 /*****************************************************************************/
1192 rsmi_status_t rsmi_init(uint64_t init_flags);
1193 
1200  // end of InitShut
1202 
1203 /*****************************************************************************/
1221 
1249 rsmi_status_t rsmi_dev_id_get(uint32_t dv_ind, uint16_t *id);
1250 
1265 rsmi_status_t rsmi_dev_revision_get(uint32_t dv_ind, uint16_t *revision);
1266 
1291 rsmi_status_t rsmi_dev_sku_get(uint32_t dv_ind, char *sku);
1292 
1316 rsmi_status_t rsmi_dev_vendor_id_get(uint32_t dv_ind, uint16_t *id);
1317 
1352 rsmi_status_t rsmi_dev_name_get(uint32_t dv_ind, char *name, size_t len);
1353 
1386 rsmi_status_t rsmi_dev_brand_get(uint32_t dv_ind, char *brand, uint32_t len);
1387 
1422 rsmi_status_t rsmi_dev_vendor_name_get(uint32_t dv_ind, char *name,
1423  size_t len);
1424 
1447 rsmi_status_t rsmi_dev_vram_vendor_get(uint32_t dv_ind, char *brand,
1448  uint32_t len);
1449 
1479  char *serial_num, uint32_t len);
1503 rsmi_status_t rsmi_dev_subsystem_id_get(uint32_t dv_ind, uint16_t *id);
1504 
1540 rsmi_dev_subsystem_name_get(uint32_t dv_ind, char *name, size_t len);
1541 
1560 rsmi_dev_drm_render_minor_get(uint32_t dv_ind, uint32_t *minor);
1561 
1584 rsmi_status_t rsmi_dev_subsystem_vendor_id_get(uint32_t dv_ind, uint16_t *id);
1585 
1607 rsmi_status_t rsmi_dev_unique_id_get(uint32_t dv_ind, uint64_t *id);
1608 
1623 rsmi_status_t rsmi_dev_xgmi_physical_id_get(uint32_t dv_ind, uint16_t *id);
1624 
1625  // end of IDQuer
1627 
1628 /*****************************************************************************/
1654 
1692 rsmi_status_t rsmi_dev_pci_id_get(uint32_t dv_ind, uint64_t *bdfid);
1693 
1716 rsmi_status_t rsmi_topo_numa_affinity_get(uint32_t dv_ind, int32_t *numa_node);
1717 
1742 rsmi_status_t rsmi_dev_pci_throughput_get(uint32_t dv_ind, uint64_t *sent,
1743  uint64_t *received, uint64_t *max_pkt_sz);
1744 
1768  uint64_t *counter);
1769  // end of PCIeQuer
1771 /*****************************************************************************/
1806 rsmi_status_t rsmi_dev_pci_bandwidth_set(uint32_t dv_ind, uint64_t bw_bitmask);
1807  // end of PCIeCont
1809 
1810 /*****************************************************************************/
1846 rsmi_dev_power_ave_get(uint32_t dv_ind, uint32_t sensor_ind, uint64_t *power);
1847 
1870 rsmi_dev_current_socket_power_get(uint32_t dv_ind, uint64_t *socket_power);
1871 
1906 rsmi_status_t rsmi_dev_power_get(uint32_t dv_ind, uint64_t *power,
1907  RSMI_POWER_TYPE *type);
1908 
1940 rsmi_dev_energy_count_get(uint32_t dv_ind, uint64_t *power,
1941  float *counter_resolution, uint64_t *timestamp);
1942 
1969 rsmi_dev_power_cap_get(uint32_t dv_ind, uint32_t sensor_ind, uint64_t *cap);
1970 
1993 rsmi_dev_power_cap_default_get(uint32_t dv_ind, uint64_t *default_cap);
1994 
2027 rsmi_dev_power_cap_range_get(uint32_t dv_ind, uint32_t sensor_ind,
2028  uint64_t *max, uint64_t *min);
2029  // end of PowerQuer
2031 
2032 /*****************************************************************************/
2058 rsmi_dev_power_cap_set(uint32_t dv_ind, uint32_t sensor_ind, uint64_t cap);
2059 
2080 rsmi_dev_power_profile_set(uint32_t dv_ind, uint32_t reserved,
2081  rsmi_power_profile_preset_masks_t profile); // end of PowerCont
2083 /*****************************************************************************/
2084 
2085 
2086 
2087 /*****************************************************************************/
2120  uint64_t *total);
2121 
2150  uint64_t *used);
2151 
2175 rsmi_dev_memory_busy_percent_get(uint32_t dv_ind, uint32_t *busy_percent);
2176 
2213 rsmi_dev_memory_reserved_pages_get(uint32_t dv_ind, uint32_t *num_pages,
2214  rsmi_retired_page_record_t *records); // end of MemQuer
2216 
2248 rsmi_status_t rsmi_dev_fan_rpms_get(uint32_t dv_ind, uint32_t sensor_ind,
2249  int64_t *speed);
2250 
2279  uint32_t sensor_ind, int64_t *speed);
2280 
2307  uint32_t sensor_ind, uint64_t *max_speed);
2308 
2339 rsmi_status_t rsmi_dev_temp_metric_get(uint32_t dv_ind, uint32_t sensor_type,
2340  rsmi_temperature_metric_t metric, int64_t *temperature);
2341 
2373  rsmi_voltage_type_t sensor_type,
2374  rsmi_voltage_metric_t metric, int64_t *voltage); // end of PhysQuer
2376 
2377 /*****************************************************************************/
2397 rsmi_status_t rsmi_dev_fan_reset(uint32_t dv_ind, uint32_t sensor_ind);
2398 
2421 rsmi_status_t rsmi_dev_fan_speed_set(uint32_t dv_ind, uint32_t sensor_ind,
2422  uint64_t speed);
2423  // end of PhysCont
2425 /*****************************************************************************/
2456 rsmi_dev_busy_percent_get(uint32_t dv_ind, uint32_t *busy_percent);
2457 
2489  rsmi_utilization_counter_t utilization_counters[],
2490  uint32_t count,
2491  uint64_t *timestamp);
2492 
2518  rsmi_activity_metric_t activity_metric_type,
2519  rsmi_activity_metric_counter_t* activity_metric_counter);
2520 
2542 rsmi_dev_activity_avg_mm_get(uint32_t dv_ind, uint16_t* avg_activity);
2543 
2568  rsmi_dev_perf_level_t *perf);
2569 
2592  uint64_t clkvalue);
2593 
2617 rsmi_status_t rsmi_dev_overdrive_level_get(uint32_t dv_ind, uint32_t *od);
2618 
2642 rsmi_status_t rsmi_dev_mem_overdrive_level_get(uint32_t dv_ind, uint32_t *od);
2643 
2677  rsmi_clk_type_t clk_type, rsmi_frequencies_t *f);
2678 
2693 
2716 
2738  rsmi_gpu_metrics_t *pgpu_metrics);
2739 
2762 rsmi_status_t rsmi_dev_clk_range_set(uint32_t dv_ind, uint64_t minclkvalue,
2763  uint64_t maxclkvalue,
2764  rsmi_clk_type_t clkType);
2765 
2788  uint64_t clkvalue,
2789  rsmi_clk_type_t clkType);
2790 
2814  uint64_t clkvalue,
2815  rsmi_clk_type_t clkType);
2816 
2838 rsmi_status_t rsmi_dev_od_volt_info_set(uint32_t dv_ind, uint32_t vpoint,
2839  uint64_t clkvalue, uint64_t voltvalue);
2840 
2880  uint32_t *num_regions, rsmi_freq_volt_region_t *buffer);
2881 
2918 rsmi_dev_power_profile_presets_get(uint32_t dv_ind, uint32_t sensor_ind,
2919  rsmi_power_profile_status_t *status);
2920  // end of PerfQuer
2922 /*****************************************************************************/
2923 
2952 
2973 
3017 rsmi_status_t rsmi_dev_overdrive_level_set(uint32_t dv_ind, uint32_t od);
3018 
3058 rsmi_status_t rsmi_dev_overdrive_level_set_v1(uint32_t dv_ind, uint32_t od);
3059 
3095  rsmi_clk_type_t clk_type, uint64_t freq_bitmask);
3096  // end of PerfCont
3098 
3099 /*****************************************************************************/
3120 
3148  uint32_t len);
3149 
3177 rsmi_dev_vbios_version_get(uint32_t dv_ind, char *vbios, uint32_t len);
3178 
3205  uint64_t *fw_version);
3206 
3228  uint64_t *gfx_version);
3229  // end of VersQuer
3231 
3232 /*****************************************************************************/
3266 
3295  uint64_t *enabled_blocks);
3296 
3323  rsmi_ras_err_state_t *state);
3339 rsmi_status_string(rsmi_status_t status, const char **status_string);
3340  // end of ErrQuer
3342 
3343 /*****************************************************************************/
3466 
3497  rsmi_event_handle_t *evnt_handle);
3498 
3514 
3534  rsmi_counter_command_t cmd, void *cmd_args);
3535 
3555  rsmi_counter_value_t *value);
3556 
3578  rsmi_event_group_t grp, uint32_t *available); // end of PerfCntr
3580 
3581 /*****************************************************************************/
3621 
3645 
3681 rsmi_compute_process_gpus_get(uint32_t pid, uint32_t *dv_indices,
3682  uint32_t *num_devices);
3683 
3704 rsmi_compute_process_info_by_device_get(uint32_t pid, uint32_t dv_ind,
3705  rsmi_process_info_t *proc);
3706  // end of SysInfo
3708 
3709 /*****************************************************************************/
3740 
3754 rsmi_dev_xgmi_error_reset(uint32_t dv_ind);
3755 
3775 rsmi_dev_xgmi_hive_id_get(uint32_t dv_ind, uint64_t *hive_id);
3776  // end of SysInfo
3778 
3779 /*****************************************************************************/
3803 rsmi_topo_get_numa_node_number(uint32_t dv_ind, uint32_t *numa_node);
3804 
3826 rsmi_topo_get_link_weight(uint32_t dv_ind_src, uint32_t dv_ind_dst,
3827  uint64_t *weight);
3828 
3852 rsmi_minmax_bandwidth_get(uint32_t dv_ind_src, uint32_t dv_ind_dst,
3853  uint64_t *min_bandwidth, uint64_t *max_bandwidth);
3854 
3888 rsmi_topo_get_link_type(uint32_t dv_ind_src, uint32_t dv_ind_dst,
3889  uint64_t *hops, RSMI_IO_LINK_TYPE *type);
3890 
3912 rsmi_is_P2P_accessible(uint32_t dv_ind_src, uint32_t dv_ind_dst,
3913  bool *accessible);
3914  // end of HWTopo
3916 
3917 /*****************************************************************************/
3953 rsmi_dev_compute_partition_get(uint32_t dv_ind, char *compute_partition,
3954  uint32_t len);
3955 
3982  rsmi_compute_partition_type_t compute_partition);
3983 
4002  // end of ComputePartition
4004 
4005 /*****************************************************************************/
4041 rsmi_dev_memory_partition_get(uint32_t dv_ind, char *memory_partition,
4042  uint32_t len);
4043 
4069  rsmi_memory_partition_type_t memory_partition);
4070 
4091  // end of memory_partition
4093 
4094 /*****************************************************************************/
4229  rsmi_func_id_iter_handle_t *handle);
4230 
4257  rsmi_func_id_iter_handle_t *var_iter);
4258 
4279 
4293 
4314  rsmi_func_id_value_t *value);
4315  // end of APISupport
4317 
4318 /*****************************************************************************/
4340 
4368 rsmi_event_notification_mask_set(uint32_t dv_ind, uint64_t mask);
4369 
4412  uint32_t *num_elem, rsmi_evt_notification_data_t *data);
4413 
4433  // end of EvntNotif
4435 
4436 
4437 /*****************************************************************************/
4448 typedef uint16_t GPUMetricVcnActivity_t[RSMI_MAX_NUM_VCNS];
4449 typedef uint16_t GPUMetricJpegActivity_t[RSMI_MAX_NUM_JPEG_ENGS];
4450 typedef uint64_t GPUMetricXgmiReadDataAcc_t[RSMI_MAX_NUM_XGMI_LINKS];
4451 typedef uint64_t GPUMetricXgmiWriteDataAcc_t[RSMI_MAX_NUM_XGMI_LINKS];
4452 typedef uint16_t GPUMetricCurrGfxClk_t[RSMI_MAX_NUM_GFX_CLKS];
4453 typedef uint16_t GPUMetricCurrSocClk_t[RSMI_MAX_NUM_CLKS];
4454 typedef uint16_t GPUMetricCurrVClk0_t[RSMI_MAX_NUM_CLKS];
4455 typedef uint16_t GPUMetricCurrDClk0_t[RSMI_MAX_NUM_CLKS];
4456 
4457 
4458 /******
4459  * Metric single-valued counter types
4460  */
4461 
4479 rsmi_dev_metrics_temp_hotspot_get(uint32_t dv_ind, uint16_t* hotspot_value);
4480 
4498 rsmi_dev_metrics_temp_mem_get(uint32_t dv_ind, uint16_t* mem_value);
4499 
4517 rsmi_dev_metrics_temp_vrsoc_get(uint32_t dv_ind, uint16_t* vrsoc_value);
4518 
4536 rsmi_dev_metrics_curr_socket_power_get(uint32_t dv_ind, uint16_t* socket_power_value);
4537 
4555 rsmi_dev_metrics_avg_gfx_activity_get(uint32_t dv_ind, uint16_t* gfx_activity_value);
4556 
4574 rsmi_dev_metrics_avg_umc_activity_get(uint32_t dv_ind, uint16_t* umc_activity_value);
4575 
4593 rsmi_dev_metrics_energy_acc_get(uint32_t dv_ind, uint64_t* energy_acc_value);
4594 
4612 rsmi_dev_metrics_system_clock_counter_get(uint32_t dv_ind, uint64_t* system_clock_counter_value);
4613 
4631 rsmi_dev_metrics_firmware_timestamp_get(uint32_t dv_ind, uint64_t* firmware_timestamp_value);
4632 
4650 rsmi_dev_metrics_throttle_status_get(uint32_t dv_ind, uint32_t* throttle_status_value);
4651 
4669 rsmi_dev_metrics_pcie_link_width_get(uint32_t dv_ind, uint16_t* pcie_link_width_value);
4670 
4688 rsmi_dev_metrics_pcie_link_speed_get(uint32_t dv_ind, uint16_t* pcie_link_speed_value);
4689 
4707 rsmi_dev_metrics_xgmi_link_width_get(uint32_t dv_ind, uint16_t* xgmi_link_width_value);
4708 
4726 rsmi_dev_metrics_xgmi_link_speed_get(uint32_t dv_ind, uint16_t* xgmi_link_speed_value);
4727 
4745 rsmi_dev_metrics_gfxclk_lock_status_get(uint32_t dv_ind, uint32_t* gfxclk_lock_status_value);
4746 
4764 rsmi_dev_metrics_gfx_activity_acc_get(uint32_t dv_ind, uint32_t* gfx_activity_acc_value);
4765 
4783 rsmi_dev_metrics_mem_activity_acc_get(uint32_t dv_ind, uint32_t* mem_activity_acc_value);
4784 
4802 rsmi_dev_metrics_pcie_bandwidth_acc_get(uint32_t dv_ind, uint64_t* pcie_bandwidth_acc_value);
4803 
4821 rsmi_dev_metrics_pcie_bandwidth_inst_get(uint32_t dv_ind, uint64_t* pcie_bandwidth_inst_value);
4822 
4840 rsmi_dev_metrics_pcie_l0_recov_count_acc_get(uint32_t dv_ind, uint64_t* pcie_count_acc_value);
4841 
4859 rsmi_dev_metrics_pcie_replay_count_acc_get(uint32_t dv_ind, uint64_t* pcie_count_acc_value);
4860 
4878 rsmi_dev_metrics_pcie_replay_rover_count_acc_get(uint32_t dv_ind, uint64_t* pcie_count_acc_value);
4879 
4897 rsmi_dev_metrics_pcie_nak_sent_count_acc_get(uint32_t dv_ind, uint32_t* pcie_nak_sent_count_acc_value);
4898 
4916 rsmi_dev_metrics_pcie_nak_rcvd_count_acc_get(uint32_t dv_ind, uint32_t* pcie_nak_rcvd_count_acc_value);
4917 
4935 rsmi_dev_metrics_curr_uclk_get(uint32_t dv_ind, uint16_t* uclk_value);
4936 
4937 
4938 /******
4939  * Metric multi-valued counter types
4940  */
4941 
4961 rsmi_dev_metrics_temp_hbm_get(uint32_t dv_ind, GPUMetricTempHbm_t* temp_hbm_value);
4962 
4982 rsmi_dev_metrics_vcn_activity_get(uint32_t dv_ind, GPUMetricVcnActivity_t* vcn_activity_value);
4983 
5003 rsmi_dev_metrics_jpeg_activity_get(uint32_t dv_ind, GPUMetricJpegActivity_t* jpeg_activity_value);
5004 
5024 rsmi_dev_metrics_xgmi_read_data_get(uint32_t dv_ind, GPUMetricXgmiReadDataAcc_t* xgmi_read_data_acc_value);
5025 
5045 rsmi_dev_metrics_xgmi_write_data_get(uint32_t dv_ind, GPUMetricXgmiWriteDataAcc_t* xgmi_write_data_acc_value);
5046 
5066 rsmi_dev_metrics_curr_gfxclk_get(uint32_t dv_ind, GPUMetricCurrGfxClk_t* current_gfxclk_value);
5067 
5087 rsmi_dev_metrics_curr_socclk_get(uint32_t dv_ind, GPUMetricCurrSocClk_t* current_socclk_value);
5088 
5108 rsmi_dev_metrics_curr_vclk0_get(uint32_t dv_ind, GPUMetricCurrVClk0_t* current_vclk_value);
5109 
5129 rsmi_dev_metrics_curr_dclk0_get(uint32_t dv_ind, GPUMetricCurrDClk0_t* current_dclk_value);
5130 
5148 rsmi_dev_metrics_temp_edge_get(uint32_t dv_ind, uint16_t* edge_value);
5149 
5167 rsmi_dev_metrics_temp_vrgfx_get(uint32_t dv_ind, uint16_t* vrgfx_value);
5168 
5186 rsmi_dev_metrics_temp_vrmem_get(uint32_t dv_ind, uint16_t* vrmem_value);
5187 
5205 rsmi_dev_metrics_avg_mm_activity_get(uint32_t dv_ind, uint16_t* mm_activity_value);
5206 
5224 rsmi_dev_metrics_curr_vclk1_get(uint32_t dv_ind, uint16_t* current_vclk_value);
5225 
5243 rsmi_dev_metrics_curr_dclk1_get(uint32_t dv_ind, uint16_t* current_dclk_value);
5244 
5262 rsmi_dev_metrics_indep_throttle_status_get(uint32_t dv_ind, uint64_t* throttle_status_value);
5263 
5281 rsmi_dev_metrics_avg_socket_power_get(uint32_t dv_ind, uint16_t* socket_power_value);
5282 
5300 rsmi_dev_metrics_curr_fan_speed_get(uint32_t dv_ind, uint16_t* fan_speed_value);
5301 
5319 rsmi_dev_metrics_avg_gfx_clock_frequency_get(uint32_t dv_ind, uint16_t* clock_frequency_value);
5320 
5338 rsmi_dev_metrics_avg_soc_clock_frequency_get(uint32_t dv_ind, uint16_t* clock_frequency_value);
5339 
5357 rsmi_dev_metrics_avg_uclock_frequency_get(uint32_t dv_ind, uint16_t* clock_frequency_value);
5358 
5376 rsmi_dev_metrics_avg_vclock0_frequency_get(uint32_t dv_ind, uint16_t* clock_frequency_value);
5377 
5395 rsmi_dev_metrics_avg_dclock0_frequency_get(uint32_t dv_ind, uint16_t* clock_frequency_value);
5396 
5414 rsmi_dev_metrics_avg_vclock1_frequency_get(uint32_t dv_ind, uint16_t* clock_frequency_value);
5415 
5433 rsmi_dev_metrics_avg_dclock1_frequency_get(uint32_t dv_ind, uint16_t* clock_frequency_value);
5434 
5452 rsmi_dev_metrics_volt_soc_get(uint32_t dv_ind, uint16_t* voltage_value);
5453 
5471 rsmi_dev_metrics_volt_gfx_get(uint32_t dv_ind, uint16_t* voltage_value);
5472 
5490 rsmi_dev_metrics_volt_mem_get(uint32_t dv_ind, uint16_t* voltage_value);
5491 
5510 
5528 rsmi_dev_metrics_xcd_counter_get(uint32_t dv_ind, uint16_t* xcd_counter_value);
5529 
5542 rsmi_dev_metrics_log_get(uint32_t dv_ind);
5543  // end of DevMetricsHeaderInfoGet
5545 
5546 #ifdef __cplusplus
5547 }
5548 #endif // __cplusplus
5549 #endif // ROCM_SMI_ROCM_SMI_H_
rsmi_status_t rsmi_func_iter_value_get(rsmi_func_id_iter_handle_t handle, rsmi_func_id_value_t *value)
Get the value associated with a function/variant iterator.
rsmi_status_t rsmi_dev_supported_variant_iterator_open(rsmi_func_id_iter_handle_t obj_h, rsmi_func_id_iter_handle_t *var_iter)
Get a variant iterator for a given handle.
rsmi_status_t rsmi_func_iter_next(rsmi_func_id_iter_handle_t handle)
Advance a function identifer iterator.
rsmi_status_t rsmi_dev_supported_func_iterator_close(rsmi_func_id_iter_handle_t *handle)
Close a variant iterator handle.
rsmi_status_t rsmi_dev_supported_func_iterator_open(uint32_t dv_ind, rsmi_func_id_iter_handle_t *handle)
Get a function name iterator of supported RSMI functions for a device.
rsmi_status_t rsmi_dev_compute_partition_reset(uint32_t dv_ind)
Reverts a selected device's compute partition setting back to its boot state.
rsmi_status_t rsmi_dev_compute_partition_set(uint32_t dv_ind, rsmi_compute_partition_type_t compute_partition)
Modifies a selected device's compute partition setting.
rsmi_status_t rsmi_dev_compute_partition_get(uint32_t dv_ind, char *compute_partition, uint32_t len)
Retrieves the current compute partitioning for a desired device.
rsmi_status_t rsmi_dev_ecc_status_get(uint32_t dv_ind, rsmi_gpu_block_t block, rsmi_ras_err_state_t *state)
Retrieve the ECC status for a GPU block.
rsmi_status_t rsmi_dev_ecc_enabled_get(uint32_t dv_ind, uint64_t *enabled_blocks)
Retrieve the enabled ECC bit-mask.
rsmi_status_t rsmi_dev_ecc_count_get(uint32_t dv_ind, rsmi_gpu_block_t block, rsmi_error_count_t *ec)
Retrieve the error counts for a GPU block.
rsmi_status_t rsmi_status_string(rsmi_status_t status, const char **status_string)
Get a description of a provided RSMI error status.
rsmi_status_t rsmi_event_notification_stop(uint32_t dv_ind)
Close any file handles and free any resources used by event notification for a GPU.
rsmi_status_t rsmi_event_notification_get(int timeout_ms, uint32_t *num_elem, rsmi_evt_notification_data_t *data)
Collect event notifications, waiting a specified amount of time.
rsmi_status_t rsmi_event_notification_init(uint32_t dv_ind)
Prepare to collect event notifications for a GPU.
rsmi_status_t rsmi_event_notification_mask_set(uint32_t dv_ind, uint64_t mask)
Specify which events to collect for a device.
rsmi_status_t rsmi_dev_metrics_curr_fan_speed_get(uint32_t dv_ind, uint16_t *fan_speed_value)
Get the 'curr_fan_speed' from the GPU metrics associated with the device.
rsmi_status_t rsmi_dev_metrics_avg_dclock1_frequency_get(uint32_t dv_ind, uint16_t *clock_frequency_value)
Get the 'avg_dclock1_frequency' from the GPU metrics associated with the device.
rsmi_status_t rsmi_dev_metrics_volt_mem_get(uint32_t dv_ind, uint16_t *voltage_value)
Get the 'volt_mem' from the GPU metrics associated with the device.
rsmi_status_t rsmi_dev_metrics_volt_gfx_get(uint32_t dv_ind, uint16_t *voltage_value)
Get the 'volt_gfx' from the GPU metrics associated with the device.
rsmi_status_t rsmi_dev_metrics_temp_hotspot_get(uint32_t dv_ind, uint16_t *hotspot_value)
Get the 'temp_hotspot' from the GPU metrics associated with the device.
rsmi_status_t rsmi_dev_metrics_pcie_replay_count_acc_get(uint32_t dv_ind, uint64_t *pcie_count_acc_value)
Get the 'pcie_replay_count_acc' from the GPU metrics associated with the device.
rsmi_status_t rsmi_dev_metrics_gfx_activity_acc_get(uint32_t dv_ind, uint32_t *gfx_activity_acc_value)
Get the 'gfx_activity_acc' from the GPU metrics associated with the device.
rsmi_status_t rsmi_dev_metrics_avg_gfx_activity_get(uint32_t dv_ind, uint16_t *gfx_activity_value)
Get the 'avg_gfx_activity' from the GPU metrics associated with the device.
rsmi_status_t rsmi_dev_metrics_pcie_bandwidth_acc_get(uint32_t dv_ind, uint64_t *pcie_bandwidth_acc_value)
Get the 'pcie_bandwidth_acc' from the GPU metrics associated with the device.
rsmi_status_t rsmi_dev_metrics_curr_socket_power_get(uint32_t dv_ind, uint16_t *socket_power_value)
Get the 'curr_socket_power' from the GPU metrics associated with the device.
uint16_t GPUMetricTempHbm_t[RSMI_NUM_HBM_INSTANCES]
Definition: rocm_smi.h:4447
rsmi_status_t rsmi_dev_metrics_avg_soc_clock_frequency_get(uint32_t dv_ind, uint16_t *clock_frequency_value)
Get the 'avg_soc_clock_frequency' from the GPU metrics associated with the device.
rsmi_status_t rsmi_dev_metrics_pcie_bandwidth_inst_get(uint32_t dv_ind, uint64_t *pcie_bandwidth_inst_value)
Get the 'pcie_bandwidth_inst' from the GPU metrics associated with the device.
rsmi_status_t rsmi_dev_metrics_temp_vrmem_get(uint32_t dv_ind, uint16_t *vrmem_value)
Get the 'temp_vrmem' from the GPU metrics associated with the device.
rsmi_status_t rsmi_dev_metrics_curr_socclk_get(uint32_t dv_ind, GPUMetricCurrSocClk_t *current_socclk_value)
Get the 'curr_socclk' from the GPU metrics associated with the device.
rsmi_status_t rsmi_dev_metrics_xgmi_link_speed_get(uint32_t dv_ind, uint16_t *xgmi_link_speed_value)
Get the 'xgmi_link_speed' from the GPU metrics associated with the device.
rsmi_status_t rsmi_dev_metrics_throttle_status_get(uint32_t dv_ind, uint32_t *throttle_status_value)
Get the 'throttle_status' from the GPU metrics associated with the device.
rsmi_status_t rsmi_dev_metrics_curr_vclk1_get(uint32_t dv_ind, uint16_t *current_vclk_value)
Get the 'curr_vclk1' from the GPU metrics associated with the device.
rsmi_status_t rsmi_dev_metrics_system_clock_counter_get(uint32_t dv_ind, uint64_t *system_clock_counter_value)
Get the 'system_clock_counter' from the GPU metrics associated with the device.
rsmi_status_t rsmi_dev_metrics_pcie_l0_recov_count_acc_get(uint32_t dv_ind, uint64_t *pcie_count_acc_value)
Get the 'pcie_l0_recov_count_acc' from the GPU metrics associated with the device.
rsmi_status_t rsmi_dev_metrics_curr_dclk1_get(uint32_t dv_ind, uint16_t *current_dclk_value)
Get the 'curr_dclk1' from the GPU metrics associated with the device.
rsmi_status_t rsmi_dev_metrics_pcie_link_speed_get(uint32_t dv_ind, uint16_t *pcie_link_speed_value)
Get the 'pcie_link_speed' from the GPU metrics associated with the device.
rsmi_status_t rsmi_dev_metrics_vcn_activity_get(uint32_t dv_ind, GPUMetricVcnActivity_t *vcn_activity_value)
Get the 'vcn_activity' from the GPU metrics associated with the device.
rsmi_status_t rsmi_dev_metrics_volt_soc_get(uint32_t dv_ind, uint16_t *voltage_value)
Get the 'volt_soc' from the GPU metrics associated with the device.
rsmi_status_t rsmi_dev_metrics_gfxclk_lock_status_get(uint32_t dv_ind, uint32_t *gfxclk_lock_status_value)
Get the 'gfxclk_lock_status' from the GPU metrics associated with the device.
rsmi_status_t rsmi_dev_metrics_temp_edge_get(uint32_t dv_ind, uint16_t *edge_value)
Get the 'temp_edge' from the GPU metrics associated with the device.
rsmi_status_t rsmi_dev_metrics_xgmi_link_width_get(uint32_t dv_ind, uint16_t *xgmi_link_width_value)
Get the 'xgmi_link_width' from the GPU metrics associated with the device.
rsmi_status_t rsmi_dev_metrics_avg_gfx_clock_frequency_get(uint32_t dv_ind, uint16_t *clock_frequency_value)
Get the 'avg_gfx_clock_frequency' from the GPU metrics associated with the device.
rsmi_status_t rsmi_dev_metrics_mem_activity_acc_get(uint32_t dv_ind, uint32_t *mem_activity_acc_value)
Get the 'mem_activity_acc' from the GPU metrics associated with the device.
rsmi_status_t rsmi_dev_metrics_avg_mm_activity_get(uint32_t dv_ind, uint16_t *mm_activity_value)
Get the 'avg_mm_activity' from the GPU metrics associated with the device.
rsmi_status_t rsmi_dev_metrics_pcie_link_width_get(uint32_t dv_ind, uint16_t *pcie_link_width_value)
Get the 'pcie_link_width' from the GPU metrics associated with the device.
rsmi_status_t rsmi_dev_metrics_xgmi_read_data_get(uint32_t dv_ind, GPUMetricXgmiReadDataAcc_t *xgmi_read_data_acc_value)
Get the 'xgmi_read_data' from the GPU metrics associated with the device.
rsmi_status_t rsmi_dev_metrics_avg_dclock0_frequency_get(uint32_t dv_ind, uint16_t *clock_frequency_value)
Get the 'avg_dclock0_frequency' from the GPU metrics associated with the device.
rsmi_status_t rsmi_dev_metrics_curr_gfxclk_get(uint32_t dv_ind, GPUMetricCurrGfxClk_t *current_gfxclk_value)
Get the 'curr_gfxclk' from the GPU metrics associated with the device.
rsmi_status_t rsmi_dev_metrics_xcd_counter_get(uint32_t dv_ind, uint16_t *xcd_counter_value)
Get the 'xcd_counter' from the GPU metrics associated with the device.
rsmi_status_t rsmi_dev_metrics_temp_vrsoc_get(uint32_t dv_ind, uint16_t *vrsoc_value)
Get the 'temp_vrsoc' from the GPU metrics associated with the device.
rsmi_status_t rsmi_dev_metrics_temp_mem_get(uint32_t dv_ind, uint16_t *mem_value)
Get the 'temp_mem' from the GPU metrics associated with the device.
rsmi_status_t rsmi_dev_metrics_header_info_get(uint32_t dv_ind, metrics_table_header_t *header_value)
Get the 'metrics_header_info' from the GPU metrics associated with the device.
rsmi_status_t rsmi_dev_metrics_pcie_replay_rover_count_acc_get(uint32_t dv_ind, uint64_t *pcie_count_acc_value)
Get the 'pcie_replay_rover_count_acc' from the GPU metrics associated with the device.
rsmi_status_t rsmi_dev_metrics_indep_throttle_status_get(uint32_t dv_ind, uint64_t *throttle_status_value)
Get the 'indep_throttle_status' from the GPU metrics associated with the device.
rsmi_status_t rsmi_dev_metrics_pcie_nak_sent_count_acc_get(uint32_t dv_ind, uint32_t *pcie_nak_sent_count_acc_value)
Get the 'pcie_nak_sent_count_acc' from the GPU metrics associated with the device.
rsmi_status_t rsmi_dev_metrics_temp_hbm_get(uint32_t dv_ind, GPUMetricTempHbm_t *temp_hbm_value)
Get the 'temp_hbm' from the GPU metrics associated with the device.
rsmi_status_t rsmi_dev_metrics_curr_dclk0_get(uint32_t dv_ind, GPUMetricCurrDClk0_t *current_dclk_value)
Get the 'curr_dclk0' from the GPU metrics associated with the device.
rsmi_status_t rsmi_dev_metrics_avg_socket_power_get(uint32_t dv_ind, uint16_t *socket_power_value)
Get the 'avg_socket_power' from the GPU metrics associated with the device.
rsmi_status_t rsmi_dev_metrics_avg_umc_activity_get(uint32_t dv_ind, uint16_t *umc_activity_value)
Get the 'avg_umc_activity' from the GPU metrics associated with the device.
rsmi_status_t rsmi_dev_metrics_avg_vclock0_frequency_get(uint32_t dv_ind, uint16_t *clock_frequency_value)
Get the 'avg_vclock0_frequency' from the GPU metrics associated with the device.
rsmi_status_t rsmi_dev_metrics_pcie_nak_rcvd_count_acc_get(uint32_t dv_ind, uint32_t *pcie_nak_rcvd_count_acc_value)
Get the 'pcie_nak_rcvd_count_acc' from the GPU metrics associated with the device.
rsmi_status_t rsmi_dev_metrics_temp_vrgfx_get(uint32_t dv_ind, uint16_t *vrgfx_value)
Get the 'temp_vrgfx' from the GPU metrics associated with the device.
rsmi_status_t rsmi_dev_metrics_energy_acc_get(uint32_t dv_ind, uint64_t *energy_acc_value)
Get the 'energy_acc' from the GPU metrics associated with the device.
rsmi_status_t rsmi_dev_metrics_avg_uclock_frequency_get(uint32_t dv_ind, uint16_t *clock_frequency_value)
Get the 'avg_uclock_frequency' from the GPU metrics associated with the device.
rsmi_status_t rsmi_dev_metrics_curr_uclk_get(uint32_t dv_ind, uint16_t *uclk_value)
Get the 'curr_uclk' from the GPU metrics associated with the device.
rsmi_status_t rsmi_dev_metrics_avg_vclock1_frequency_get(uint32_t dv_ind, uint16_t *clock_frequency_value)
Get the 'avg_vclock1_frequency' from the GPU metrics associated with the device.
rsmi_status_t rsmi_dev_metrics_firmware_timestamp_get(uint32_t dv_ind, uint64_t *firmware_timestamp_value)
Get the 'firmware_timestamp' from the GPU metrics associated with the device.
rsmi_status_t rsmi_dev_metrics_log_get(uint32_t dv_ind)
Get the log from the GPU metrics associated with the device.
rsmi_status_t rsmi_dev_metrics_curr_vclk0_get(uint32_t dv_ind, GPUMetricCurrVClk0_t *current_vclk_value)
Get the 'curr_vclk0' from the GPU metrics associated with the device.
rsmi_status_t rsmi_dev_metrics_xgmi_write_data_get(uint32_t dv_ind, GPUMetricXgmiWriteDataAcc_t *xgmi_write_data_acc_value)
Get the 'xgmi_write_data' from the GPU metrics associated with the device.
rsmi_status_t rsmi_dev_metrics_jpeg_activity_get(uint32_t dv_ind, GPUMetricJpegActivity_t *jpeg_activity_value)
Get the 'jpeg_activity' from the GPU metrics associated with the device.
rsmi_status_t rsmi_topo_get_link_type(uint32_t dv_ind_src, uint32_t dv_ind_dst, uint64_t *hops, RSMI_IO_LINK_TYPE *type)
Retrieve the hops and the connection type between GPU to GPU/CPU.
rsmi_status_t rsmi_topo_get_link_weight(uint32_t dv_ind_src, uint32_t dv_ind_dst, uint64_t *weight)
Retrieve the weight for a connection between 2 GPUs.
rsmi_status_t rsmi_minmax_bandwidth_get(uint32_t dv_ind_src, uint32_t dv_ind_dst, uint64_t *min_bandwidth, uint64_t *max_bandwidth)
Retreive minimal and maximal io link bandwidth between 2 GPUs.
rsmi_status_t rsmi_is_P2P_accessible(uint32_t dv_ind_src, uint32_t dv_ind_dst, bool *accessible)
Return P2P availability status between 2 GPUs.
rsmi_status_t rsmi_topo_get_numa_node_number(uint32_t dv_ind, uint32_t *numa_node)
Retrieve the NUMA CPU node number for a device.
rsmi_status_t rsmi_dev_name_get(uint32_t dv_ind, char *name, size_t len)
Get the name string of a gpu device.
rsmi_status_t rsmi_dev_unique_id_get(uint32_t dv_ind, uint64_t *id)
Get Unique ID.
rsmi_status_t rsmi_num_monitor_devices(uint32_t *num_devices)
Get the number of devices that have monitor information.
rsmi_status_t rsmi_dev_vram_vendor_get(uint32_t dv_ind, char *brand, uint32_t len)
Get the vram vendor string of a gpu device.
rsmi_status_t rsmi_dev_sku_get(uint32_t dv_ind, char *sku)
Get the SKU for a desired device associated with the device with provided device index.
rsmi_status_t rsmi_dev_drm_render_minor_get(uint32_t dv_ind, uint32_t *minor)
Get the drm minor number associated with this device.
rsmi_status_t rsmi_dev_subsystem_id_get(uint32_t dv_ind, uint16_t *id)
Get the subsystem device id associated with the device with provided device index.
rsmi_status_t rsmi_dev_xgmi_physical_id_get(uint32_t dv_ind, uint16_t *id)
Get the XGMI physical id associated with the device.
rsmi_status_t rsmi_dev_serial_number_get(uint32_t dv_ind, char *serial_num, uint32_t len)
Get the serial number string for a device.
rsmi_status_t rsmi_dev_vendor_name_get(uint32_t dv_ind, char *name, size_t len)
Get the name string for a give vendor ID.
rsmi_status_t rsmi_dev_brand_get(uint32_t dv_ind, char *brand, uint32_t len)
Get the brand string of a gpu device.
rsmi_status_t rsmi_dev_id_get(uint32_t dv_ind, uint16_t *id)
Get the device id associated with the device with provided device index.
rsmi_status_t rsmi_dev_subsystem_name_get(uint32_t dv_ind, char *name, size_t len)
Get the name string for the device subsytem.
rsmi_status_t rsmi_dev_revision_get(uint32_t dv_ind, uint16_t *revision)
Get the device revision associated with the device.
rsmi_status_t rsmi_dev_subsystem_vendor_id_get(uint32_t dv_ind, uint16_t *id)
Get the device subsystem vendor id associated with the device with provided device index.
rsmi_status_t rsmi_dev_vendor_id_get(uint32_t dv_ind, uint16_t *id)
Get the device vendor id associated with the device with provided device index.
rsmi_status_t rsmi_init(uint64_t init_flags)
Initialize ROCm SMI.
rsmi_status_t rsmi_shut_down(void)
Shutdown ROCm SMI.
rsmi_status_t rsmi_dev_memory_total_get(uint32_t dv_ind, rsmi_memory_type_t mem_type, uint64_t *total)
Get the total amount of memory that exists.
rsmi_status_t rsmi_dev_memory_usage_get(uint32_t dv_ind, rsmi_memory_type_t mem_type, uint64_t *used)
Get the current memory usage.
rsmi_status_t rsmi_dev_memory_reserved_pages_get(uint32_t dv_ind, uint32_t *num_pages, rsmi_retired_page_record_t *records)
Get information about reserved ("retired") memory pages.
rsmi_status_t rsmi_dev_memory_busy_percent_get(uint32_t dv_ind, uint32_t *busy_percent)
Get percentage of time any device memory is being used.
rsmi_status_t rsmi_dev_pci_bandwidth_set(uint32_t dv_ind, uint64_t bw_bitmask)
Control the set of allowed PCIe bandwidths that can be used.
rsmi_status_t rsmi_dev_pci_throughput_get(uint32_t dv_ind, uint64_t *sent, uint64_t *received, uint64_t *max_pkt_sz)
Get PCIe traffic information.
rsmi_status_t rsmi_dev_pci_bandwidth_get(uint32_t dv_ind, rsmi_pcie_bandwidth_t *bandwidth)
Get the list of possible PCIe bandwidths that are available.
rsmi_status_t rsmi_topo_numa_affinity_get(uint32_t dv_ind, int32_t *numa_node)
Get the NUMA node associated with a device.
rsmi_status_t rsmi_dev_pci_replay_counter_get(uint32_t dv_ind, uint64_t *counter)
Get PCIe replay counter.
rsmi_status_t rsmi_dev_pci_id_get(uint32_t dv_ind, uint64_t *bdfid)
Get the unique PCI device identifier associated for a device.
rsmi_status_t rsmi_counter_control(rsmi_event_handle_t evt_handle, rsmi_counter_command_t cmd, void *cmd_args)
Issue performance counter control commands.
rsmi_status_t rsmi_counter_read(rsmi_event_handle_t evt_handle, rsmi_counter_value_t *value)
Read the current value of a performance counter.
rsmi_status_t rsmi_counter_available_counters_get(uint32_t dv_ind, rsmi_event_group_t grp, uint32_t *available)
Get the number of currently available counters.
rsmi_status_t rsmi_dev_counter_destroy(rsmi_event_handle_t evnt_handle)
Deallocate a performance counter object.
rsmi_status_t rsmi_dev_counter_create(uint32_t dv_ind, rsmi_event_type_t type, rsmi_event_handle_t *evnt_handle)
Create a performance counter object.
rsmi_status_t rsmi_dev_counter_group_supported(uint32_t dv_ind, rsmi_event_group_t group)
Tell if an event group is supported by a given device.
rsmi_status_t rsmi_dev_overdrive_level_set_v1(uint32_t dv_ind, uint32_t od)
Set the overdrive percent associated with the device with provided device index with the provided val...
rsmi_status_t rsmi_dev_perf_level_set(uint32_t dv_ind, rsmi_dev_perf_level_t perf_lvl)
Set the PowerPlay performance level associated with the device with provided device index with the pr...
rsmi_status_t rsmi_dev_overdrive_level_set(uint32_t dv_ind, uint32_t od)
Set the overdrive percent associated with the device with provided device index with the provided val...
rsmi_status_t rsmi_dev_gpu_clk_freq_set(uint32_t dv_ind, rsmi_clk_type_t clk_type, uint64_t freq_bitmask)
Control the set of allowed frequencies that can be used for the specified clock.
rsmi_status_t rsmi_dev_perf_level_set_v1(uint32_t dv_ind, rsmi_dev_perf_level_t perf_lvl)
Set the PowerPlay performance level associated with the device with provided device index with the pr...
rsmi_status_t rsmi_dev_clk_range_set(uint32_t dv_ind, uint64_t minclkvalue, uint64_t maxclkvalue, rsmi_clk_type_t clkType)
This function sets the clock range information.
rsmi_status_t rsmi_dev_od_volt_curve_regions_get(uint32_t dv_ind, uint32_t *num_regions, rsmi_freq_volt_region_t *buffer)
This function will retrieve the current valid regions in the frequency/voltage space.
rsmi_status_t rsmi_dev_power_profile_presets_get(uint32_t dv_ind, uint32_t sensor_ind, rsmi_power_profile_status_t *status)
Get the list of available preset power profiles and an indication of which profile is currently activ...
rsmi_status_t rsmi_dev_od_clk_info_set(uint32_t dv_ind, rsmi_freq_ind_t level, uint64_t clkvalue, rsmi_clk_type_t clkType)
This function sets the clock frequency information.
rsmi_status_t rsmi_dev_perf_level_get(uint32_t dv_ind, rsmi_dev_perf_level_t *perf)
Get the performance level of the device with provided device index.
rsmi_status_t rsmi_dev_gpu_reset(uint32_t dv_ind)
Reset the gpu associated with the device with provided device index.
rsmi_status_t rsmi_dev_activity_metric_get(uint32_t dv_ind, rsmi_activity_metric_t activity_metric_type, rsmi_activity_metric_counter_t *activity_metric_counter)
Get activity metric average utilization counter of the specified device.
rsmi_status_t rsmi_dev_od_volt_info_get(uint32_t dv_ind, rsmi_od_volt_freq_data_t *odv)
This function retrieves the voltage/frequency curve information.
rsmi_status_t rsmi_dev_gpu_metrics_info_get(uint32_t dv_ind, rsmi_gpu_metrics_t *pgpu_metrics)
This function retrieves the gpu metrics information.
rsmi_status_t rsmi_perf_determinism_mode_set(uint32_t dv_ind, uint64_t clkvalue)
Enter performance determinism mode with provided device index.
rsmi_status_t rsmi_utilization_count_get(uint32_t dv_ind, rsmi_utilization_counter_t utilization_counters[], uint32_t count, uint64_t *timestamp)
Get coarse grain utilization counter of the specified device.
rsmi_status_t rsmi_dev_clk_extremum_set(uint32_t dv_ind, rsmi_freq_ind_t level, uint64_t clkvalue, rsmi_clk_type_t clkType)
This function sets the clock min/max level.
rsmi_status_t rsmi_dev_od_volt_info_set(uint32_t dv_ind, uint32_t vpoint, uint64_t clkvalue, uint64_t voltvalue)
This function sets 1 of the 3 voltage curve points.
rsmi_status_t rsmi_dev_overdrive_level_get(uint32_t dv_ind, uint32_t *od)
Get the overdrive percent associated with the device with provided device index.
rsmi_status_t rsmi_dev_gpu_clk_freq_get(uint32_t dv_ind, rsmi_clk_type_t clk_type, rsmi_frequencies_t *f)
Get the list of possible system clock speeds of device for a specified clock type.
rsmi_status_t rsmi_dev_activity_avg_mm_get(uint32_t dv_ind, uint16_t *avg_activity)
Get activity metric bandwidth average utilization counter of the specified device.
rsmi_status_t rsmi_dev_mem_overdrive_level_get(uint32_t dv_ind, uint32_t *od)
Get the memory clock overdrive percent associated with the device with provided device index.
rsmi_status_t rsmi_dev_busy_percent_get(uint32_t dv_ind, uint32_t *busy_percent)
Get percentage of time device is busy doing any processing.
rsmi_status_t rsmi_dev_fan_speed_set(uint32_t dv_ind, uint32_t sensor_ind, uint64_t speed)
Set the fan speed for the specified device with the provided speed, in RPMs.
rsmi_status_t rsmi_dev_fan_reset(uint32_t dv_ind, uint32_t sensor_ind)
Reset the fan to automatic driver control.
rsmi_status_t rsmi_dev_volt_metric_get(uint32_t dv_ind, rsmi_voltage_type_t sensor_type, rsmi_voltage_metric_t metric, int64_t *voltage)
Get the voltage metric value for the specified metric, from the specified voltage sensor on the speci...
rsmi_status_t rsmi_dev_temp_metric_get(uint32_t dv_ind, uint32_t sensor_type, rsmi_temperature_metric_t metric, int64_t *temperature)
Get the temperature metric value for the specified metric, from the specified temperature sensor on t...
rsmi_status_t rsmi_dev_fan_speed_max_get(uint32_t dv_ind, uint32_t sensor_ind, uint64_t *max_speed)
Get the max. fan speed of the device with provided device index.
rsmi_status_t rsmi_dev_fan_rpms_get(uint32_t dv_ind, uint32_t sensor_ind, int64_t *speed)
Get the fan speed in RPMs of the device with the specified device index and 0-based sensor index.
rsmi_status_t rsmi_dev_fan_speed_get(uint32_t dv_ind, uint32_t sensor_ind, int64_t *speed)
Get the fan speed for the specified device as a value relative to RSMI_MAX_FAN_SPEED.
rsmi_status_t rsmi_dev_power_cap_set(uint32_t dv_ind, uint32_t sensor_ind, uint64_t cap)
Set the power cap value.
rsmi_status_t rsmi_dev_power_profile_set(uint32_t dv_ind, uint32_t reserved, rsmi_power_profile_preset_masks_t profile)
Set the power profile.
rsmi_status_t rsmi_dev_energy_count_get(uint32_t dv_ind, uint64_t *power, float *counter_resolution, uint64_t *timestamp)
Get the energy accumulator counter of the device with provided device index.
rsmi_status_t rsmi_dev_power_cap_default_get(uint32_t dv_ind, uint64_t *default_cap)
Get the default power cap for the device specified by dv_ind.
rsmi_status_t rsmi_dev_power_ave_get(uint32_t dv_ind, uint32_t sensor_ind, uint64_t *power)
Get the average power consumption of the device with provided device index.
rsmi_status_t rsmi_dev_power_get(uint32_t dv_ind, uint64_t *power, RSMI_POWER_TYPE *type)
A generic get which attempts to retieve current socket power (also known as instant power) of the dev...
rsmi_status_t rsmi_dev_power_cap_get(uint32_t dv_ind, uint32_t sensor_ind, uint64_t *cap)
Get the cap on power which, when reached, causes the system to take action to reduce power.
rsmi_status_t rsmi_dev_power_cap_range_get(uint32_t dv_ind, uint32_t sensor_ind, uint64_t *max, uint64_t *min)
Get the range of valid values for the power cap.
rsmi_status_t rsmi_dev_current_socket_power_get(uint32_t dv_ind, uint64_t *socket_power)
Get the current socket power (also known as instant power) of the device index provided.
rsmi_status_t rsmi_compute_process_info_by_device_get(uint32_t pid, uint32_t dv_ind, rsmi_process_info_t *proc)
Get the info of a process on a specific device.
rsmi_status_t rsmi_compute_process_gpus_get(uint32_t pid, uint32_t *dv_indices, uint32_t *num_devices)
Get the device indices currently being used by a process.
rsmi_status_t rsmi_compute_process_info_by_pid_get(uint32_t pid, rsmi_process_info_t *proc)
Get process information about a specific process.
rsmi_status_t rsmi_compute_process_info_get(rsmi_process_info_t *procs, uint32_t *num_items)
Get process information about processes currently using GPU.
rsmi_status_t rsmi_version_get(rsmi_version_t *version)
Get the build version information for the currently running build of RSMI.
rsmi_status_t rsmi_dev_vbios_version_get(uint32_t dv_ind, char *vbios, uint32_t len)
Get the VBIOS identifer string.
rsmi_status_t rsmi_dev_firmware_version_get(uint32_t dv_ind, rsmi_fw_block_t block, uint64_t *fw_version)
Get the firmware versions for a device.
rsmi_status_t rsmi_version_str_get(rsmi_sw_component_t component, char *ver_str, uint32_t len)
Get the driver version string for the current system.
rsmi_status_t rsmi_dev_target_graphics_version_get(uint32_t dv_ind, uint64_t *gfx_version)
Get the graphics version for a GPU device.
rsmi_status_t rsmi_dev_xgmi_error_status(uint32_t dv_ind, rsmi_xgmi_status_t *status)
Retrieve the XGMI error status for a device.
rsmi_status_t rsmi_dev_xgmi_error_reset(uint32_t dv_ind)
Reset the XGMI error status for a device.
rsmi_status_t rsmi_dev_xgmi_hive_id_get(uint32_t dv_ind, uint64_t *hive_id)
Retrieve the XGMI hive id for a device.
rsmi_status_t rsmi_dev_memory_partition_get(uint32_t dv_ind, char *memory_partition, uint32_t len)
Retrieves the current memory partition for a desired device.
rsmi_status_t rsmi_dev_memory_partition_set(uint32_t dv_ind, rsmi_memory_partition_type_t memory_partition)
Modifies a selected device's current memory partition setting.
rsmi_status_t rsmi_dev_memory_partition_reset(uint32_t dv_ind)
Reverts a selected device's memory partition setting back to its boot state.
rsmi_activity_metric_t
Activity (Utilization) Metrics. This enum is used to identify various activity metrics.
Definition: rocm_smi.h:476
@ RSMI_ACTIVITY_UMC
memory controller
Definition: rocm_smi.h:479
@ RSMI_ACTIVITY_MM
UVD or VCN.
Definition: rocm_smi.h:480
struct rsmi_func_id_iter_handle * rsmi_func_id_iter_handle_t
Opaque handle to function-support object.
Definition: rocm_smi.h:1141
rsmi_memory_page_status_t
Reserved Memory Page States.
Definition: rocm_smi.h:670
@ RSMI_MEM_PAGE_STATUS_UNRESERVABLE
Unable to reserve this page.
Definition: rocm_smi.h:676
@ RSMI_MEM_PAGE_STATUS_PENDING
Definition: rocm_smi.h:673
@ RSMI_MEM_PAGE_STATUS_RESERVED
Definition: rocm_smi.h:671
rsmi_status_t
Error codes retured by rocm_smi_lib functions.
Definition: rocm_smi.h:87
@ RSMI_STATUS_UNEXPECTED_DATA
Definition: rocm_smi.h:124
@ RSMI_STATUS_REFCOUNT_OVERFLOW
Definition: rocm_smi.h:129
@ RSMI_STATUS_NOT_FOUND
Definition: rocm_smi.h:114
@ RSMI_STATUS_UNKNOWN_ERROR
An unknown error occurred.
Definition: rocm_smi.h:136
@ RSMI_STATUS_INIT_ERROR
Definition: rocm_smi.h:106
@ RSMI_STATUS_SETTING_UNAVAILABLE
Definition: rocm_smi.h:131
@ RSMI_STATUS_INSUFFICIENT_SIZE
Definition: rocm_smi.h:116
@ RSMI_STATUS_INVALID_ARGS
Passed in arguments are not valid.
Definition: rocm_smi.h:89
@ RSMI_STATUS_NOT_SUPPORTED
Definition: rocm_smi.h:90
@ RSMI_STATUS_NO_DATA
Definition: rocm_smi.h:122
@ RSMI_STATUS_UNEXPECTED_SIZE
Definition: rocm_smi.h:120
@ RSMI_STATUS_AMDGPU_RESTART_ERR
Definition: rocm_smi.h:133
@ RSMI_STATUS_FILE_ERROR
Definition: rocm_smi.h:93
@ RSMI_STATUS_BUSY
Definition: rocm_smi.h:126
@ RSMI_STATUS_NOT_YET_IMPLEMENTED
Definition: rocm_smi.h:110
@ RSMI_STATUS_OUT_OF_RESOURCES
Definition: rocm_smi.h:101
@ RSMI_STATUS_INTERRUPT
Definition: rocm_smi.h:118
@ RSMI_STATUS_INTERNAL_EXCEPTION
An internal exception was caught.
Definition: rocm_smi.h:103
@ RSMI_STATUS_SUCCESS
Operation was successful.
Definition: rocm_smi.h:88
@ RSMI_STATUS_INPUT_OUT_OF_BOUNDS
Definition: rocm_smi.h:104
@ RSMI_STATUS_PERMISSION
Definition: rocm_smi.h:98
RSMI_UTILIZATION_COUNTER_TYPE
The utilization counter type.
Definition: rocm_smi.h:697
@ RSMI_COARSE_GRAIN_MEM_ACTIVITY
Memory Activity.
Definition: rocm_smi.h:701
@ RSMI_UTILIZATION_COUNTER_FIRST
GFX Activity.
Definition: rocm_smi.h:698
_RSMI_IO_LINK_TYPE
Types for IO Link.
Definition: rocm_smi.h:682
@ RSMI_IOLINK_TYPE_XGMI
XGMI.
Definition: rocm_smi.h:685
@ RSMI_IOLINK_TYPE_UNDEFINED
unknown type.
Definition: rocm_smi.h:683
@ RSMI_IOLINK_TYPE_PCIEXPRESS
PCI Express.
Definition: rocm_smi.h:684
@ RSMI_IOLINK_TYPE_SIZE
Max of IO Link types.
Definition: rocm_smi.h:687
@ RSMI_IOLINK_TYPE_NUMIOLINKTYPES
Number of IO Link types.
Definition: rocm_smi.h:686
rsmi_sw_component_t
Available clock types.
Definition: rocm_smi.h:191
@ RSMI_SW_COMP_DRIVER
Driver.
Definition: rocm_smi.h:194
rsmi_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: rocm_smi.h:214
@ RSMI_EVNT_GRP_XGMI
Data Fabric (XGMI) related events.
Definition: rocm_smi.h:215
@ RSMI_EVNT_GRP_XGMI_DATA_OUT
XGMI Outbound data.
Definition: rocm_smi.h:216
#define MAX_EVENT_NOTIFICATION_MSG_SIZE
Maximum number of characters an event notification message will be.
Definition: rocm_smi.h:328
#define RSMI_MAX_NUM_CLKS
This should match kRSMI_MAX_NUM_CLKS.
Definition: rocm_smi.h:952
#define RSMI_MAX_NUM_JPEG_ENGS
This should match kRSMI_MAX_JPEG_ENGINES.
Definition: rocm_smi.h:947
rsmi_dev_perf_level_t
PowerPlay performance levels.
Definition: rocm_smi.h:158
@ RSMI_DEV_PERF_LEVEL_LOW
Definition: rocm_smi.h:162
@ RSMI_DEV_PERF_LEVEL_MANUAL
Definition: rocm_smi.h:166
@ RSMI_DEV_PERF_LEVEL_STABLE_MIN_MCLK
Definition: rocm_smi.h:171
@ RSMI_DEV_PERF_LEVEL_UNKNOWN
Unknown performance level.
Definition: rocm_smi.h:179
@ RSMI_DEV_PERF_LEVEL_DETERMINISM
Performance determinism state.
Definition: rocm_smi.h:175
@ RSMI_DEV_PERF_LEVEL_HIGH
Definition: rocm_smi.h:164
@ RSMI_DEV_PERF_LEVEL_STABLE_STD
Definition: rocm_smi.h:168
@ RSMI_DEV_PERF_LEVEL_STABLE_PEAK
Stable power state with peak clocks.
Definition: rocm_smi.h:170
@ RSMI_DEV_PERF_LEVEL_STABLE_MIN_SCLK
Definition: rocm_smi.h:173
@ RSMI_DEV_PERF_LEVEL_AUTO
Performance level is "auto".
Definition: rocm_smi.h:159
rsmi_voltage_metric_t
Voltage Metrics. This enum is used to identify various Volatge metrics. Corresponding values will be ...
Definition: rocm_smi.h:489
@ RSMI_VOLT_LOWEST
Historical minimum voltage.
Definition: rocm_smi.h:498
@ RSMI_VOLT_MIN_CRIT
Voltage critical min value.
Definition: rocm_smi.h:494
@ RSMI_VOLT_MAX_CRIT
Voltage critical max value.
Definition: rocm_smi.h:496
@ RSMI_VOLT_CURRENT
Voltage current value.
Definition: rocm_smi.h:490
@ RSMI_VOLT_MIN
Voltage min value.
Definition: rocm_smi.h:495
@ RSMI_VOLT_AVERAGE
Average voltage.
Definition: rocm_smi.h:497
@ RSMI_VOLT_MAX
Voltage max value.
Definition: rocm_smi.h:493
@ RSMI_VOLT_HIGHEST
Historical maximum voltage.
Definition: rocm_smi.h:499
rsmi_evt_notification_type_t
Definition: rocm_smi.h:312
@ RSMI_EVT_NOTIF_VMFAULT
VM page fault.
Definition: rocm_smi.h:313
#define RSMI_NUM_VOLTAGE_CURVE_POINTS
The number of points that make up a voltage-frequency curve definition.
Definition: rocm_smi.h:81
#define RSMI_MAX_NUM_GFX_CLKS
This should match kRSMI_MAX_NUM_GFX_CLKS.
Definition: rocm_smi.h:962
rsmi_xgmi_status_t
XGMI Status.
Definition: rocm_smi.h:653
rsmi_compute_partition_type_t
Compute Partition. This enum is used to identify various compute partitioning settings.
Definition: rocm_smi.h:365
@ RSMI_COMPUTE_PARTITION_SPX
Definition: rocm_smi.h:369
@ RSMI_COMPUTE_PARTITION_DPX
Definition: rocm_smi.h:371
@ RSMI_COMPUTE_PARTITION_QPX
Definition: rocm_smi.h:375
@ RSMI_COMPUTE_PARTITION_TPX
Definition: rocm_smi.h:373
@ RSMI_COMPUTE_PARTITION_CPX
Definition: rocm_smi.h:367
rsmi_voltage_type_t
This ennumeration is used to indicate which type of voltage reading should be obtained.
Definition: rocm_smi.h:508
@ RSMI_VOLT_TYPE_VDDGFX
Definition: rocm_smi.h:511
@ RSMI_VOLT_TYPE_INVALID
Invalid type.
Definition: rocm_smi.h:514
rsmi_temperature_metric_t
Temperature Metrics. This enum is used to identify various temperature metrics. Corresponding values ...
Definition: rocm_smi.h:411
@ RSMI_TEMP_CURRENT
Temperature current value.
Definition: rocm_smi.h:412
@ RSMI_TEMP_LOWEST
Historical minimum temperature.
Definition: rocm_smi.h:443
@ RSMI_TEMP_CRIT_MIN
Definition: rocm_smi.h:435
@ RSMI_TEMP_CRIT_MIN_HYST
Definition: rocm_smi.h:438
@ RSMI_TEMP_MIN
Temperature min value.
Definition: rocm_smi.h:416
@ RSMI_TEMP_MAX
Temperature max value.
Definition: rocm_smi.h:415
@ RSMI_TEMP_EMERGENCY
Definition: rocm_smi.h:428
@ RSMI_TEMP_MAX_HYST
Definition: rocm_smi.h:417
@ RSMI_TEMP_MIN_HYST
Definition: rocm_smi.h:420
@ RSMI_TEMP_CRITICAL_HYST
Definition: rocm_smi.h:425
@ RSMI_TEMP_EMERGENCY_HYST
Definition: rocm_smi.h:432
@ RSMI_TEMP_HIGHEST
Historical maximum temperature.
Definition: rocm_smi.h:444
@ RSMI_TEMP_CRITICAL
Definition: rocm_smi.h:423
@ RSMI_TEMP_OFFSET
Definition: rocm_smi.h:441
rsmi_ras_err_state_t
The current ECC state.
Definition: rocm_smi.h:576
@ RSMI_RAS_ERR_STATE_MULT_UC
Multiple uncorrectable errors.
Definition: rocm_smi.h:581
@ RSMI_RAS_ERR_STATE_POISON
Definition: rocm_smi.h:582
@ RSMI_RAS_ERR_STATE_DISABLED
ECC is disabled.
Definition: rocm_smi.h:578
@ RSMI_RAS_ERR_STATE_PARITY
ECC errors present, but type unknown.
Definition: rocm_smi.h:579
@ RSMI_RAS_ERR_STATE_SING_C
Single correctable error.
Definition: rocm_smi.h:580
@ RSMI_RAS_ERR_STATE_ENABLED
ECC is enabled.
Definition: rocm_smi.h:584
@ RSMI_RAS_ERR_STATE_NONE
No current errors.
Definition: rocm_smi.h:577
#define RSMI_NUM_HBM_INSTANCES
This should match kRSMI_MAX_NUM_HBM_INSTANCES.
Definition: rocm_smi.h:937
rsmi_event_type_t
Event type enum. Events belonging to a particular event group rsmi_event_group_t should begin enumera...
Definition: rocm_smi.h:226
@ RSMI_EVNT_XGMI_1_RESPONSE_TX
Definition: rocm_smi.h:253
@ RSMI_EVNT_XGMI_DATA_OUT_5
Outbound beats to neighbor 5.
Definition: rocm_smi.h:283
@ RSMI_EVNT_XGMI_1_BEATS_TX
Definition: rocm_smi.h:255
@ RSMI_EVNT_XGMI_1_NOP_TX
NOPs sent to neighbor 1.
Definition: rocm_smi.h:250
@ RSMI_EVNT_XGMI_0_NOP_TX
NOPs sent to neighbor 0.
Definition: rocm_smi.h:230
@ RSMI_EVNT_XGMI_1_REQUEST_TX
neighbor 1
Definition: rocm_smi.h:251
@ RSMI_EVNT_XGMI_DATA_OUT_3
Outbound beats to neighbor 3.
Definition: rocm_smi.h:281
@ RSMI_EVNT_XGMI_DATA_OUT_4
Outbound beats to neighbor 4.
Definition: rocm_smi.h:282
@ RSMI_EVNT_XGMI_DATA_OUT_2
Outbound beats to neighbor 2.
Definition: rocm_smi.h:280
@ RSMI_EVNT_XGMI_0_RESPONSE_TX
Definition: rocm_smi.h:233
@ RSMI_EVNT_XGMI_DATA_OUT_1
Outbound beats to neighbor 1.
Definition: rocm_smi.h:279
@ RSMI_EVNT_XGMI_0_BEATS_TX
Data beats sent to neighbor 0; Each beat represents 32 bytes.
Definition: rocm_smi.h:249
@ RSMI_EVNT_XGMI_0_REQUEST_TX
Definition: rocm_smi.h:231
rsmi_freq_ind_t
The values of this enum are used as frequency identifiers.
Definition: rocm_smi.h:606
@ RSMI_FREQ_IND_MAX
Index used for the maximum frequency value.
Definition: rocm_smi.h:608
@ RSMI_FREQ_IND_MIN
Index used for the minimum frequency value.
Definition: rocm_smi.h:607
@ RSMI_FREQ_IND_INVALID
An invalid frequency index.
Definition: rocm_smi.h:609
rsmi_memory_type_t
Types of memory.
Definition: rocm_smi.h:593
@ RSMI_MEM_TYPE_VRAM
VRAM memory.
Definition: rocm_smi.h:596
@ RSMI_MEM_TYPE_GTT
GTT memory.
Definition: rocm_smi.h:598
@ RSMI_MEM_TYPE_VIS_VRAM
VRAM memory that is visible.
Definition: rocm_smi.h:597
rsmi_power_profile_preset_masks_t
Pre-set Profile Selections. These bitmasks can be AND'd with the rsmi_power_profile_status_t....
Definition: rocm_smi.h:523
@ RSMI_PWR_PROF_PRST_LAST
Invalid power profile.
Definition: rocm_smi.h:533
@ RSMI_PWR_PROF_PRST_VIDEO_MASK
Video Power Profile.
Definition: rocm_smi.h:525
@ RSMI_PWR_PROF_PRST_VR_MASK
VR Power Profile.
Definition: rocm_smi.h:528
@ RSMI_PWR_PROF_PRST_CUSTOM_MASK
Custom Power Profile.
Definition: rocm_smi.h:524
@ RSMI_PWR_PROF_PRST_POWER_SAVING_MASK
Power Saving Profile.
Definition: rocm_smi.h:526
@ RSMI_PWR_PROF_PRST_COMPUTE_MASK
Compute Saving Profile.
Definition: rocm_smi.h:527
@ RSMI_PWR_PROF_PRST_BOOTUP_DEFAULT
Default Boot Up Profile.
Definition: rocm_smi.h:532
rsmi_gpu_block_t
This enum is used to identify different GPU blocks.
Definition: rocm_smi.h:545
@ RSMI_GPU_BLOCK_SMN
SMN block.
Definition: rocm_smi.h:559
@ RSMI_GPU_BLOCK_ATHUB
ATHUB block.
Definition: rocm_smi.h:554
@ RSMI_GPU_BLOCK_GFX
GFX block.
Definition: rocm_smi.h:552
@ RSMI_GPU_BLOCK_MMHUB
MMHUB block.
Definition: rocm_smi.h:553
@ RSMI_GPU_BLOCK_FUSE
Fuse block.
Definition: rocm_smi.h:563
@ RSMI_GPU_BLOCK_HDP
HDP block.
Definition: rocm_smi.h:556
@ RSMI_GPU_BLOCK_DF
DF block.
Definition: rocm_smi.h:558
@ RSMI_GPU_BLOCK_SEM
SEM block.
Definition: rocm_smi.h:560
@ RSMI_GPU_BLOCK_INVALID
Definition: rocm_smi.h:546
@ RSMI_GPU_BLOCK_MP1
MP1 block.
Definition: rocm_smi.h:562
@ RSMI_GPU_BLOCK_XGMI_WAFL
XGMI block.
Definition: rocm_smi.h:557
@ RSMI_GPU_BLOCK_UMC
UMC block.
Definition: rocm_smi.h:550
@ RSMI_GPU_BLOCK_LAST
for supported blocks
Definition: rocm_smi.h:565
@ RSMI_GPU_BLOCK_PCIE_BIF
PCIE_BIF block.
Definition: rocm_smi.h:555
@ RSMI_GPU_BLOCK_MP0
MP0 block.
Definition: rocm_smi.h:561
@ RSMI_GPU_BLOCK_SDMA
SDMA block.
Definition: rocm_smi.h:551
#define RSMI_MAX_NUM_VCNS
This should match kRSMI_MAX_NUM_VCNS.
Definition: rocm_smi.h:942
rsmi_fw_block_t
The values of this enum are used to identify the various firmware blocks.
Definition: rocm_smi.h:620
rsmi_init_flags_t
Initialization flags.
Definition: rocm_smi.h:145
@ RSMI_INIT_FLAG_RESRV_TEST1
Reserved for test.
Definition: rocm_smi.h:152
@ RSMI_INIT_FLAG_ALL_GPUS
Definition: rocm_smi.h:146
enum _RSMI_IO_LINK_TYPE RSMI_IO_LINK_TYPE
Types for IO Link.
#define RSMI_MAX_NUM_FREQUENCIES
Definition: rocm_smi.h:74
#define RSMI_MAX_NUM_XGMI_LINKS
This should match kRSMI_MAX_NUM_XGMI_LINKS.
Definition: rocm_smi.h:957
uintptr_t rsmi_event_handle_t
Handle to performance event counter.
Definition: rocm_smi.h:206
rsmi_counter_command_t
Definition: rocm_smi.h:292
@ RSMI_CNTR_CMD_START
Start the counter.
Definition: rocm_smi.h:293
@ RSMI_CNTR_CMD_STOP
Definition: rocm_smi.h:294
uint64_t rsmi_bit_field_t
Bitfield used in various RSMI calls.
Definition: rocm_smi.h:662
rsmi_clk_type_t
Definition: rocm_smi.h:342
@ RSMI_CLK_TYPE_MEM
Memory clock.
Definition: rocm_smi.h:349
@ RSMI_CLK_TYPE_DCEF
Display Controller Engine clock.
Definition: rocm_smi.h:347
@ RSMI_CLK_TYPE_PCIE
PCIE clock.
Definition: rocm_smi.h:350
@ RSMI_CLK_TYPE_SOC
SOC clock.
Definition: rocm_smi.h:348
@ RSMI_CLK_TYPE_DF
Definition: rocm_smi.h:345
@ RSMI_CLK_TYPE_SYS
System clock.
Definition: rocm_smi.h:343
rsmi_memory_partition_type_t
Memory Partitions. This enum is used to identify various memory partition types.
Definition: rocm_smi.h:386
@ RSMI_MEMORY_PARTITION_NPS8
Definition: rocm_smi.h:396
@ RSMI_MEMORY_PARTITION_NPS4
Definition: rocm_smi.h:393
@ RSMI_MEMORY_PARTITION_NPS2
Definition: rocm_smi.h:390
@ RSMI_MEMORY_PARTITION_NPS1
Definition: rocm_smi.h:388
union id rsmi_func_id_value_t
This union holds the value of an rsmi_func_id_iter_handle_t. The value may be a function name,...
RSMI_POWER_TYPE
Power types.
Definition: rocm_smi.h:708
@ RSMI_AVERAGE_POWER
Average Power.
Definition: rocm_smi.h:709
@ RSMI_INVALID_POWER
Invalid / Undetected Power.
Definition: rocm_smi.h:711
@ RSMI_CURRENT_POWER
Current / Instant Power.
Definition: rocm_smi.h:710
rsmi_temperature_type_t
This enumeration is used to indicate from which part of the device a temperature reading should be ob...
Definition: rocm_smi.h:456
@ RSMI_TEMP_TYPE_HBM_2
HBM temperature instance 2.
Definition: rocm_smi.h:465
@ RSMI_TEMP_TYPE_HBM_0
HBM temperature instance 0.
Definition: rocm_smi.h:463
@ RSMI_TEMP_TYPE_HBM_1
HBM temperature instance 1.
Definition: rocm_smi.h:464
@ RSMI_TEMP_TYPE_MEMORY
VRAM temperature.
Definition: rocm_smi.h:462
@ RSMI_TEMP_TYPE_INVALID
Invalid type.
Definition: rocm_smi.h:468
@ RSMI_TEMP_TYPE_EDGE
Edge GPU temperature.
Definition: rocm_smi.h:459
@ RSMI_TEMP_TYPE_JUNCTION
Definition: rocm_smi.h:460
@ RSMI_TEMP_TYPE_HBM_3
HBM temperature instance 3.
Definition: rocm_smi.h:466
The following structures hold the gpu metrics values for a device.
Definition: rocm_smi.h:912
This structure holds information about the possible activity averages. Specifically,...
Definition: rocm_smi.h:816
uint16_t average_mm_activity
UVD or VCN.
Definition: rocm_smi.h:820
uint16_t average_gfx_activity
Average graphics activity.
Definition: rocm_smi.h:818
uint16_t average_umc_activity
memory controller
Definition: rocm_smi.h:819
Definition: rocm_smi.h:301
uint64_t value
Counter value.
Definition: rocm_smi.h:302
uint64_t time_enabled
Definition: rocm_smi.h:303
uint64_t time_running
Definition: rocm_smi.h:305
This structure holds error counts.
Definition: rocm_smi.h:1121
uint64_t correctable_err
Accumulated correctable errors.
Definition: rocm_smi.h:1122
uint64_t uncorrectable_err
Accumulated uncorrectable errors.
Definition: rocm_smi.h:1123
Definition: rocm_smi.h:333
rsmi_evt_notification_type_t event
Event type.
Definition: rocm_smi.h:335
uint32_t dv_ind
Index of device that corresponds to the event.
Definition: rocm_smi.h:334
This structure holds 2 rsmi_range_t's, one for frequency and one for voltage. These 2 ranges indicate...
Definition: rocm_smi.h:862
rsmi_range_t volt_range
The voltage range for this VDDC Curve point.
Definition: rocm_smi.h:864
rsmi_range_t freq_range
The frequency range for this VDDC Curve point.
Definition: rocm_smi.h:863
This structure holds information about clock frequencies.
Definition: rocm_smi.h:764
uint32_t current
Definition: rocm_smi.h:778
uint32_t num_supported
Definition: rocm_smi.h:773
bool has_deep_sleep
Definition: rocm_smi.h:768
Definition: rocm_smi.h:965
This structure represents a point on the frequency-voltage plane.
Definition: rocm_smi.h:849
uint64_t frequency
Frequency coordinate (in Hz)
Definition: rocm_smi.h:850
uint64_t voltage
Voltage coordinate (in mV)
Definition: rocm_smi.h:851
Definition: rocm_smi.h:873
This structure holds the frequency-voltage values for a device.
Definition: rocm_smi.h:887
rsmi_range_t mclk_freq_limits
The range possible of MCLK values.
Definition: rocm_smi.h:892
uint32_t num_regions
The number of voltage curve regions.
Definition: rocm_smi.h:898
rsmi_range_t curr_mclk_range
Definition: rocm_smi.h:889
rsmi_range_t sclk_freq_limits
The range possible of SCLK values.
Definition: rocm_smi.h:891
rsmi_range_t curr_sclk_range
The current SCLK frequency range.
Definition: rocm_smi.h:888
rsmi_od_volt_curve_t curve
The current voltage curve.
Definition: rocm_smi.h:897
This structure holds information about the possible PCIe bandwidths. Specifically,...
Definition: rocm_smi.h:795
rsmi_frequencies_t transfer_rate
Definition: rocm_smi.h:799
This structure contains information about which power profiles are supported by the system for a give...
Definition: rocm_smi.h:741
uint32_t num_profiles
Definition: rocm_smi.h:755
rsmi_bit_field_t available_profiles
Definition: rocm_smi.h:745
rsmi_power_profile_preset_masks_t current
Definition: rocm_smi.h:750
This structure contains information specific to a process.
Definition: rocm_smi.h:1129
uint32_t cu_occupancy
Compute Unit usage in percent.
Definition: rocm_smi.h:1134
uint32_t pasid
PASID.
Definition: rocm_smi.h:1131
uint32_t process_id
Process ID.
Definition: rocm_smi.h:1130
uint64_t sdma_usage
SDMA usage in microseconds.
Definition: rocm_smi.h:1133
uint64_t vram_usage
VRAM usage.
Definition: rocm_smi.h:1132
This structure represents a range (e.g., frequencies or voltages).
Definition: rocm_smi.h:838
uint64_t upper_bound
Upper bound of range.
Definition: rocm_smi.h:840
uint64_t lower_bound
Lower bound of range.
Definition: rocm_smi.h:839
Reserved Memory Page Record.
Definition: rocm_smi.h:725
uint64_t page_size
Page size.
Definition: rocm_smi.h:727
rsmi_memory_page_status_t status
Page "reserved" status.
Definition: rocm_smi.h:728
uint64_t page_address
Start address of page.
Definition: rocm_smi.h:726
The utilization counter data.
Definition: rocm_smi.h:717
RSMI_UTILIZATION_COUNTER_TYPE type
Utilization counter type.
Definition: rocm_smi.h:718
uint64_t value
Utilization counter value.
Definition: rocm_smi.h:719
This structure holds version information.
Definition: rocm_smi.h:826
uint32_t patch
Patch, build or stepping version.
Definition: rocm_smi.h:829
const char * build
Build string.
Definition: rocm_smi.h:830
uint32_t minor
Minor version.
Definition: rocm_smi.h:828
uint32_t major
Major version.
Definition: rocm_smi.h:827
This union holds the value of an rsmi_func_id_iter_handle_t. The value may be a function name,...
Definition: rocm_smi.h:1152
rsmi_temperature_metric_t temp_metric
Used for rsmi_event_type_t variants.
Definition: rocm_smi.h:1159
rsmi_memory_type_t memory_type
< Used for rsmi_memory_type_t variants
Definition: rocm_smi.h:1157
rsmi_event_group_t evnt_group
Used for rsmi_clk_type_t variants.
Definition: rocm_smi.h:1163
rsmi_clk_type_t clk_type
Used for rsmi_fw_block_t variants.
Definition: rocm_smi.h:1165
uint64_t id
uint64_t representation of value
Definition: rocm_smi.h:1153
rsmi_event_type_t evnt_type
Used for rsmi_event_group_t variants.
Definition: rocm_smi.h:1161
rsmi_fw_block_t fw_block
Used for rsmi_gpu_block_t variants.
Definition: rocm_smi.h:1167
const char * name
name string (applicable to functions only)
Definition: rocm_smi.h:1154