rocm.bindings.amdsmi

Contents

rocm.bindings.amdsmi#

2026-09-24

256 min read time

Applies to Linux and Windows

Advanced Micro Devices, Inc.

Attributes#

AMDSMI_MAX_MM_IP_COUNT

AMDSMI_MAX_STRING_LENGTH

AMDSMI_MAX_DEVICES

AMDSMI_MAX_CACHE_TYPES

AMDSMI_MAX_ACCELERATOR_PROFILE

AMDSMI_MAX_CP_PROFILE_RESOURCES

AMDSMI_MAX_ACCELERATOR_PARTITIONS

AMDSMI_MAX_NUM_NUMA_NODES

AMDSMI_GPU_UUID_SIZE

AMDSMI_MAX_NUM_XGMI_PHYSICAL_LINK

AMDSMI_MAX_CONTAINER_TYPE

AMDSMI_NUM_HBM_INSTANCES

AMDSMI_MAX_NUM_VCN

AMDSMI_MAX_NUM_CLKS

AMDSMI_MAX_NUM_XGMI_LINKS

AMDSMI_MAX_NUM_GFX_CLKS

AMDSMI_MAX_AID

AMDSMI_MAX_ENGINES

AMDSMI_MAX_NUM_JPEG

AMDSMI_MAX_NUM_JPEG_ENG_V1

AMDSMI_MAX_NUM_XCC

AMDSMI_MAX_NUM_XCP

AMDSMI_APU_MAX_CORES

AMDSMI_APU_V24_CORES

AMDSMI_APU_MAX_L3

AMDSMI_APU_MAX_IPU

AMDSMI_MAX_NUMBER_OF_AFIDS_PER_RECORD

AMDSMI_MAX_NUM_HBM_STACKS

AMDSMI_MAX_NUM_AID

AMDSMI_MAX_NUM_MID

AMDSMI_MAX_NUM_CLKS_PER_AID

AMDSMI_MAX_NUM_CLKS_PER_MID

AMDSMI_TIME_FORMAT

AMDSMI_DATE_FORMAT

AMDSMI_LIB_VERSION_MAJOR

AMDSMI_LIB_VERSION_MINOR

AMDSMI_LIB_VERSION_RELEASE

AMDSMI_LIB_VERSION_STRING

AMDSMI_MAX_DRIVER_INFO_RSVD

AMDSMI_MAX_UUID_ELEMENTS

AMDSMI_MAX_SPD_DIMM_ADDRESS

AMDSMI_MAX_SPD_LID

AMDSMI_MAX_SPD_REG_OFFSET

AMDSMI_MAX_SPD_REG_SPACE

AMDSMI_MAX_SPD_WRITE_DATA

AMDSMI_MAX_SVI3_RAIL_INDEX

AMDSMI_MAX_SVI3_RAIL_SELECTION

AMDSMI_POWER_EFFICIENCY_MODE_4

AMDSMI_POWER_EFFICIENCY_MODE_5

AMDSMI_MAX_POWER_EFFICIENCY_UTIL

AMDSMI_MAX_POWER_EFFICIENCY_PPTLIMIT

AMDSMI_RAIL_INDEX_NONE

AMDSMI_MAX_NUM_FREQUENCIES

AMDSMI_MAX_FAN_SPEED

AMDSMI_NUM_VOLTAGE_CURVE_POINTS

AMDSMI_MAX_UTILIZATION_VALUES

AMDSMI_MAX_NUM_PM_POLICIES

AMDSMI_MAX_NIC_PORTS

AMDSMI_MAX_NIC_RDMA_DEV

AMDSMI_MAX_NIC_FW

AMDSMI_FABRIC_LABEL_MAX_LENGTH

AMDSMI_FABRIC_PPOD_ID_SIZE

AMDSMI_MAX_CARVEOUT_OPTIONS

processor_type_t

Classes#

timespec

(No short description)

amdsmi_init_flags_t

Initialization flags

amdsmi_mm_ip_t

GPU Capability info

amdsmi_container_types_t

Container

amdsmi_hsmp_driver_version_t

This structure holds HSMP Driver version information.

amdsmi_processor_type_t

Processor types detectable by AMD SMI

amdsmi_status_t

Error codes returned by amdsmi functions

amdsmi_clk_type_t

Clock types

amdsmi_accelerator_partition_type_t

Accelerator Partition

amdsmi_accelerator_partition_resource_type_t

Accelerator Partition Resource Types

amdsmi_compute_partition_type_t

Compute Partition. This enum is used to identify

amdsmi_compute_partition_mem_alloc_mode_t

Compute Partition Memory Allocation Mode. Controls how GPU memory

amdsmi_accelerator_partition_mem_alloc_mode_t

Accelerator Partition Memory Allocation Mode. Controls how GPU memory

amdsmi_memory_partition_type_t

Memory Partitions

amdsmi_temperature_type_t

This enumeration is used to indicate from which part of the processor a

amdsmi_fw_block_t

The values of this enum are used to identify the various firmware

amdsmi_vram_type_t

vRam Types. This enum is used to identify various VRam types.

amdsmi_range_t

This structure represents a range (e.g., frequencies or voltages).

amdsmi_xgmi_info_t

XGMI Information

amdsmi_vram_usage_t

VRam Usage

amdsmi_violation_status_t

This structure hold violation status information.

amdsmi_frequency_range_t

Frequency Range

amdsmi_bdf_t_bdf_

(No short description)

amdsmi_bdf_t_struct_0

(No short description)

amdsmi_bdf_t

bdf types

amdsmi_enumeration_info_t

Structure holds enumeration information

amdsmi_card_form_factor_t

Card Form Factor

amdsmi_pcie_info_t_pcie_static_

(No short description)

amdsmi_pcie_info_t_pcie_metric_

(No short description)

amdsmi_pcie_info_t

pcie information

amdsmi_power_cap_info_t

Power Cap Information

amdsmi_power_cap_type_t

Power Cap Package Power Tracking (PPT) type

amdsmi_vbios_info_t

VBios Information

amdsmi_cache_property_type_t

cache properties

amdsmi_gpu_cache_info_t_cache_

(No short description)

amdsmi_gpu_cache_info_t

GPU Cache Information

amdsmi_fw_info_t_fw_info_list_

(No short description)

amdsmi_fw_info_t

Firmware Information

amdsmi_asic_info_t

ASIC Information

amdsmi_kfd_info_t

Structure holds kfd information

amdsmi_nps_caps_t_nps_flags_

(No short description)

amdsmi_nps_caps_t

This union holds memory partition bitmask.

amdsmi_memory_partition_config_t_numa_range_

(No short description)

amdsmi_memory_partition_config_t

Memory Partition Configuration.

amdsmi_accelerator_partition_profile_t

Accelerator Partition Resource Profile

amdsmi_accelerator_partition_resource_profile_t

Accelerator Partition Resources.

amdsmi_accelerator_partition_profile_config_t

Accelerator Partition Profile Configurations

amdsmi_link_type_t

Link type

amdsmi_cpu_util_t

This structure holds CPU utilization information.

amdsmi_link_status_t

Link Status

amdsmi_link_metrics_t__links

(No short description)

amdsmi_link_metrics_t

Link Metrics

amdsmi_vram_info_t

VRam Information

amdsmi_driver_info_t

Driver Information

amdsmi_board_info_t

Board Information

amdsmi_power_info_t

Power Information

amdsmi_clk_info_t

Clock Information

amdsmi_engine_usage_t

Engine Usage

amdsmi_proc_info_t_engine_usage_

(No short description)

amdsmi_proc_info_t_memory_usage_

(No short description)

amdsmi_proc_info_t

Process Information

amdsmi_proc_gpu_entry_t_struct_0

(No short description)

amdsmi_proc_gpu_entry_t_struct_1

(No short description)

amdsmi_proc_gpu_entry_t

Per-GPU process entry within a PID-grouped result.

amdsmi_proc_info_by_pid_t

Process info aggregated across all GPUs, keyed by PID.

amdsmi_p2p_capability_t

IO Link P2P Capability

amdsmi_dev_perf_level_t

PowerPlay performance levels

amdsmi_event_group_t

Event Groups

amdsmi_event_type_t

Event types

amdsmi_counter_command_t

Event counter commands

amdsmi_counter_value_t

Counter value

amdsmi_evt_notification_type_t

Event notification event types

amdsmi_evt_notification_data_t

Event notification data returned from event notification API

amdsmi_temperature_metric_t

Temperature Metrics. This enum is used to identify various

amdsmi_voltage_metric_t

Voltage Metrics. This enum is used to identify various

amdsmi_voltage_type_t

This ennumeration is used to indicate which type of

amdsmi_power_profile_preset_masks_t

Pre-set Profile Selections. These bitmasks can be AND'd with the

amdsmi_gpu_block_t

This enum is used to identify different GPU blocks.

amdsmi_clk_limit_type_t

The clk limit type

amdsmi_cper_sev_t

Cper sev

amdsmi_cper_notify_type_t

Cper notify

amdsmi_gpu_ras_policy_v4_0_t

Ras policy v4.0

amdsmi_gpu_ras_policy_info_t_policy_data_

(No short description)

amdsmi_gpu_ras_policy_info_t

Ras policy info structure for storing version and different ras

amdsmi_ras_err_state_t

The current ECC state

amdsmi_memory_type_t

Types of memory

amdsmi_freq_ind_t

The values of this enum are used as frequency identifiers.

amdsmi_xgmi_status_t

XGMI Status

amdsmi_memory_page_status_t

Reserved Memory Page States

amdsmi_utilization_counter_type_t

The utilization counter type

amdsmi_utilization_counter_t

The utilization counter data

amdsmi_retired_page_record_t

Reserved Memory Page Record

amdsmi_power_profile_status_t

This structure contains information about which power profiles are

amdsmi_frequencies_t

This structure holds information about clock frequencies.

amdsmi_dpm_policy_entry_t

The dpm policy.

amdsmi_dpm_policy_t

DPM Policy

amdsmi_pcie_bandwidth_t

This structure holds information about the possible PCIe

amdsmi_version_t

This structure holds version information.

amdsmi_od_vddc_point_t

This structure represents a point on the frequency-voltage plane.

amdsmi_freq_volt_region_t

This structure holds 2 ::amdsmi_range_t's, one for frequency and one for

amdsmi_od_volt_curve_t

OD Vold Curve

amdsmi_od_volt_freq_data_t

This structure holds the frequency-voltage values for a device.

amd_metrics_table_header_t

Structure holds the gpu metrics table header for a device

amdsmi_gpu_xcp_metrics_t

The following structures hold the gpu statistics for a device.

amdsmi_apu_metrics_t

APU metrics auxiliary data.

amdsmi_gpu_metrics_t

Structure holds the gpu metrics values for a device

amdsmi_xgmi_link_status_type_t

XGMI Link Status Type

amdsmi_xgmi_link_status_t

XGMI Link Status

amdsmi_name_value_t

This structure holds the name value pairs

amdsmi_reg_type_t

This register type for register table

amdsmi_ras_feature_t_ras_info_

(No short description)

amdsmi_ras_feature_t

This structure holds ras feature information.

amdsmi_error_count_t

This structure holds error counts.

amdsmi_process_info_t

This structure contains information specific to a process.

amdsmi_topology_nearest_t

Topology Nearest

amdsmi_virtualization_mode_t

Variant placeholder

amdsmi_affinity_scope_t

Scope for Numa affinity or Socket affinity

amdsmi_npm_status_t

NPM status

amdsmi_npm_info_t

NPM info

amdsmi_ptl_data_format_t

PTL (Peak Tops Limiter) data format types

amdsmi_smu_fw_version_t

This structure holds SMU Firmware version information.

amdsmi_ddr_bw_metrics_t

DDR bandwidth metrics.

amdsmi_temp_range_refresh_rate_t

temperature range and refresh rate metrics of a DIMM

amdsmi_dimm_power_t

DIMM Power(mW), power update rate(ms) and dimm address

amdsmi_dimm_thermal_t

DIMM temperature(°C) and update rate(ms) and dimm address

amdsmi_io_bw_encoding_t

xGMI Bandwidth Encoding types

amdsmi_link_id_bw_type_t

LINK name and Bandwidth type Information.It contains

amdsmi_dpm_level_t

max and min LCLK DPM level on a given NBIO ID.

amdsmi_hsmp_metrics_table_t

HSMP Metrics table (supported only with hsmp proto version 6).

amdsmi_cpu_info_t

cpu info data

amdsmi_sock_info_t

cpu socket info data

amdsmi_nic_stat_t

Structure for NIC statistic name-value pairs

amdsmi_nic_asic_info_t

NIC asic information

amdsmi_nic_bus_info_t

NIC bus information

amdsmi_nic_numa_info_t

NIC NUMA information

amdsmi_nic_fw_entry_t

NIC firmware information

amdsmi_nic_fw_info_t

NIC firmware information collection

amdsmi_nic_port_t

NIC port information

amdsmi_nic_port_info_t

NIC port information collection

amdsmi_nic_driver_info_t

NIC driver information

amdsmi_nic_rdma_port_info_t

NIC RDMA port information

amdsmi_nic_rdma_dev_info_t

NIC RDMA device information

amdsmi_nic_rdma_devices_info_t

NIC RDMA devices information collection

amdsmi_fabric_telemetry_category_t

Fabric telemetry categories

amdsmi_fabric_telemetry_category_mask_t

Fabric telemetry category bitmask values

amdsmi_fabric_telemetry_item_t

Fabric telemetry item structure

amdsmi_fabric_label_t

(No short description)

amdsmi_fabric_telemetry_instance_t

Fabric telemetry instance structure

amdsmi_fabric_telemetry_dataset_t

Fabric telemetry dataset structure

amdsmi_fabric_telemetry_t

Fabric telemetry structure

amdsmi_fabric_size_constants_t

Fabric size constants

amdsmi_fabric_type_t

Fabric type

amdsmi_fabric_npa_address_mode_t

Fabric NPA address mode

amdsmi_fabric_accelerator_vpod_state_t

Fabric accelerator vPoD state

amdsmi_fabric_info_v1_t

Fabric device configuration information (version 1)

amdsmi_fabric_info_t_fabric_info_

(No short description)

amdsmi_fabric_info_t

Fabric device information structure

amdsmi_cper_guid_t

Cper

amdsmi_cper_timestamp_t

(No short description)

amdsmi_cper_valid_bits_t_valid_bits_

(No short description)

amdsmi_cper_valid_bits_t

(No short description)

amdsmi_cper_hdr_t

(No short description)

amdsmi_uma_carveout_option_t

UMA carveout option descriptor

amdsmi_uma_carveout_info_t

UMA carveout configuration information

amdsmi_ttm_info_t

TTM (Translation Table Manager) configuration information

Functions#

has_symbol(→ bool)

amdsmi_init(init_flags)

Initialize the AMD SMI library

amdsmi_shut_down()

Shutdown the AMD SMI library

amdsmi_get_socket_handles(socket_count, socket_handles)

Get the list of socket handles in the system.

amdsmi_get_socket_info(socket_handle, len, name)

Get information about the given socket

amdsmi_get_processor_handles(socket_handle, ...)

Get the list of the processor handles associated to a socket.

amdsmi_get_node_handle(processor_handle)

Get the node handle associated with processor handle.

amdsmi_get_processor_type(processor_handle)

Get the processor type of the processor_handle

amdsmi_get_processor_info(processor_handle, len, name)

Get a string identifier for the given processor.

amdsmi_get_processor_count_from_handles(...)

Get respective processor counts from the processor handles

amdsmi_get_processor_handles_by_type(socket_handle, ...)

Returns a list of processor handles of the specified type in the system.

amdsmi_get_processor_handle_from_bdf(bdf)

Get processor handle with the matching bdf.

amdsmi_get_gpu_device_bdf(processor_handle, bdf)

Returns BDF of the given GPU device

amdsmi_get_gpu_device_uuid(processor_handle, ...)

Returns the UUID of the device

amdsmi_get_gpu_enumeration_info(processor_handle)

Returns the Enumeration information for the device

amdsmi_get_cpu_affinity_with_scope(processor_handle, ...)

Retrieves an array of uint64_t (sized to cpu_set_size) of bitmasks with the

amdsmi_get_gpu_virtualization_mode(processor_handle, mode)

Returns the virtualization mode for the target device.

amdsmi_get_nic_processor_handles(socket_handle, ...)

Get the list of the NIC processor handles associated to a socket.

amdsmi_get_nic_device_bdf(processor_handle, bdf)

Returns BDF of the given NIC device

amdsmi_get_gpu_id(processor_handle, id)

Get the device id associated with the device with provided device

amdsmi_get_gpu_revision(processor_handle)

Get the device revision associated with the device

amdsmi_get_gpu_vendor_name(processor_handle, name, len)

Get the name string for a give vendor ID

amdsmi_get_gpu_vram_vendor(processor_handle, brand, len)

Get the vram vendor string of a device.

amdsmi_get_gpu_subsystem_id(processor_handle, id)

Get the subsystem device id associated with the device with

amdsmi_get_gpu_subsystem_name(processor_handle, name, len)

Get the name string for the device subsystem

amdsmi_get_gpu_pci_bandwidth(processor_handle, bandwidth)

Get the list of possible PCIe bandwidths that are available. It is not

amdsmi_get_gpu_bdf_id(processor_handle, bdfid)

Get the unique PCI device identifier associated for a device

amdsmi_get_gpu_topo_numa_affinity(processor_handle, ...)

Get the NUMA node associated with a device

amdsmi_get_gpu_pci_throughput(processor_handle, sent, ...)

Get PCIe traffic information. It is not supported on virtual machine guest

amdsmi_get_gpu_pci_replay_counter(processor_handle, ...)

Get PCIe replay counter

amdsmi_set_gpu_pci_bandwidth(processor_handle, bw_bitmask)

Control the set of allowed PCIe bandwidths that can be used. It is not

amdsmi_get_energy_count(processor_handle, ...)

Get the energy accumulator counter of the processor with provided

amdsmi_set_power_cap(processor_handle, sensor_ind, cap)

Set the maximum gpu power cap value. It is not supported on virtual

amdsmi_set_gpu_power_profile(processor_handle, ...)

Set the power performance profile. It is not supported on virtual machine guest

amdsmi_get_supported_power_cap(processor_handle, ...)

Query the supported power cap sensors and their types for a device.

amdsmi_get_cpu_socket_power(processor_handle)

Get the socket power.

amdsmi_get_cpu_socket_power_cap(processor_handle)

Get the socket power cap.

amdsmi_get_cpu_socket_power_cap_max(processor_handle)

Get the maximum power cap value for a given socket.

amdsmi_get_cpu_pwr_svi_telemetry_all_rails(...)

Get the SVI based power telemetry for all rails.

amdsmi_set_cpu_socket_power_cap(processor_handle, pcap)

Set the power cap value for a given socket.

amdsmi_set_cpu_pwr_efficiency_mode(processor_handle, ...)

Set the power efficiency profile policy.

amdsmi_get_cpu_pwr_efficiency_mode(processor_handle)

Get the power efficiency profile policy

amdsmi_get_cpu_core_ccd_power(processor_handle)

Read CCD (Core Complex Die) power consumption

amdsmi_get_gpu_memory_total(processor_handle, ...)

Get the total amount of memory that exists

amdsmi_get_gpu_memory_usage(processor_handle, ...)

Get the current memory usage

amdsmi_get_gpu_bad_page_info(processor_handle)

Get the bad pages of a processor. It is not supported on virtual

amdsmi_get_gpu_bad_page_threshold(processor_handle)

Get the bad pages threshold of a processor. It is not supported on virtual

amdsmi_gpu_validate_ras_eeprom(processor_handle)

Verify the checksum of RAS EEPROM. It is not supported on virtual

amdsmi_get_gpu_ras_block_features_enabled(...)

Returns if RAS features are enabled or disabled for given block. It is not

amdsmi_get_gpu_memory_reserved_pages(processor_handle, ...)

Get information about reserved ("retired") memory pages. It is not supported on

amdsmi_get_gpu_fan_rpms(processor_handle, sensor_ind, ...)

Get the fan speed in RPMs of the device with the specified processor

amdsmi_get_gpu_fan_speed(processor_handle, sensor_ind, ...)

Get the fan speed for the specified device as a value relative to

amdsmi_get_gpu_fan_speed_max(processor_handle, ...)

Get the max. fan speed of the device with provided processor handle. It is

amdsmi_get_gpu_cache_info(processor_handle)

Returns gpu cache info.

amdsmi_get_gpu_volt_metric(processor_handle, ...)

Get the voltage metric value for the specified metric, from the

amdsmi_reset_gpu_fan(processor_handle, sensor_ind)

Reset the fan to automatic driver control. It is not supported on virtual

amdsmi_set_gpu_fan_speed(processor_handle, sensor_ind, ...)

Set the fan speed for the specified device with the provided speed,

amdsmi_get_gpu_busy_percent(processor_handle, ...)

Get GPU busy percent from gpu_busy_percent sysfs file

amdsmi_get_vcn_busy_percent(processor_handle)

Get VCN busy percent from vcn_busy_percent sysfs file

amdsmi_get_utilization_count(processor_handle, ...)

Get coarse grain utilization counter of the specified device

amdsmi_get_gpu_perf_level(processor_handle, perf)

Get the performance level of the device. It is not supported on virtual

amdsmi_set_gpu_perf_determinism_mode(processor_handle, ...)

Enter performance determinism mode with provided processor handle. It is

amdsmi_get_gpu_overdrive_level(processor_handle, od)

Get the overdrive percent associated with the device with provided

amdsmi_get_gpu_mem_overdrive_level(processor_handle, od)

Get the GPU memory clock overdrive percent associated with the device with provided

amdsmi_get_clk_freq(processor_handle, clk_type, f)

Get the list of possible system clock speeds of device for a

amdsmi_reset_gpu(processor_handle)

Triggers a chain that resets all GPUs.

amdsmi_get_gpu_od_volt_info(processor_handle, odv)

This function retrieves the overdrive GFX & MCLK information. If valid

amdsmi_get_gpu_metrics_header_info(processor_handle, ...)

Get the 'metrics_header_info' from the GPU metrics associated with the device

amdsmi_get_gpu_metrics_info(processor_handle, pgpu_metrics)

This function retrieves the gpu metrics information. It is not supported

amdsmi_get_gpu_partition_metrics_info(...)

This function retrieves the partition metrics information.

amdsmi_get_gpu_pm_metrics_info(processor_handle, ...)

Get the pm metrics table with provided device index.

amdsmi_get_gpu_reg_table_info(processor_handle, ...)

Get the register metrics table with provided device index and register type.

amdsmi_set_gpu_clk_limit(processor_handle, clk_type, ...)

This function sets the clock sets the clock min/max level

amdsmi_set_gpu_od_clk_info(processor_handle, level, ...)

This function sets the clock frequency information. It is not supported on

amdsmi_set_gpu_od_volt_info(processor_handle, vpoint, ...)

This function sets 1 of the 3 voltage curve points. It is not supported

amdsmi_get_gpu_od_volt_curve_regions(processor_handle, ...)

This function will retrieve the current valid regions in the

amdsmi_get_gpu_power_profile_presets(processor_handle, ...)

Get the list of available preset power profiles and an indication of

amdsmi_set_gpu_perf_level(processor_handle, perf_lvl)

Set the PowerPlay performance level associated with the device with

amdsmi_set_gpu_overdrive_level(processor_handle, od)

Set the overdrive percent associated with the device with provided

amdsmi_set_clk_freq(processor_handle, clk_type, ...)

Control the set of allowed frequencies that can be used for the

amdsmi_get_soc_pstate(processor_handle, policy)

Get the soc pstate policy for the processor

amdsmi_set_soc_pstate(processor_handle, policy_id)

Set the soc pstate policy for the processor

amdsmi_get_xgmi_plpd(processor_handle, xgmi_plpd)

Get the xgmi per-link power down policy parameter for the processor

amdsmi_set_xgmi_plpd(processor_handle, policy_id)

Set the xgmi per-link power down policy parameter for the processor

amdsmi_get_gpu_process_isolation(processor_handle, ...)

Get the status of the Process Isolation

amdsmi_set_gpu_process_isolation(processor_handle, ...)

Enable/disable the system Process Isolation

amdsmi_clean_gpu_local_data(processor_handle)

Run the cleaner shader to clean up data in LDS/GPRs

amdsmi_alloc_fabric_telemetry(processor_handle, ...)

Allocate storage for Fabric telemetry data

amdsmi_get_fabric_telemetry_data(processor_handle, ...)

Get Fabric telemetry data

amdsmi_fabric_telem_id_to_string(telem_id, telem_name)

Get string name for a telemetry item ID

amdsmi_free_fabric_telemetry(processor_handle, telemetry)

Free Fabric telemetry storage

amdsmi_get_gpu_fabric_info(processor_handle)

Get Fabric device information

amdsmi_get_lib_version()

Get the build version information for the currently running build of AMDSMI

amdsmi_get_gpu_ecc_count(processor_handle, block, ec)

Retrieve the error counts for a GPU block. It is not supported on virtual

amdsmi_get_gpu_ecc_enabled(processor_handle, ...)

Retrieve the enabled ECC bit-mask. It is not supported on virtual machine guest

amdsmi_get_gpu_total_ecc_count(processor_handle)

Returns the total number of ECC errors (correctable,

amdsmi_get_afids_from_cper(cper_buffer, buf_size, ...)

Get the AFIDs from CPER buffer

amdsmi_get_gpu_ras_feature_info(processor_handle)

Returns RAS features info.

amdsmi_get_gpu_cper_entries(processor_handle, ...)

Retrieve CPER entries cached in the driver.

amdsmi_get_gpu_ecc_status(processor_handle, block, state)

Retrieve the ECC status for a GPU block. It is not supported on virtual machine

amdsmi_status_code_to_string(status, status_string)

Get a description of a provided AMDSMI error status

amdsmi_gpu_counter_group_supported(processor_handle, group)

Tell if an event group is supported by a given device. It is not supported

amdsmi_gpu_create_counter(processor_handle, type, ...)

Create a performance counter object

amdsmi_gpu_destroy_counter(evnt_handle)

Deallocate a performance counter object

amdsmi_gpu_control_counter(evt_handle, cmd, cmd_args)

Issue performance counter control commands. It is not supported on

amdsmi_gpu_read_counter(evt_handle, value)

Read the current value of a performance counter

amdsmi_get_gpu_available_counters(processor_handle, ...)

Get the number of currently available counters. It is not supported on

amdsmi_get_gpu_compute_process_info(procs, num_items)

Get process information about processes currently using GPU

amdsmi_get_gpu_compute_process_info_by_pid(pid, proc)

Get process information about a specific process

amdsmi_get_gpu_compute_process_gpus(pid, dv_indices, ...)

Get the device indices currently being used by a process

amdsmi_gpu_xgmi_error_status(processor_handle, status)

Retrieve the XGMI error status for a device. It is not supported on

amdsmi_reset_gpu_xgmi_error(processor_handle)

Reset the XGMI error status for a device. It is not supported on virtual

amdsmi_get_xgmi_info(processor_handle)

Returns XGMI information for the GPU.

amdsmi_get_gpu_xgmi_link_status(processor_handle)

Get the XGMI link status

amdsmi_get_link_metrics(processor_handle)

Return link metric information

amdsmi_topo_get_numa_node_number(processor_handle, ...)

Retrieve the NUMA CPU node number for a device

amdsmi_topo_get_link_weight(processor_handle_src, ...)

Retrieve the weight for a connection between 2 GPUs

amdsmi_get_minmax_bandwidth_between_processors(...)

Retrieve minimal and maximal io link bandwidth between 2 GPUs

amdsmi_topo_get_link_type(processor_handle_src, ...)

Retrieve the hops and the connection type between 2 GPUs

amdsmi_get_link_topology_nearest(processor_handle, ...)

Retrieve the set of GPUs that are nearest to a given device

amdsmi_is_P2P_accessible(processor_handle_src, ...)

Return P2P availability status between 2 GPUs

amdsmi_topo_get_p2p_status(processor_handle_src, ...)

Retrieve connection type and P2P capabilities between 2 GPUs

amdsmi_get_gpu_compute_partition(processor_handle, ...)

Retrieves the current compute partitioning for a desired device

amdsmi_set_gpu_compute_partition(processor_handle, ...)

Modifies a selected device's compute partition setting.

amdsmi_get_gpu_compute_partition_mem_alloc_mode(...)

Retrieves the current compute partition memory allocation mode

amdsmi_get_gpu_accelerator_partition_mem_alloc_mode(...)

Retrieves the current accelerator partition memory allocation mode

amdsmi_set_gpu_compute_partition_mem_alloc_mode(...)

Modifies a selected device's compute partition memory allocation mode.

amdsmi_set_gpu_accelerator_partition_mem_alloc_mode(...)

Modifies a selected device's compute partition memory allocation mode.

amdsmi_get_gpu_memory_partition(processor_handle, ...)

Retrieves the current memory partition for a desired device

amdsmi_set_gpu_memory_partition(processor_handle, ...)

Modifies a selected device's current memory partition setting.

amdsmi_get_gpu_memory_partition_config(processor_handle)

Returns current gpu memory partition capabilities

amdsmi_set_gpu_memory_partition_mode(processor_handle, ...)

Sets memory partition mode

amdsmi_get_gpu_accelerator_partition_profile_config(...)

Returns gpu accelerator partition caps as currently configured in the system

amdsmi_get_gpu_accelerator_partition_profile(...)

Returns current gpu accelerator partition cap

amdsmi_set_gpu_accelerator_partition_profile(...)

Set accelerator partition setting based on profile_index

amdsmi_init_gpu_event_notification(processor_handle)

Prepare to collect event notifications for a GPU

amdsmi_set_gpu_event_notification_mask(...)

Specify which events to collect for a device

amdsmi_get_gpu_event_notification(timeout_ms, ...)

Collect event notifications, waiting a specified amount of time

amdsmi_stop_gpu_event_notification(processor_handle)

Close any file handles and free any resources used by event

amdsmi_get_gpu_driver_info(processor_handle)

Returns the driver version information

amdsmi_get_gpu_asic_info(processor_handle)

Returns the ASIC information for the device

amdsmi_get_gpu_kfd_info(processor_handle)

Returns the KFD (Kernel Fusion Driver) information for the device

amdsmi_get_gpu_vram_info(processor_handle)

Returns vram info

amdsmi_get_gpu_board_info(processor_handle)

Returns the board part number and board information for the requested device

amdsmi_get_power_cap_info(processor_handle, sensor_ind)

Returns the power caps as currently configured in the system.

amdsmi_get_pcie_info(processor_handle)

Returns the PCIe info for the GPU.

amdsmi_get_gpu_xcd_counter(processor_handle, xcd_count)

Returns the 'xcd_counter' from the GPU metrics associated with the device

amdsmi_get_npm_info(node_handle)

Retrieves node power management (NPM) status and power limit for the specified node.

amdsmi_get_fw_info(processor_handle)

Returns the firmware versions running on the device.

amdsmi_get_gpu_vbios_info(processor_handle)

Returns the static information for the vBIOS on the device.

amdsmi_get_temp_metric(processor_handle, sensor_type, ...)

Get the temperature metric value for the specified metric, from the

amdsmi_get_gpu_activity(processor_handle)

Returns the current usage of the GPU engines (GFX, MM and MEM).

amdsmi_get_power_info(processor_handle)

Returns the current power and voltage of the GPU.

amdsmi_is_gpu_power_management_enabled(processor_handle)

Returns is power management enabled

amdsmi_get_clock_info(processor_handle, clk_type)

Returns the measurements of the clocks in the GPU

amdsmi_get_gpu_vram_usage(processor_handle)

Returns the VRAM usage (both total and used memory) in MegaBytes.

amdsmi_get_violation_status(processor_handle)

Returns the violations for a processor

amdsmi_get_gpu_process_list(processor_handle, ...)

Returns the list of process information running on a given GPU.

amdsmi_get_gpu_process_list_by_pid(processor_handles, ...)

Get the list of processes running on one or more GPUs, grouped by PID.

amdsmi_get_gpu_ptl_state(processor_handle)

Get PTL enable/disable state

amdsmi_set_gpu_ptl_state(processor_handle, enable)

Set PTL enable/disable state

amdsmi_get_gpu_ptl_formats(processor_handle)

Get PTL (Peak Tops Limiter) formats for the processor

amdsmi_set_gpu_ptl_formats(processor_handle, ...)

Set PTL with specified preferred data formats

amdsmi_get_cpu_handles(cpu_count, processor_handles)

Get the list of cpu handles in the system.

amdsmi_get_cpucore_handles(cores_count, processor_handles)

Get the list of the cpu core handles in a system.

amdsmi_get_cpu_core_energy(processor_handle, penergy)

Get the core energy for a given core.

amdsmi_get_cpu_socket_energy(processor_handle, penergy)

Get the socket energy for a given socket.

amdsmi_get_threads_per_core(threads_per_core)

Get Number of threads Per Core.

amdsmi_get_cpu_hsmp_driver_version(processor_handle, ...)

Get HSMP Driver Version.

amdsmi_get_cpu_smu_fw_version(processor_handle, ...)

Get SMU Firmware Version.

amdsmi_get_cpu_hsmp_proto_ver(processor_handle, proto_ver)

Get HSMP protocol Version.

amdsmi_get_cpu_prochot_status(processor_handle, prochot)

Get normalized status of the processor's PROCHOT status.

amdsmi_get_cpu_fclk_mclk(processor_handle, fclk, mclk)

Get Data fabric clock and Memory clock in MHz.

amdsmi_get_cpu_cclk_limit(processor_handle, cclk)

Get core clock in MHz.

amdsmi_get_cpu_socket_current_active_freq_limit(...)

Get current active frequency limit of the socket.

amdsmi_get_cpu_socket_freq_range(processor_handle, ...)

Get socket frequency range.

amdsmi_get_cpu_core_current_freq_limit(...)

Get socket frequency limit of the core.

amdsmi_set_cpu_rail_isofreq_policy(processor_handle, ...)

Set CPU rail isolated frequency policy for independent core clock control per power rail

amdsmi_get_cpu_rail_isofreq_policy(processor_handle, ...)

Get CPU rail isolated frequency policy status for independent core clock control per

amdsmi_set_cpu_dfc_ctrl(processor_handle, dfc_ctrl)

Set the DFCState enabling control.

amdsmi_get_cpu_dfc_ctrl(processor_handle, dfc_ctrl)

Get the current DFCState enabling control status.

amdsmi_get_cpu_core_boostlimit(processor_handle, ...)

Get the core boost limit.

amdsmi_get_cpu_socket_c0_residency(processor_handle, ...)

Get the socket c0 residency.

amdsmi_set_cpu_core_boostlimit(processor_handle, ...)

Set the core boostlimit value.

amdsmi_set_cpu_socket_boostlimit(processor_handle, ...)

Set the socket boostlimit value.

amdsmi_get_cpu_core_floor_freq_limit(processor_handle, ...)

Get the CPU core floor limit frequency.

amdsmi_get_cpu_floor_freq_limit(processor_handle, ...)

Get the CPU floor limit frequency.

amdsmi_get_cpu_core_eff_floor_freq_limit(...)

Get the CPU core effective floor limit frequency.

amdsmi_get_cpu_eff_floor_freq_limit(processor_handle, ...)

Get the CPU effective floor limit frequency.

amdsmi_set_cpu_core_floor_freq_limit(processor_handle, ...)

Set the CPU core floor limit frequency.

amdsmi_set_cpu_floor_freq_limit(processor_handle, ...)

Set the CPU socket floor limit frequency.

amdsmi_set_cpu_msr_floor_freq_limit(processor_handle, ...)

Set CPU floor limit frequency via MSR(Model Specific Register).

amdsmi_set_cpu_core_msr_floor_freq_limit(...)

Set CPU core MSR floor limit frequency.

amdsmi_get_cpu_freq_range()

Get the CPU socket frequency range.

amdsmi_set_cpu_sdps_limit(processor_handle, sdps_limit)

Set the SDPS(Socket DIMM Power Sloshing) limit for a given processor socket.

amdsmi_get_cpu_sdps_limit(processor_handle)

Get the current SDPS limit for a given processor socket.

amdsmi_get_cpu_ddr_bw(processor_handle, ddr_bw)

Get the DDR bandwidth data.

amdsmi_get_cpu_socket_temperature(processor_handle, ptmon)

Get socket temperature.

amdsmi_get_cpu_tdelta(processor_handle)

Read Thermal Delta (TDELTA) Behavior

amdsmi_get_cpu_svi3_vr_controller_temp(...)

Get Temperature of SVI3 VR(Voltage Rail)

amdsmi_get_cpu_dimm_temp_range_and_refresh_rate(...)

Get DIMM temperature range and refresh rate.

amdsmi_get_cpu_dimm_power_consumption(...)

Get DIMM power consumption.

amdsmi_get_cpu_dimm_thermal_sensor(processor_handle, ...)

Get DIMM thermal sensor value.

amdsmi_get_cpu_dimm_sb_reg(processor_handle, ...)

Read DIMM sideband register data

amdsmi_set_cpu_dimm_sb_reg(processor_handle, ...)

Write Data to DIMM Sideband Register

amdsmi_set_cpu_xgmi_width(processor_handle, min, max)

Set xgmi width.

amdsmi_set_cpu_gmi3_link_width_range(processor_handle, ...)

Set gmi3 link width range.

amdsmi_cpu_apb_enable(processor_handle)

Enable APB.

amdsmi_cpu_apb_disable(processor_handle, pstate)

Disable APB.

amdsmi_set_cpu_socket_lclk_dpm_level(processor_handle, ...)

Set NBIO lclk dpm level value.

amdsmi_get_cpu_socket_lclk_dpm_level(processor_handle, ...)

Get NBIO LCLK dpm level.

amdsmi_set_cpu_pcie_link_rate(processor_handle, ...)

Set pcie link rate.

amdsmi_set_cpu_df_pstate_range(processor_handle, ...)

Set df pstate range.

amdsmi_set_cpu_xgmi_pstate_range(processor_handle, ...)

Set the Min and Max XGMI PState Range

amdsmi_get_cpu_xgmi_pstate_range(processor_handle)

Get the Max and Min XGMI PState Range

amdsmi_get_cpu_pc6_enable(processor_handle)

Get the PC6 Enable State

amdsmi_set_cpu_pc6_enable(processor_handle, enable)

Set the PC6 Enable State

amdsmi_get_cpu_cc6_enable(processor_handle, enabled)

Get the Core C6 Enable State.

amdsmi_set_cpu_cc6_enable(processor_handle, enable)

Set the Core C6 Enable State.

amdsmi_get_cpu_current_io_bandwidth(processor_handle, ...)

Get current input output bandwidth.

amdsmi_get_cpu_current_xgmi_bw(processor_handle, link, ...)

Get current input output bandwidth.

amdsmi_get_hsmp_metrics_table_version(...)

Get HSMP metrics table version

amdsmi_get_hsmp_metrics_table(processor_handle, ...)

Get HSMP metrics table

amdsmi_first_online_core_on_cpu_socket(...)

Get first online core on socket.

amdsmi_get_cpu_family(cpu_family)

Get CPU family.

amdsmi_get_cpu_model(cpu_model)

Get CPU model.

amdsmi_get_cpu_model_name(processor_handle)

Retrieve the CPU processor model name based on the processor index.

amdsmi_get_esmi_err_msg(status, status_string)

Get a description of provided AMDSMI error status for esmi errors.

amdsmi_get_cpu_cores_per_socket(sock_count, soc_info)

Get cpu cores per socket from sys filesystem.

amdsmi_get_cpu_socket_count(sock_count)

Get CPU socket count from sys filesystem.

amdsmi_get_cpu_enabled_commands(processor_handle, ...)

Get HSMP Enabled Commands information for a given CPU socket.

amdsmi_get_nic_driver_info(processor_handle)

Retrieves information about the NIC driver

amdsmi_get_nic_asic_info(processor_handle)

Retrieves ASIC information for the NIC

amdsmi_get_nic_bus_info(processor_handle)

Retrieves BUS information for the NIC

amdsmi_get_nic_numa_info(processor_handle)

Retrieves NUMA information for the NIC

amdsmi_get_nic_port_info(processor_handle)

Retrieves PORT information for the NIC

amdsmi_get_nic_rdma_dev_info(processor_handle)

Retrieves RDMA devices information for the NIC

amdsmi_get_nic_rdma_port_statistics(processor_handle, ...)

Retrieve RDMA port statistics for the NIC

amdsmi_get_nic_fw_info(processor_handle)

Retrieves firmware version information for the NIC

amdsmi_get_nic_port_statistics(processor_handle, ...)

Retrieve PORT statistics for the specified NIC port

amdsmi_get_nic_vendor_statistics(processor_handle, ...)

Retrieve vendor specific statistics for the NIC port

amdsmi_get_gpu_uma_carveout_info(processor_handle)

Get UMA carveout configuration information

amdsmi_set_gpu_uma_carveout(processor_handle, option_index)

Set UMA carveout configuration

amdsmi_get_ttm_info()

Get TTM configuration information

amdsmi_set_ttm_pages_limit(pages)

Set TTM pages limit

amdsmi_reset_ttm_pages_limit()

Reset TTM pages limit to system default

Module Contents#

rocm.bindings.amdsmi.has_symbol(name: str | bytes | bytearray) → bool#
rocm.bindings.amdsmi.AMDSMI_MAX_MM_IP_COUNT: Any#
rocm.bindings.amdsmi.AMDSMI_MAX_STRING_LENGTH: Any#
rocm.bindings.amdsmi.AMDSMI_MAX_DEVICES: Any#
rocm.bindings.amdsmi.AMDSMI_MAX_CACHE_TYPES: Any#
rocm.bindings.amdsmi.AMDSMI_MAX_ACCELERATOR_PROFILE: Any#
rocm.bindings.amdsmi.AMDSMI_MAX_CP_PROFILE_RESOURCES: Any#
rocm.bindings.amdsmi.AMDSMI_MAX_ACCELERATOR_PARTITIONS: Any#
rocm.bindings.amdsmi.AMDSMI_MAX_NUM_NUMA_NODES: Any#
rocm.bindings.amdsmi.AMDSMI_GPU_UUID_SIZE: Any#
rocm.bindings.amdsmi.AMDSMI_MAX_CONTAINER_TYPE: Any#
rocm.bindings.amdsmi.AMDSMI_NUM_HBM_INSTANCES: Any#
rocm.bindings.amdsmi.AMDSMI_MAX_NUM_VCN: Any#
rocm.bindings.amdsmi.AMDSMI_MAX_NUM_CLKS: Any#
rocm.bindings.amdsmi.AMDSMI_MAX_NUM_GFX_CLKS: Any#
rocm.bindings.amdsmi.AMDSMI_MAX_AID: Any#
rocm.bindings.amdsmi.AMDSMI_MAX_ENGINES: Any#
rocm.bindings.amdsmi.AMDSMI_MAX_NUM_JPEG: Any#
rocm.bindings.amdsmi.AMDSMI_MAX_NUM_JPEG_ENG_V1: Any#
rocm.bindings.amdsmi.AMDSMI_MAX_NUM_XCC: Any#
rocm.bindings.amdsmi.AMDSMI_MAX_NUM_XCP: Any#
rocm.bindings.amdsmi.AMDSMI_APU_MAX_CORES: Any#
rocm.bindings.amdsmi.AMDSMI_APU_V24_CORES: Any#
rocm.bindings.amdsmi.AMDSMI_APU_MAX_L3: Any#
rocm.bindings.amdsmi.AMDSMI_APU_MAX_IPU: Any#
rocm.bindings.amdsmi.AMDSMI_MAX_NUMBER_OF_AFIDS_PER_RECORD: Any#
rocm.bindings.amdsmi.AMDSMI_MAX_NUM_HBM_STACKS: Any#
rocm.bindings.amdsmi.AMDSMI_MAX_NUM_AID: Any#
rocm.bindings.amdsmi.AMDSMI_MAX_NUM_MID: Any#
rocm.bindings.amdsmi.AMDSMI_MAX_NUM_CLKS_PER_AID: Any#
rocm.bindings.amdsmi.AMDSMI_MAX_NUM_CLKS_PER_MID: Any#
rocm.bindings.amdsmi.AMDSMI_TIME_FORMAT: Any#
rocm.bindings.amdsmi.AMDSMI_DATE_FORMAT: Any#
rocm.bindings.amdsmi.AMDSMI_LIB_VERSION_MAJOR: Any#
rocm.bindings.amdsmi.AMDSMI_LIB_VERSION_MINOR: Any#
rocm.bindings.amdsmi.AMDSMI_LIB_VERSION_RELEASE: Any#
rocm.bindings.amdsmi.AMDSMI_LIB_VERSION_STRING: Any#
rocm.bindings.amdsmi.AMDSMI_MAX_DRIVER_INFO_RSVD: Any#
rocm.bindings.amdsmi.AMDSMI_MAX_UUID_ELEMENTS: Any#
rocm.bindings.amdsmi.AMDSMI_MAX_SPD_DIMM_ADDRESS: Any#
rocm.bindings.amdsmi.AMDSMI_MAX_SPD_LID: Any#
rocm.bindings.amdsmi.AMDSMI_MAX_SPD_REG_OFFSET: Any#
rocm.bindings.amdsmi.AMDSMI_MAX_SPD_REG_SPACE: Any#
rocm.bindings.amdsmi.AMDSMI_MAX_SPD_WRITE_DATA: Any#
rocm.bindings.amdsmi.AMDSMI_MAX_SVI3_RAIL_INDEX: Any#
rocm.bindings.amdsmi.AMDSMI_MAX_SVI3_RAIL_SELECTION: Any#
rocm.bindings.amdsmi.AMDSMI_POWER_EFFICIENCY_MODE_4: Any#
rocm.bindings.amdsmi.AMDSMI_POWER_EFFICIENCY_MODE_5: Any#
rocm.bindings.amdsmi.AMDSMI_MAX_POWER_EFFICIENCY_UTIL: Any#
rocm.bindings.amdsmi.AMDSMI_MAX_POWER_EFFICIENCY_PPTLIMIT: Any#
rocm.bindings.amdsmi.AMDSMI_RAIL_INDEX_NONE: Any#
rocm.bindings.amdsmi.AMDSMI_MAX_NUM_FREQUENCIES: Any#
rocm.bindings.amdsmi.AMDSMI_MAX_FAN_SPEED: Any#
rocm.bindings.amdsmi.AMDSMI_NUM_VOLTAGE_CURVE_POINTS: Any#
rocm.bindings.amdsmi.AMDSMI_MAX_UTILIZATION_VALUES: Any#
rocm.bindings.amdsmi.AMDSMI_MAX_NUM_PM_POLICIES: Any#
rocm.bindings.amdsmi.AMDSMI_MAX_NIC_PORTS: Any#
rocm.bindings.amdsmi.AMDSMI_MAX_NIC_RDMA_DEV: Any#
rocm.bindings.amdsmi.AMDSMI_MAX_NIC_FW: Any#
rocm.bindings.amdsmi.AMDSMI_FABRIC_LABEL_MAX_LENGTH: Any#
rocm.bindings.amdsmi.AMDSMI_FABRIC_PPOD_ID_SIZE: Any#
rocm.bindings.amdsmi.AMDSMI_MAX_CARVEOUT_OPTIONS: Any#
class rocm.bindings.amdsmi.timespec(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

(No short description)

tv_sec: Any#
tv_nsec: Any#
static PROPERTIES() → list[str]#
static fromObj(pyobj) → Any#
static allocate(count: int = 1) → Any#
c_sizeof() → int#
as_c_void_p() → Any#
class rocm.bindings.amdsmi.amdsmi_init_flags_t#

Bases: enum.IntEnum

Initialization flags

Initialization flags may be OR’d together and passed to ::amdsmi_init().

AMDSMI_INIT_ALL_PROCESSORS: int#
AMDSMI_INIT_AMD_CPUS: int#
AMDSMI_INIT_AMD_GPUS: int#
AMDSMI_INIT_NON_AMD_CPUS: int#
AMDSMI_INIT_NON_AMD_GPUS: int#
AMDSMI_INIT_AMD_APUS: int#
AMDSMI_INIT_AMD_NICS: int#
class rocm.bindings.amdsmi.amdsmi_mm_ip_t#

Bases: enum.IntEnum

GPU Capability info

AMDSMI_MM_UVD: int#
AMDSMI_MM_VCE: int#
AMDSMI_MM_VCN: int#
AMDSMI_MM__MAX: int#
class rocm.bindings.amdsmi.amdsmi_container_types_t#

Bases: enum.IntEnum

Container

AMDSMI_CONTAINER_LXC: int#
AMDSMI_CONTAINER_DOCKER: int#
class rocm.bindings.amdsmi.amdsmi_hsmp_driver_version_t(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

This structure holds HSMP Driver version information.

major: Any#
minor: Any#
static PROPERTIES() → list[str]#
static fromObj(pyobj) → Any#
static allocate(count: int = 1) → Any#
c_sizeof() → int#
as_c_void_p() → Any#
class rocm.bindings.amdsmi.amdsmi_processor_type_t#

Bases: enum.IntEnum

Processor types detectable by AMD SMI

AMDSMI_PROCESSOR_TYPE_UNKNOWN: int#
AMDSMI_PROCESSOR_TYPE_AMD_GPU: int#
AMDSMI_PROCESSOR_TYPE_AMD_CPU: int#
AMDSMI_PROCESSOR_TYPE_NON_AMD_GPU: int#
AMDSMI_PROCESSOR_TYPE_NON_AMD_CPU: int#
AMDSMI_PROCESSOR_TYPE_AMD_CPU_CORE: int#
AMDSMI_PROCESSOR_TYPE_AMD_APU: int#
AMDSMI_PROCESSOR_TYPE_AMD_NIC: int#
AMDSMI_PROCESSOR_TYPE_BRCM_NIC: int#
AMDSMI_PROCESSOR_TYPE_BRCM_SWITCH: int#
rocm.bindings.amdsmi.processor_type_t#
class rocm.bindings.amdsmi.amdsmi_status_t#

Bases: enum.IntEnum

Error codes returned by amdsmi functions

Please avoid status codes that are multiples of 256 (256, 512, etc..) Return values in the shell get modulo 256 applied, meaning any multiple of 256 ends up as 0

AMDSMI_STATUS_SUCCESS: int#
AMDSMI_STATUS_INVAL: int#
AMDSMI_STATUS_NOT_SUPPORTED: int#
AMDSMI_STATUS_NOT_YET_IMPLEMENTED: int#
AMDSMI_STATUS_FAIL_LOAD_MODULE: int#
AMDSMI_STATUS_FAIL_LOAD_SYMBOL: int#
AMDSMI_STATUS_DRM_ERROR: int#
AMDSMI_STATUS_API_FAILED: int#
AMDSMI_STATUS_TIMEOUT: int#
AMDSMI_STATUS_RETRY: int#
AMDSMI_STATUS_NO_PERM: int#
AMDSMI_STATUS_INTERRUPT: int#
AMDSMI_STATUS_IO: int#
AMDSMI_STATUS_ADDRESS_FAULT: int#
AMDSMI_STATUS_FILE_ERROR: int#
AMDSMI_STATUS_OUT_OF_RESOURCES: int#
AMDSMI_STATUS_INTERNAL_EXCEPTION: int#
AMDSMI_STATUS_INPUT_OUT_OF_BOUNDS: int#
AMDSMI_STATUS_INIT_ERROR: int#
AMDSMI_STATUS_REFCOUNT_OVERFLOW: int#
AMDSMI_STATUS_DIRECTORY_NOT_FOUND: int#
AMDSMI_STATUS_IPC_ERROR: int#
AMDSMI_STATUS_BUSY: int#
AMDSMI_STATUS_NOT_FOUND: int#
AMDSMI_STATUS_NOT_INIT: int#
AMDSMI_STATUS_NO_SLOT: int#
AMDSMI_STATUS_DRIVER_NOT_LOADED: int#
AMDSMI_STATUS_MORE_DATA: int#
AMDSMI_STATUS_NO_DATA: int#
AMDSMI_STATUS_INSUFFICIENT_SIZE: int#
AMDSMI_STATUS_UNEXPECTED_SIZE: int#
AMDSMI_STATUS_UNEXPECTED_DATA: int#
AMDSMI_STATUS_NON_AMD_CPU: int#
AMDSMI_STATUS_NO_ENERGY_DRV: int#
AMDSMI_STATUS_NO_MSR_DRV: int#
AMDSMI_STATUS_NO_HSMP_DRV: int#
AMDSMI_STATUS_NO_HSMP_SUP: int#
AMDSMI_STATUS_NO_HSMP_MSG_SUP: int#
AMDSMI_STATUS_HSMP_TIMEOUT: int#
AMDSMI_STATUS_NO_DRV: int#
AMDSMI_STATUS_FILE_NOT_FOUND: int#
AMDSMI_STATUS_ARG_PTR_NULL: int#
AMDSMI_STATUS_AMDGPU_RESTART_ERR: int#
AMDSMI_STATUS_SETTING_UNAVAILABLE: int#
AMDSMI_STATUS_CORRUPTED_EEPROM: int#
AMDSMI_STATUS_MAP_ERROR: int#
AMDSMI_STATUS_UNKNOWN_ERROR: int#
class rocm.bindings.amdsmi.amdsmi_clk_type_t#

Bases: enum.IntEnum

Clock types

AMDSMI_CLK_TYPE_SYS: int#
AMDSMI_CLK_TYPE_FIRST: int#
AMDSMI_CLK_TYPE_GFX: int#
AMDSMI_CLK_TYPE_DF: int#
AMDSMI_CLK_TYPE_DCEF: int#
AMDSMI_CLK_TYPE_SOC: int#
AMDSMI_CLK_TYPE_MEM: int#
AMDSMI_CLK_TYPE_PCIE: int#
AMDSMI_CLK_TYPE_VCLK0: int#
AMDSMI_CLK_TYPE_VCLK1: int#
AMDSMI_CLK_TYPE_DCLK0: int#
AMDSMI_CLK_TYPE_DCLK1: int#
AMDSMI_CLK_TYPE__MAX: int#
class rocm.bindings.amdsmi.amdsmi_accelerator_partition_type_t#

Bases: enum.IntEnum

Accelerator Partition

AMDSMI_ACCELERATOR_PARTITION_INVALID: int#
AMDSMI_ACCELERATOR_PARTITION_SPX: int#
AMDSMI_ACCELERATOR_PARTITION_DPX: int#
AMDSMI_ACCELERATOR_PARTITION_TPX: int#
AMDSMI_ACCELERATOR_PARTITION_QPX: int#
AMDSMI_ACCELERATOR_PARTITION_CPX: int#
AMDSMI_ACCELERATOR_PARTITION_MAX: int#
class rocm.bindings.amdsmi.amdsmi_accelerator_partition_resource_type_t#

Bases: enum.IntEnum

Accelerator Partition Resource Types

AMDSMI_ACCELERATOR_XCC: int#
AMDSMI_ACCELERATOR_ENCODER: int#
AMDSMI_ACCELERATOR_DECODER: int#
AMDSMI_ACCELERATOR_DMA: int#
AMDSMI_ACCELERATOR_JPEG: int#
AMDSMI_ACCELERATOR_MAX: int#
class rocm.bindings.amdsmi.amdsmi_compute_partition_type_t#

Bases: enum.IntEnum

Compute Partition. This enum is used to identify various compute partitioning settings.

Deprecated:

This enum is slated for removal in a future ROCm release; use amdsmi_accelerator_partition_type_t instead

AMDSMI_COMPUTE_PARTITION_INVALID: int#
AMDSMI_COMPUTE_PARTITION_SPX: int#
AMDSMI_COMPUTE_PARTITION_DPX: int#
AMDSMI_COMPUTE_PARTITION_TPX: int#
AMDSMI_COMPUTE_PARTITION_QPX: int#
AMDSMI_COMPUTE_PARTITION_CPX: int#
class rocm.bindings.amdsmi.amdsmi_compute_partition_mem_alloc_mode_t#

Bases: enum.IntEnum

Compute Partition Memory Allocation Mode. Controls how GPU memory is allocated across XCPs within a memory partition.

Deprecated:

This enum is slated for removal in a future ROCm release; use amdsmi_accelerator_partition_mem_alloc_mode_t instead

AMDSMI_COMPUTE_PARTITION_MEM_ALLOC_INVALID: int#
AMDSMI_COMPUTE_PARTITION_MEM_ALLOC_CAPPING: int#
AMDSMI_COMPUTE_PARTITION_MEM_ALLOC_ALL: int#
class rocm.bindings.amdsmi.amdsmi_accelerator_partition_mem_alloc_mode_t#

Bases: enum.IntEnum

Accelerator Partition Memory Allocation Mode. Controls how GPU memory is allocated across XCPs within a memory partition.

AMDSMI_ACCELERATOR_PARTITION_MEM_ALLOC_INVALID: int#
AMDSMI_ACCELERATOR_PARTITION_MEM_ALLOC_CAPPING: int#
AMDSMI_ACCELERATOR_PARTITION_MEM_ALLOC_ALL: int#
class rocm.bindings.amdsmi.amdsmi_memory_partition_type_t#

Bases: enum.IntEnum

Memory Partitions

AMDSMI_MEMORY_PARTITION_UNKNOWN: int#
AMDSMI_MEMORY_PARTITION_NPS1: int#
AMDSMI_MEMORY_PARTITION_NPS2: int#
AMDSMI_MEMORY_PARTITION_NPS4: int#
AMDSMI_MEMORY_PARTITION_NPS8: int#
class rocm.bindings.amdsmi.amdsmi_temperature_type_t#

Bases: enum.IntEnum

This enumeration is used to indicate from which part of the processor a temperature reading should be obtained.

AMDSMI_TEMPERATURE_TYPE_EDGE: int#
AMDSMI_TEMPERATURE_TYPE_FIRST: int#
AMDSMI_TEMPERATURE_TYPE_HOTSPOT: int#
AMDSMI_TEMPERATURE_TYPE_JUNCTION: int#
AMDSMI_TEMPERATURE_TYPE_VRAM: int#
AMDSMI_TEMPERATURE_TYPE_HBM_0: int#
AMDSMI_TEMPERATURE_TYPE_HBM_1: int#
AMDSMI_TEMPERATURE_TYPE_HBM_2: int#
AMDSMI_TEMPERATURE_TYPE_HBM_3: int#
AMDSMI_TEMPERATURE_TYPE_PLX: int#
AMDSMI_TEMPERATURE_TYPE_GPUBOARD_NODE_FIRST: int#
AMDSMI_TEMPERATURE_TYPE_GPUBOARD_NODE_RETIMER_X: int#
AMDSMI_TEMPERATURE_TYPE_GPUBOARD_NODE_OAM_X_IBC: int#
AMDSMI_TEMPERATURE_TYPE_GPUBOARD_NODE_OAM_X_IBC_2: int#
AMDSMI_TEMPERATURE_TYPE_GPUBOARD_NODE_OAM_X_VDD18_VR: int#
AMDSMI_TEMPERATURE_TYPE_GPUBOARD_NODE_OAM_X_04_HBM_B_VR: int#
AMDSMI_TEMPERATURE_TYPE_GPUBOARD_NODE_OAM_X_04_HBM_D_VR: int#
AMDSMI_TEMPERATURE_TYPE_GPUBOARD_NODE_LAST: int#
AMDSMI_TEMPERATURE_TYPE_GPUBOARD_VR_FIRST: int#
AMDSMI_TEMPERATURE_TYPE_GPUBOARD_VDDCR_VDD0: int#
AMDSMI_TEMPERATURE_TYPE_GPUBOARD_VDDCR_VDD1: int#
AMDSMI_TEMPERATURE_TYPE_GPUBOARD_VDDCR_VDD2: int#
AMDSMI_TEMPERATURE_TYPE_GPUBOARD_VDDCR_VDD3: int#
AMDSMI_TEMPERATURE_TYPE_GPUBOARD_VDDCR_SOC_A: int#
AMDSMI_TEMPERATURE_TYPE_GPUBOARD_VDDCR_SOC_C: int#
AMDSMI_TEMPERATURE_TYPE_GPUBOARD_VDDCR_SOCIO_A: int#
AMDSMI_TEMPERATURE_TYPE_GPUBOARD_VDDCR_SOCIO_C: int#
AMDSMI_TEMPERATURE_TYPE_GPUBOARD_VDD_085_HBM: int#
AMDSMI_TEMPERATURE_TYPE_GPUBOARD_VDDCR_11_HBM_B: int#
AMDSMI_TEMPERATURE_TYPE_GPUBOARD_VDDCR_11_HBM_D: int#
AMDSMI_TEMPERATURE_TYPE_GPUBOARD_VDD_USR: int#
AMDSMI_TEMPERATURE_TYPE_GPUBOARD_VDDIO_11_E32: int#
AMDSMI_TEMPERATURE_TYPE_GPUBOARD_VDDIO_04_HBM_B: int#
AMDSMI_TEMPERATURE_TYPE_GPUBOARD_VDDIO_04_HBM_D: int#
AMDSMI_TEMPERATURE_TYPE_GPUBOARD_VDDCR_075_HBM_B: int#
AMDSMI_TEMPERATURE_TYPE_GPUBOARD_VDDCR_075_HBM_D: int#
AMDSMI_TEMPERATURE_TYPE_GPUBOARD_VDDIO_11_GTA_A: int#
AMDSMI_TEMPERATURE_TYPE_GPUBOARD_VDDIO_11_GTA_C: int#
AMDSMI_TEMPERATURE_TYPE_GPUBOARD_VDDAN_075_GTA_A: int#
AMDSMI_TEMPERATURE_TYPE_GPUBOARD_VDDAN_075_GTA_C: int#
AMDSMI_TEMPERATURE_TYPE_GPUBOARD_VDDCR_075_UCIE: int#
AMDSMI_TEMPERATURE_TYPE_GPUBOARD_VDDIO_065_UCIEAA: int#
AMDSMI_TEMPERATURE_TYPE_GPUBOARD_VDDIO_065_UCIEAM_A: int#
AMDSMI_TEMPERATURE_TYPE_GPUBOARD_VDDIO_065_UCIEAM_C: int#
AMDSMI_TEMPERATURE_TYPE_GPUBOARD_VDDAN_075: int#
AMDSMI_TEMPERATURE_TYPE_GPUBOARD_VR_LAST: int#
AMDSMI_TEMPERATURE_TYPE_GPUBOARD_LAST: int#
AMDSMI_TEMPERATURE_TYPE_BASEBOARD_FIRST: int#
AMDSMI_TEMPERATURE_TYPE_BASEBOARD_UBB_FPGA: int#
AMDSMI_TEMPERATURE_TYPE_BASEBOARD_UBB_FRONT: int#
AMDSMI_TEMPERATURE_TYPE_BASEBOARD_UBB_BACK: int#
AMDSMI_TEMPERATURE_TYPE_BASEBOARD_UBB_OAM7: int#
AMDSMI_TEMPERATURE_TYPE_BASEBOARD_UBB_IBC: int#
AMDSMI_TEMPERATURE_TYPE_BASEBOARD_UBB_UFPGA: int#
AMDSMI_TEMPERATURE_TYPE_BASEBOARD_UBB_OAM1: int#
AMDSMI_TEMPERATURE_TYPE_BASEBOARD_OAM_0_1_HSC: int#
AMDSMI_TEMPERATURE_TYPE_BASEBOARD_OAM_2_3_HSC: int#
AMDSMI_TEMPERATURE_TYPE_BASEBOARD_OAM_4_5_HSC: int#
AMDSMI_TEMPERATURE_TYPE_BASEBOARD_OAM_6_7_HSC: int#
AMDSMI_TEMPERATURE_TYPE_BASEBOARD_UBB_FPGA_0V72_VR: int#
AMDSMI_TEMPERATURE_TYPE_BASEBOARD_UBB_FPGA_3V3_VR: int#
AMDSMI_TEMPERATURE_TYPE_BASEBOARD_RETIMER_0_1_2_3_1V2_VR: int#
AMDSMI_TEMPERATURE_TYPE_BASEBOARD_RETIMER_4_5_6_7_1V2_VR: int#
AMDSMI_TEMPERATURE_TYPE_BASEBOARD_RETIMER_0_1_0V9_VR: int#
AMDSMI_TEMPERATURE_TYPE_BASEBOARD_RETIMER_4_5_0V9_VR: int#
AMDSMI_TEMPERATURE_TYPE_BASEBOARD_RETIMER_2_3_0V9_VR: int#
AMDSMI_TEMPERATURE_TYPE_BASEBOARD_RETIMER_6_7_0V9_VR: int#
AMDSMI_TEMPERATURE_TYPE_BASEBOARD_OAM_0_1_2_3_3V3_VR: int#
AMDSMI_TEMPERATURE_TYPE_BASEBOARD_OAM_4_5_6_7_3V3_VR: int#
AMDSMI_TEMPERATURE_TYPE_BASEBOARD_IBC_HSC: int#
AMDSMI_TEMPERATURE_TYPE_BASEBOARD_IBC: int#
AMDSMI_TEMPERATURE_TYPE_BASEBOARD_LAST: int#
AMDSMI_TEMPERATURE_TYPE__MAX: int#
class rocm.bindings.amdsmi.amdsmi_fw_block_t#

Bases: enum.IntEnum

The values of this enum are used to identify the various firmware blocks.

AMDSMI_FW_ID_SMU: int#
AMDSMI_FW_ID_FIRST: int#
AMDSMI_FW_ID_CP_CE: int#
AMDSMI_FW_ID_CP_PFP: int#
AMDSMI_FW_ID_CP_ME: int#
AMDSMI_FW_ID_CP_MEC_JT1: int#
AMDSMI_FW_ID_CP_MEC_JT2: int#
AMDSMI_FW_ID_CP_MEC1: int#
AMDSMI_FW_ID_CP_MEC2: int#
AMDSMI_FW_ID_RLC: int#
AMDSMI_FW_ID_SDMA0: int#
AMDSMI_FW_ID_SDMA1: int#
AMDSMI_FW_ID_SDMA2: int#
AMDSMI_FW_ID_SDMA3: int#
AMDSMI_FW_ID_SDMA4: int#
AMDSMI_FW_ID_SDMA5: int#
AMDSMI_FW_ID_SDMA6: int#
AMDSMI_FW_ID_SDMA7: int#
AMDSMI_FW_ID_VCN: int#
AMDSMI_FW_ID_UVD: int#
AMDSMI_FW_ID_VCE: int#
AMDSMI_FW_ID_ISP: int#
AMDSMI_FW_ID_DMCU_ERAM: int#
AMDSMI_FW_ID_DMCU_ISR: int#
AMDSMI_FW_ID_RLC_RESTORE_LIST_GPM_MEM: int#
AMDSMI_FW_ID_RLC_RESTORE_LIST_SRM_MEM: int#
AMDSMI_FW_ID_RLC_RESTORE_LIST_CNTL: int#
AMDSMI_FW_ID_RLC_V: int#
AMDSMI_FW_ID_MMSCH: int#
AMDSMI_FW_ID_PSP_SYSDRV: int#
AMDSMI_FW_ID_PSP_SOSDRV: int#
AMDSMI_FW_ID_PSP_TOC: int#
AMDSMI_FW_ID_PSP_KEYDB: int#
AMDSMI_FW_ID_DFC: int#
AMDSMI_FW_ID_PSP_SPL: int#
AMDSMI_FW_ID_DRV_CAP: int#
AMDSMI_FW_ID_MC: int#
AMDSMI_FW_ID_PSP_BL: int#
AMDSMI_FW_ID_CP_PM4: int#
AMDSMI_FW_ID_RLC_P: int#
AMDSMI_FW_ID_SEC_POLICY_STAGE2: int#
AMDSMI_FW_ID_REG_ACCESS_WHITELIST: int#
AMDSMI_FW_ID_IMU_DRAM: int#
AMDSMI_FW_ID_IMU_IRAM: int#
AMDSMI_FW_ID_SDMA_TH0: int#
AMDSMI_FW_ID_SDMA_TH1: int#
AMDSMI_FW_ID_CP_MES: int#
AMDSMI_FW_ID_MES_KIQ: int#
AMDSMI_FW_ID_MES_STACK: int#
AMDSMI_FW_ID_MES_THREAD1: int#
AMDSMI_FW_ID_MES_THREAD1_STACK: int#
AMDSMI_FW_ID_RLX6: int#
AMDSMI_FW_ID_RLX6_DRAM_BOOT: int#
AMDSMI_FW_ID_RS64_ME: int#
AMDSMI_FW_ID_RS64_ME_P0_DATA: int#
AMDSMI_FW_ID_RS64_ME_P1_DATA: int#
AMDSMI_FW_ID_RS64_PFP: int#
AMDSMI_FW_ID_RS64_PFP_P0_DATA: int#
AMDSMI_FW_ID_RS64_PFP_P1_DATA: int#
AMDSMI_FW_ID_RS64_MEC: int#
AMDSMI_FW_ID_RS64_MEC_P0_DATA: int#
AMDSMI_FW_ID_RS64_MEC_P1_DATA: int#
AMDSMI_FW_ID_RS64_MEC_P2_DATA: int#
AMDSMI_FW_ID_RS64_MEC_P3_DATA: int#
AMDSMI_FW_ID_PPTABLE: int#
AMDSMI_FW_ID_PSP_SOC: int#
AMDSMI_FW_ID_PSP_DBG: int#
AMDSMI_FW_ID_PSP_INTF: int#
AMDSMI_FW_ID_RLX6_CORE1: int#
AMDSMI_FW_ID_RLX6_DRAM_BOOT_CORE1: int#
AMDSMI_FW_ID_RLCV_LX7: int#
AMDSMI_FW_ID_RLC_SAVE_RESTORE_LIST: int#
AMDSMI_FW_ID_ASD: int#
AMDSMI_FW_ID_TA_RAS: int#
AMDSMI_FW_ID_TA_XGMI: int#
AMDSMI_FW_ID_RLC_SRLG: int#
AMDSMI_FW_ID_RLC_SRLS: int#
AMDSMI_FW_ID_PM: int#
AMDSMI_FW_ID_DMCU: int#
AMDSMI_FW_ID_PLDM_BUNDLE: int#
AMDSMI_FW_ID__MAX: int#
class rocm.bindings.amdsmi.amdsmi_vram_type_t#

Bases: enum.IntEnum

vRam Types. This enum is used to identify various VRam types.

AMDSMI_VRAM_TYPE_UNKNOWN: int#
AMDSMI_VRAM_TYPE_HBM: int#
AMDSMI_VRAM_TYPE_HBM2: int#
AMDSMI_VRAM_TYPE_HBM2E: int#
AMDSMI_VRAM_TYPE_HBM3: int#
AMDSMI_VRAM_TYPE_HBM3E: int#
AMDSMI_VRAM_TYPE_DDR2: int#
AMDSMI_VRAM_TYPE_DDR3: int#
AMDSMI_VRAM_TYPE_DDR4: int#
AMDSMI_VRAM_TYPE_DDR5: int#
AMDSMI_VRAM_TYPE_GDDR1: int#
AMDSMI_VRAM_TYPE_GDDR2: int#
AMDSMI_VRAM_TYPE_GDDR3: int#
AMDSMI_VRAM_TYPE_GDDR4: int#
AMDSMI_VRAM_TYPE_GDDR5: int#
AMDSMI_VRAM_TYPE_GDDR6: int#
AMDSMI_VRAM_TYPE_GDDR7: int#
AMDSMI_VRAM_TYPE_LPDDR4: int#
AMDSMI_VRAM_TYPE_LPDDR5: int#
AMDSMI_VRAM_TYPE__MAX: int#
class rocm.bindings.amdsmi.amdsmi_range_t(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

This structure represents a range (e.g., frequencies or voltages).

lower_bound: Any#
upper_bound: Any#
reserved: Any#
static PROPERTIES() → list[str]#
static fromObj(pyobj) → Any#
static allocate(count: int = 1) → Any#
c_sizeof() → int#
as_c_void_p() → Any#
class rocm.bindings.amdsmi.amdsmi_xgmi_info_t(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

XGMI Information

xgmi_lanes: Any#
xgmi_hive_id: Any#
xgmi_node_id: Any#
index: Any#
reserved: Any#
static PROPERTIES() → list[str]#
static fromObj(pyobj) → Any#
static allocate(count: int = 1) → Any#
c_sizeof() → int#
as_c_void_p() → Any#
class rocm.bindings.amdsmi.amdsmi_vram_usage_t(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

VRam Usage

vram_total: Any#
vram_used: Any#
reserved: Any#
static PROPERTIES() → list[str]#
static fromObj(pyobj) → Any#
static allocate(count: int = 1) → Any#
c_sizeof() → int#
as_c_void_p() → Any#
class rocm.bindings.amdsmi.amdsmi_violation_status_t(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

This structure hold violation status information. Note: for MI3x asics and higher, older ASICs will show unsupported.

reference_timestamp: Any#
violation_timestamp: Any#
acc_counter: Any#
acc_prochot_thrm: Any#
acc_ppt_pwr: Any#
acc_socket_thrm: Any#
acc_vr_thrm: Any#
acc_hbm_thrm: Any#
acc_gfx_clk_below_host_limit: Any#
per_prochot_thrm: Any#
per_ppt_pwr: Any#
per_socket_thrm: Any#
per_vr_thrm: Any#
per_hbm_thrm: Any#
per_gfx_clk_below_host_limit: Any#
active_prochot_thrm: Any#
active_ppt_pwr: Any#
active_socket_thrm: Any#
active_vr_thrm: Any#
active_hbm_thrm: Any#
active_gfx_clk_below_host_limit: Any#
static PROPERTIES() → list[str]#
static fromObj(pyobj) → Any#
static allocate(count: int = 1) → Any#
c_sizeof() → int#
as_c_void_p() → Any#
class rocm.bindings.amdsmi.amdsmi_frequency_range_t(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

Frequency Range

supported_freq_range: Any#
current_freq_range: Any#
reserved: Any#
static PROPERTIES() → list[str]#
static fromObj(pyobj) → Any#
static allocate(count: int = 1) → Any#
c_sizeof() → int#
as_c_void_p() → Any#
class rocm.bindings.amdsmi.amdsmi_bdf_t_bdf_(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

(No short description)

function_number: Any#
device_number: Any#
bus_number: Any#
domain_number: Any#
static PROPERTIES() → list[str]#
static fromObj(pyobj) → Any#
static allocate(count: int = 1) → Any#
c_sizeof() → int#
as_c_void_p() → Any#
class rocm.bindings.amdsmi.amdsmi_bdf_t_struct_0(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

(No short description)

function_number: Any#
device_number: Any#
bus_number: Any#
domain_number: Any#
static PROPERTIES() → list[str]#
static fromObj(pyobj) → Any#
static allocate(count: int = 1) → Any#
c_sizeof() → int#
as_c_void_p() → Any#
class rocm.bindings.amdsmi.amdsmi_bdf_t(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

bdf types

bdf: Any#
as_uint: Any#
static PROPERTIES() → list[str]#
static fromObj(pyobj) → Any#
static allocate(count: int = 1) → Any#
c_sizeof() → int#
as_c_void_p() → Any#
class rocm.bindings.amdsmi.amdsmi_enumeration_info_t(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

Structure holds enumeration information

drm_render: Any#
drm_card: Any#
hsa_id: Any#
hip_id: Any#
hip_uuid: Any#
oam_id: Any#
static PROPERTIES() → list[str]#
static fromObj(pyobj) → Any#
static allocate(count: int = 1) → Any#
c_sizeof() → int#
as_c_void_p() → Any#
class rocm.bindings.amdsmi.amdsmi_card_form_factor_t#

Bases: enum.IntEnum

Card Form Factor

AMDSMI_CARD_FORM_FACTOR_PCIE: int#
AMDSMI_CARD_FORM_FACTOR_OAM: int#
AMDSMI_CARD_FORM_FACTOR_CEM: int#
AMDSMI_CARD_FORM_FACTOR_UNKNOWN: int#
class rocm.bindings.amdsmi.amdsmi_pcie_info_t_pcie_static_(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

(No short description)

max_pcie_width: Any#
max_pcie_speed: Any#
pcie_interface_version: Any#
slot_type: Any#
max_pcie_interface_version: Any#
reserved: Any#
static PROPERTIES() → list[str]#
static fromObj(pyobj) → Any#
static allocate(count: int = 1) → Any#
c_sizeof() → int#
as_c_void_p() → Any#
class rocm.bindings.amdsmi.amdsmi_pcie_info_t_pcie_metric_(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

(No short description)

pcie_width: Any#
pcie_speed: Any#
pcie_bandwidth: Any#
pcie_replay_count: Any#
pcie_l0_to_recovery_count: Any#
pcie_replay_roll_over_count: Any#
pcie_nak_sent_count: Any#
pcie_nak_received_count: Any#
pcie_lc_perf_other_end_recovery_count: Any#
reserved: Any#
static PROPERTIES() → list[str]#
static fromObj(pyobj) → Any#
static allocate(count: int = 1) → Any#
c_sizeof() → int#
as_c_void_p() → Any#
class rocm.bindings.amdsmi.amdsmi_pcie_info_t(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

pcie information

pcie_static: Any#
pcie_metric: Any#
reserved: Any#
static PROPERTIES() → list[str]#
static fromObj(pyobj) → Any#
static allocate(count: int = 1) → Any#
c_sizeof() → int#
as_c_void_p() → Any#
class rocm.bindings.amdsmi.amdsmi_power_cap_info_t(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

Power Cap Information

power_cap: Any#
default_power_cap: Any#
dpm_cap: Any#
min_power_cap: Any#
max_power_cap: Any#
reserved: Any#
static PROPERTIES() → list[str]#
static fromObj(pyobj) → Any#
static allocate(count: int = 1) → Any#
c_sizeof() → int#
as_c_void_p() → Any#
class rocm.bindings.amdsmi.amdsmi_power_cap_type_t#

Bases: enum.IntEnum

Power Cap Package Power Tracking (PPT) type

AMDSMI_POWER_CAP_TYPE_PPT0: int#
AMDSMI_POWER_CAP_TYPE_PPT1: int#
class rocm.bindings.amdsmi.amdsmi_vbios_info_t(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

VBios Information

name: Any#
build_date: Any#
part_number: Any#
version: Any#
boot_firmware: Any#
reserved: Any#
static PROPERTIES() → list[str]#
static fromObj(pyobj) → Any#
static allocate(count: int = 1) → Any#
c_sizeof() → int#
as_c_void_p() → Any#
class rocm.bindings.amdsmi.amdsmi_cache_property_type_t#

Bases: enum.IntEnum

cache properties

AMDSMI_CACHE_PROPERTY_ENABLED: int#
AMDSMI_CACHE_PROPERTY_DATA_CACHE: int#
AMDSMI_CACHE_PROPERTY_INST_CACHE: int#
AMDSMI_CACHE_PROPERTY_CPU_CACHE: int#
AMDSMI_CACHE_PROPERTY_SIMD_CACHE: int#
class rocm.bindings.amdsmi.amdsmi_gpu_cache_info_t_cache_(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

(No short description)

cache_properties: Any#
cache_size: Any#
cache_level: Any#
max_num_cu_shared: Any#
num_cache_instance: Any#
reserved: Any#
static PROPERTIES() → list[str]#
static fromObj(pyobj) → Any#
static allocate(count: int = 1) → Any#
c_sizeof() → int#
as_c_void_p() → Any#
class rocm.bindings.amdsmi.amdsmi_gpu_cache_info_t(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

GPU Cache Information

num_cache_types: Any#
reserved: Any#
static PROPERTIES() → list[str]#
static fromObj(pyobj) → Any#
static allocate(count: int = 1) → Any#
c_sizeof() → int#
as_c_void_p() → Any#
class rocm.bindings.amdsmi.amdsmi_fw_info_t_fw_info_list_(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

(No short description)

fw_id: Any#
fw_version: Any#
reserved: Any#
static PROPERTIES() → list[str]#
static fromObj(pyobj) → Any#
static allocate(count: int = 1) → Any#
c_sizeof() → int#
as_c_void_p() → Any#
class rocm.bindings.amdsmi.amdsmi_fw_info_t(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

Firmware Information

num_fw_info: Any#
reserved: Any#
static PROPERTIES() → list[str]#
static fromObj(pyobj) → Any#
static allocate(count: int = 1) → Any#
c_sizeof() → int#
as_c_void_p() → Any#
class rocm.bindings.amdsmi.amdsmi_asic_info_t(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

ASIC Information

market_name: Any#
vendor_id: Any#
vendor_name: Any#
subvendor_id: Any#
device_id: Any#
rev_id: Any#
asic_serial: Any#
oam_id: Any#
num_of_compute_units: Any#
target_graphics_version: Any#
subsystem_id: Any#
flags: Any#
reserved: Any#
static PROPERTIES() → list[str]#
static fromObj(pyobj) → Any#
static allocate(count: int = 1) → Any#
c_sizeof() → int#
as_c_void_p() → Any#
class rocm.bindings.amdsmi.amdsmi_kfd_info_t(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

Structure holds kfd information

kfd_id: Any#
node_id: Any#
current_partition_id: Any#
reserved: Any#
static PROPERTIES() → list[str]#
static fromObj(pyobj) → Any#
static allocate(count: int = 1) → Any#
c_sizeof() → int#
as_c_void_p() → Any#
class rocm.bindings.amdsmi.amdsmi_nps_caps_t_nps_flags_(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

(No short description)

nps1_cap: Any#
nps2_cap: Any#
nps4_cap: Any#
nps8_cap: Any#
reserved: Any#
static PROPERTIES() → list[str]#
static fromObj(pyobj) → Any#
static allocate(count: int = 1) → Any#
c_sizeof() → int#
as_c_void_p() → Any#
class rocm.bindings.amdsmi.amdsmi_nps_caps_t(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

This union holds memory partition bitmask.

nps_flags: Any#
nps_cap_mask: Any#
static PROPERTIES() → list[str]#
static fromObj(pyobj) → Any#
static allocate(count: int = 1) → Any#
c_sizeof() → int#
as_c_void_p() → Any#
class rocm.bindings.amdsmi.amdsmi_memory_partition_config_t_numa_range_(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

(No short description)

memory_type: Any#
start: Any#
end: Any#
static PROPERTIES() → list[str]#
static fromObj(pyobj) → Any#
static allocate(count: int = 1) → Any#
c_sizeof() → int#
as_c_void_p() → Any#
class rocm.bindings.amdsmi.amdsmi_memory_partition_config_t(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

Memory Partition Configuration. This structure is used to identify various memory partition configurations.

partition_caps: Any#
mp_mode: Any#
num_numa_ranges: Any#
reserved: Any#
static PROPERTIES() → list[str]#
static fromObj(pyobj) → Any#
static allocate(count: int = 1) → Any#
c_sizeof() → int#
as_c_void_p() → Any#
class rocm.bindings.amdsmi.amdsmi_accelerator_partition_profile_t(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

Accelerator Partition Resource Profile

profile_type: Any#
num_partitions: Any#
memory_caps: Any#
profile_index: Any#
num_resources: Any#
reserved: Any#
static PROPERTIES() → list[str]#
static fromObj(pyobj) → Any#
static allocate(count: int = 1) → Any#
c_sizeof() → int#
as_c_void_p() → Any#
class rocm.bindings.amdsmi.amdsmi_accelerator_partition_resource_profile_t(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

Accelerator Partition Resources. This struct is used to identify various partition resource profiles.

profile_index: Any#
resource_type: Any#
partition_resource: Any#
num_partitions_share_resource: Any#
reserved: Any#
static PROPERTIES() → list[str]#
static fromObj(pyobj) → Any#
static allocate(count: int = 1) → Any#
c_sizeof() → int#
as_c_void_p() → Any#
class rocm.bindings.amdsmi.amdsmi_accelerator_partition_profile_config_t(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

Accelerator Partition Profile Configurations

num_profiles: Any#
num_resource_profiles: Any#
default_profile_index: Any#
reserved: Any#
static PROPERTIES() → list[str]#
static fromObj(pyobj) → Any#
static allocate(count: int = 1) → Any#
c_sizeof() → int#
as_c_void_p() → Any#

Bases: enum.IntEnum

Link type

class rocm.bindings.amdsmi.amdsmi_cpu_util_t(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

This structure holds CPU utilization information.

cpu_util_total: Any#
cpu_util_user: Any#
cpu_util_nice: Any#
cpu_util_sys: Any#
cpu_util_irq: Any#
static PROPERTIES() → list[str]#
static fromObj(pyobj) → Any#
static allocate(count: int = 1) → Any#
c_sizeof() → int#
as_c_void_p() → Any#

Bases: enum.IntEnum

Link Status

Bases: rocm.bindings.util.types.Pointer

(No short description)

Bases: rocm.bindings.util.types.Pointer

Link Metrics

class rocm.bindings.amdsmi.amdsmi_vram_info_t(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

VRam Information

vram_type: Any#
vram_vendor: Any#
vram_size: Any#
vram_bit_width: Any#
vram_max_bandwidth: Any#
reserved: Any#
static PROPERTIES() → list[str]#
static fromObj(pyobj) → Any#
static allocate(count: int = 1) → Any#
c_sizeof() → int#
as_c_void_p() → Any#
class rocm.bindings.amdsmi.amdsmi_driver_info_t(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

Driver Information

driver_version: Any#
driver_date: Any#
driver_name: Any#
static PROPERTIES() → list[str]#
static fromObj(pyobj) → Any#
static allocate(count: int = 1) → Any#
c_sizeof() → int#
as_c_void_p() → Any#
class rocm.bindings.amdsmi.amdsmi_board_info_t(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

Board Information

model_number: Any#
product_serial: Any#
fru_id: Any#
product_name: Any#
manufacturer_name: Any#
reserved: Any#
static PROPERTIES() → list[str]#
static fromObj(pyobj) → Any#
static allocate(count: int = 1) → Any#
c_sizeof() → int#
as_c_void_p() → Any#
class rocm.bindings.amdsmi.amdsmi_power_info_t(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

Power Information

Note:

Unsupported struct members are set to UINT32_MAX

socket_power: Any#
current_socket_power: Any#
average_socket_power: Any#
gfx_voltage: Any#
soc_voltage: Any#
mem_voltage: Any#
power_limit: Any#
ubb_power: Any#
reserved: Any#
static PROPERTIES() → list[str]#
static fromObj(pyobj) → Any#
static allocate(count: int = 1) → Any#
c_sizeof() → int#
as_c_void_p() → Any#
class rocm.bindings.amdsmi.amdsmi_clk_info_t(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

Clock Information

clk: Any#
min_clk: Any#
max_clk: Any#
clk_locked: Any#
clk_deep_sleep: Any#
reserved: Any#
static PROPERTIES() → list[str]#
static fromObj(pyobj) → Any#
static allocate(count: int = 1) → Any#
c_sizeof() → int#
as_c_void_p() → Any#
class rocm.bindings.amdsmi.amdsmi_engine_usage_t(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

Engine Usage amdsmi_engine_usage_t: This structure holds common GPU activity values seen in both BM or SRIOV

gfx_activity: Any#
umc_activity: Any#
mm_activity: Any#
reserved: Any#
static PROPERTIES() → list[str]#
static fromObj(pyobj) → Any#
static allocate(count: int = 1) → Any#
c_sizeof() → int#
as_c_void_p() → Any#
class rocm.bindings.amdsmi.amdsmi_proc_info_t_engine_usage_(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

(No short description)

gfx: Any#
enc: Any#
reserved: Any#
static PROPERTIES() → list[str]#
static fromObj(pyobj) → Any#
static allocate(count: int = 1) → Any#
c_sizeof() → int#
as_c_void_p() → Any#
class rocm.bindings.amdsmi.amdsmi_proc_info_t_memory_usage_(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

(No short description)

gtt_mem: Any#
cpu_mem: Any#
vram_mem: Any#
reserved: Any#
static PROPERTIES() → list[str]#
static fromObj(pyobj) → Any#
static allocate(count: int = 1) → Any#
c_sizeof() → int#
as_c_void_p() → Any#
class rocm.bindings.amdsmi.amdsmi_proc_info_t(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

Process Information

name: Any#
pid: Any#
mem: Any#
engine_usage: Any#
memory_usage: Any#
container_name: Any#
cu_occupancy: Any#
evicted_time: Any#
sdma_usage: Any#
reserved: Any#
static PROPERTIES() → list[str]#
static fromObj(pyobj) → Any#
static allocate(count: int = 1) → Any#
c_sizeof() → int#
as_c_void_p() → Any#
class rocm.bindings.amdsmi.amdsmi_proc_gpu_entry_t_struct_0(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

(No short description)

gfx: Any#
enc: Any#
reserved: Any#
static PROPERTIES() → list[str]#
static fromObj(pyobj) → Any#
static allocate(count: int = 1) → Any#
c_sizeof() → int#
as_c_void_p() → Any#
class rocm.bindings.amdsmi.amdsmi_proc_gpu_entry_t_struct_1(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

(No short description)

gtt_mem: Any#
cpu_mem: Any#
vram_mem: Any#
reserved: Any#
static PROPERTIES() → list[str]#
static fromObj(pyobj) → Any#
static allocate(count: int = 1) → Any#
c_sizeof() → int#
as_c_void_p() → Any#
class rocm.bindings.amdsmi.amdsmi_proc_gpu_entry_t(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

Per-GPU process entry within a PID-grouped result.

gpu_index: Any#
mem: Any#
engine_usage: Any#
memory_usage: Any#
cu_occupancy: Any#
evicted_time: Any#
sdma_usage: Any#
reserved: Any#
static PROPERTIES() → list[str]#
static fromObj(pyobj) → Any#
static allocate(count: int = 1) → Any#
c_sizeof() → int#
as_c_void_p() → Any#
class rocm.bindings.amdsmi.amdsmi_proc_info_by_pid_t(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

Process info aggregated across all GPUs, keyed by PID.

pid: Any#
name: Any#
container_name: Any#
num_gpus: Any#
static PROPERTIES() → list[str]#
static fromObj(pyobj) → Any#
static allocate(count: int = 1) → Any#
c_sizeof() → int#
as_c_void_p() → Any#
class rocm.bindings.amdsmi.amdsmi_p2p_capability_t(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

IO Link P2P Capability

static PROPERTIES() → list[str]#
static fromObj(pyobj) → Any#
static allocate(count: int = 1) → Any#
c_sizeof() → int#
as_c_void_p() → Any#
class rocm.bindings.amdsmi.amdsmi_dev_perf_level_t#

Bases: enum.IntEnum

PowerPlay performance levels

AMDSMI_DEV_PERF_LEVEL_AUTO: int#
AMDSMI_DEV_PERF_LEVEL_FIRST: int#
AMDSMI_DEV_PERF_LEVEL_LOW: int#
AMDSMI_DEV_PERF_LEVEL_HIGH: int#
AMDSMI_DEV_PERF_LEVEL_MANUAL: int#
AMDSMI_DEV_PERF_LEVEL_STABLE_STD: int#
AMDSMI_DEV_PERF_LEVEL_STABLE_PEAK: int#
AMDSMI_DEV_PERF_LEVEL_STABLE_MIN_MCLK: int#
AMDSMI_DEV_PERF_LEVEL_STABLE_MIN_SCLK: int#
AMDSMI_DEV_PERF_LEVEL_DETERMINISM: int#
AMDSMI_DEV_PERF_LEVEL_LAST: int#
AMDSMI_DEV_PERF_LEVEL_UNKNOWN: int#
class rocm.bindings.amdsmi.amdsmi_event_group_t#

Bases: enum.IntEnum

Event Groups Enum denoting an event group. The value of the enum is the base value for all the event enums in the group.

AMDSMI_EVNT_GRP_XGMI: int#
AMDSMI_EVNT_GRP_XGMI_DATA_OUT: int#
AMDSMI_EVNT_GRP_INVALID: int#
class rocm.bindings.amdsmi.amdsmi_event_type_t#

Bases: enum.IntEnum

Event types Event type enum. Events belonging to a particular event group ::amdsmi_event_group_t should begin enumerating at the ::amdsmi_event_group_t value for that group.

Data beats sent to neighbor 0; Each beat represents 32 bytes.

XGMI throughput can be calculated by multiplying a BEATs event such as ::AMDSMI_EVNT_XGMI_0_BEATS_TX by 32 and dividing by the time for which event collection occurred, ::amdsmi_counter_value_t.time_running (which is in nanoseconds). To get bytes per second, multiply this value by 10<sup>9</sup>.

Throughput = BEATS/time_running * 10<sup>9</sup> (bytes/second)

Events in the AMDSMI_EVNT_GRP_XGMI_DATA_OUT group measure the number of beats sent on an XGMI link. Each beat represents 32 bytes. AMDSMI_EVNT_XGMI_DATA_OUT_n represents the number of outbound beats (each representing 32 bytes) on link n.

XGMI throughput can be calculated by multiplying a event such as ::AMDSMI_EVNT_XGMI_DATA_OUT_n by 32 and dividing by the time for which event collection occurred, ::amdsmi_counter_value_t.time_running (which is in nanoseconds). To get bytes per second, multiply this value by 10<sup>9</sup>.

AMDSMI_EVNT_FIRST: int#
AMDSMI_EVNT_XGMI_FIRST: int#
AMDSMI_EVNT_XGMI_0_NOP_TX: int#
AMDSMI_EVNT_XGMI_0_REQUEST_TX: int#
AMDSMI_EVNT_XGMI_0_RESPONSE_TX: int#
AMDSMI_EVNT_XGMI_0_BEATS_TX: int#
AMDSMI_EVNT_XGMI_1_NOP_TX: int#
AMDSMI_EVNT_XGMI_1_REQUEST_TX: int#
AMDSMI_EVNT_XGMI_1_RESPONSE_TX: int#
AMDSMI_EVNT_XGMI_1_BEATS_TX: int#
AMDSMI_EVNT_XGMI_LAST: int#
AMDSMI_EVNT_XGMI_DATA_OUT_FIRST: int#
AMDSMI_EVNT_XGMI_DATA_OUT_0: int#
AMDSMI_EVNT_XGMI_DATA_OUT_1: int#
AMDSMI_EVNT_XGMI_DATA_OUT_2: int#
AMDSMI_EVNT_XGMI_DATA_OUT_3: int#
AMDSMI_EVNT_XGMI_DATA_OUT_4: int#
AMDSMI_EVNT_XGMI_DATA_OUT_5: int#
AMDSMI_EVNT_XGMI_DATA_OUT_LAST: int#
AMDSMI_EVNT_LAST: int#
class rocm.bindings.amdsmi.amdsmi_counter_command_t#

Bases: enum.IntEnum

Event counter commands

AMDSMI_CNTR_CMD_START: int#
AMDSMI_CNTR_CMD_STOP: int#
class rocm.bindings.amdsmi.amdsmi_counter_value_t(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

Counter value

value: Any#
time_enabled: Any#
time_running: Any#
static PROPERTIES() → list[str]#
static fromObj(pyobj) → Any#
static allocate(count: int = 1) → Any#
c_sizeof() → int#
as_c_void_p() → Any#
class rocm.bindings.amdsmi.amdsmi_evt_notification_type_t#

Bases: enum.IntEnum

Event notification event types

AMDSMI_EVT_NOTIF_NONE: int#
AMDSMI_EVT_NOTIF_VMFAULT: int#
AMDSMI_EVT_NOTIF_FIRST: int#
AMDSMI_EVT_NOTIF_THERMAL_THROTTLE: int#
AMDSMI_EVT_NOTIF_GPU_PRE_RESET: int#
AMDSMI_EVT_NOTIF_GPU_POST_RESET: int#
AMDSMI_EVT_NOTIF_MIGRATE_START: int#
AMDSMI_EVT_NOTIF_MIGRATE_END: int#
AMDSMI_EVT_NOTIF_PAGE_FAULT_START: int#
AMDSMI_EVT_NOTIF_PAGE_FAULT_END: int#
AMDSMI_EVT_NOTIF_QUEUE_EVICTION: int#
AMDSMI_EVT_NOTIF_QUEUE_RESTORE: int#
AMDSMI_EVT_NOTIF_UNMAP_FROM_GPU: int#
AMDSMI_EVT_NOTIF_PROCESS_START: int#
AMDSMI_EVT_NOTIF_PROCESS_END: int#
AMDSMI_EVT_NOTIF_LAST: int#
class rocm.bindings.amdsmi.amdsmi_evt_notification_data_t(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

Event notification data returned from event notification API

processor_handle: Any#
event: Any#
message: Any#
static PROPERTIES() → list[str]#
static fromObj(pyobj) → Any#
static allocate(count: int = 1) → Any#
c_sizeof() → int#
as_c_void_p() → Any#
class rocm.bindings.amdsmi.amdsmi_temperature_metric_t#

Bases: enum.IntEnum

Temperature Metrics. This enum is used to identify various temperature metrics. Corresponding values will be in Celsius

AMDSMI_TEMP_CURRENT: int#
AMDSMI_TEMP_FIRST: int#
AMDSMI_TEMP_MAX: int#
AMDSMI_TEMP_MIN: int#
AMDSMI_TEMP_MAX_HYST: int#
AMDSMI_TEMP_MIN_HYST: int#
AMDSMI_TEMP_CRITICAL: int#
AMDSMI_TEMP_CRITICAL_HYST: int#
AMDSMI_TEMP_EMERGENCY: int#
AMDSMI_TEMP_EMERGENCY_HYST: int#
AMDSMI_TEMP_CRIT_MIN: int#
AMDSMI_TEMP_CRIT_MIN_HYST: int#
AMDSMI_TEMP_OFFSET: int#
AMDSMI_TEMP_LOWEST: int#
AMDSMI_TEMP_HIGHEST: int#
AMDSMI_TEMP_SHUTDOWN: int#
AMDSMI_TEMP_LAST: int#
class rocm.bindings.amdsmi.amdsmi_voltage_metric_t#

Bases: enum.IntEnum

Voltage Metrics. This enum is used to identify various Voltage metrics. Corresponding values will be in millivolt.

AMDSMI_VOLT_CURRENT: int#
AMDSMI_VOLT_FIRST: int#
AMDSMI_VOLT_MAX: int#
AMDSMI_VOLT_MIN_CRIT: int#
AMDSMI_VOLT_MIN: int#
AMDSMI_VOLT_MAX_CRIT: int#
AMDSMI_VOLT_AVERAGE: int#
AMDSMI_VOLT_LOWEST: int#
AMDSMI_VOLT_HIGHEST: int#
AMDSMI_VOLT_LAST: int#
class rocm.bindings.amdsmi.amdsmi_voltage_type_t#

Bases: enum.IntEnum

This ennumeration is used to indicate which type of voltage reading should be obtained.

AMDSMI_VOLT_TYPE_FIRST: int#
AMDSMI_VOLT_TYPE_VDDGFX: int#
AMDSMI_VOLT_TYPE_VDDBOARD: int#
AMDSMI_VOLT_TYPE_LAST: int#
AMDSMI_VOLT_TYPE_INVALID: int#
class rocm.bindings.amdsmi.amdsmi_power_profile_preset_masks_t#

Bases: enum.IntEnum

Pre-set Profile Selections. These bitmasks can be AND’d with the ::amdsmi_power_profile_status_t.available_profiles returned from :: amdsmi_get_gpu_power_profile_presets to determine which power profiles are supported by the system.

AMDSMI_PWR_PROF_PRST_CUSTOM_MASK: int#
AMDSMI_PWR_PROF_PRST_VIDEO_MASK: int#
AMDSMI_PWR_PROF_PRST_POWER_SAVING_MASK: int#
AMDSMI_PWR_PROF_PRST_COMPUTE_MASK: int#
AMDSMI_PWR_PROF_PRST_VR_MASK: int#
AMDSMI_PWR_PROF_PRST_3D_FULL_SCR_MASK: int#
AMDSMI_PWR_PROF_PRST_BOOTUP_DEFAULT: int#
AMDSMI_PWR_PROF_PRST_LAST: int#
AMDSMI_PWR_PROF_PRST_INVALID: int#
class rocm.bindings.amdsmi.amdsmi_gpu_block_t#

Bases: enum.IntEnum

This enum is used to identify different GPU blocks.

AMDSMI_GPU_BLOCK_INVALID: int#
AMDSMI_GPU_BLOCK_FIRST: int#
AMDSMI_GPU_BLOCK_UMC: int#
AMDSMI_GPU_BLOCK_SDMA: int#
AMDSMI_GPU_BLOCK_GFX: int#
AMDSMI_GPU_BLOCK_MMHUB: int#
AMDSMI_GPU_BLOCK_ATHUB: int#
AMDSMI_GPU_BLOCK_PCIE_BIF: int#
AMDSMI_GPU_BLOCK_HDP: int#
AMDSMI_GPU_BLOCK_XGMI_WAFL: int#
AMDSMI_GPU_BLOCK_DF: int#
AMDSMI_GPU_BLOCK_SMN: int#
AMDSMI_GPU_BLOCK_SEM: int#
AMDSMI_GPU_BLOCK_MP0: int#
AMDSMI_GPU_BLOCK_MP1: int#
AMDSMI_GPU_BLOCK_FUSE: int#
AMDSMI_GPU_BLOCK_MCA: int#
AMDSMI_GPU_BLOCK_VCN: int#
AMDSMI_GPU_BLOCK_JPEG: int#
AMDSMI_GPU_BLOCK_IH: int#
AMDSMI_GPU_BLOCK_MPIO: int#
AMDSMI_GPU_BLOCK_LAST: int#
AMDSMI_GPU_BLOCK_RESERVED: int#
class rocm.bindings.amdsmi.amdsmi_clk_limit_type_t#

Bases: enum.IntEnum

The clk limit type

AMDSMI_CLK_LIMIT_MIN: int#
AMDSMI_CLK_LIMIT_MAX: int#
CLK_LIMIT_MIN: int#
CLK_LIMIT_MAX: int#
class rocm.bindings.amdsmi.amdsmi_cper_sev_t#

Bases: enum.IntEnum

Cper sev

AMDSMI_CPER_SEV_NON_FATAL_UNCORRECTED: int#
AMDSMI_CPER_SEV_FATAL: int#
AMDSMI_CPER_SEV_NON_FATAL_CORRECTED: int#
AMDSMI_CPER_SEV_NUM: int#
AMDSMI_CPER_SEV_UNUSED: int#
class rocm.bindings.amdsmi.amdsmi_cper_notify_type_t#

Bases: enum.IntEnum

Cper notify

AMDSMI_CPER_NOTIFY_TYPE_CMC: int#
AMDSMI_CPER_NOTIFY_TYPE_CPE: int#
AMDSMI_CPER_NOTIFY_TYPE_MCE: int#
AMDSMI_CPER_NOTIFY_TYPE_PCIE: int#
AMDSMI_CPER_NOTIFY_TYPE_INIT: int#
AMDSMI_CPER_NOTIFY_TYPE_NMI: int#
AMDSMI_CPER_NOTIFY_TYPE_BOOT: int#
AMDSMI_CPER_NOTIFY_TYPE_DMAR: int#
AMDSMI_CPER_NOTIFY_TYPE_SEA: int#
AMDSMI_CPER_NOTIFY_TYPE_SEI: int#
AMDSMI_CPER_NOTIFY_TYPE_PEI: int#
AMDSMI_CPER_NOTIFY_TYPE_CXL_COMPONENT: int#
class rocm.bindings.amdsmi.amdsmi_gpu_ras_policy_v4_0_t(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

Ras policy v4.0

dram_non_critical_region_threshold: Any#
dram_critical_region_threshold: Any#
static PROPERTIES() → list[str]#
static fromObj(pyobj) → Any#
static allocate(count: int = 1) → Any#
c_sizeof() → int#
as_c_void_p() → Any#
class rocm.bindings.amdsmi.amdsmi_gpu_ras_policy_info_t_policy_data_(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

(No short description)

v4_0: Any#
info: Any#
static PROPERTIES() → list[str]#
static fromObj(pyobj) → Any#
static allocate(count: int = 1) → Any#
c_sizeof() → int#
as_c_void_p() → Any#
class rocm.bindings.amdsmi.amdsmi_gpu_ras_policy_info_t(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

Ras policy info structure for storing version and different ras policy version structures

major_version: Any#
minor_version: Any#
policy_data: Any#
static PROPERTIES() → list[str]#
static fromObj(pyobj) → Any#
static allocate(count: int = 1) → Any#
c_sizeof() → int#
as_c_void_p() → Any#
class rocm.bindings.amdsmi.amdsmi_ras_err_state_t#

Bases: enum.IntEnum

The current ECC state

AMDSMI_RAS_ERR_STATE_NONE: int#
AMDSMI_RAS_ERR_STATE_DISABLED: int#
AMDSMI_RAS_ERR_STATE_PARITY: int#
AMDSMI_RAS_ERR_STATE_SING_C: int#
AMDSMI_RAS_ERR_STATE_MULT_UC: int#
AMDSMI_RAS_ERR_STATE_POISON: int#
AMDSMI_RAS_ERR_STATE_ENABLED: int#
AMDSMI_RAS_ERR_STATE_LAST: int#
AMDSMI_RAS_ERR_STATE_INVALID: int#
class rocm.bindings.amdsmi.amdsmi_memory_type_t#

Bases: enum.IntEnum

Types of memory

Note:

Sum of the process memory is not expected to be the total memory usage.

AMDSMI_MEM_TYPE_FIRST: int#
AMDSMI_MEM_TYPE_VRAM: int#
AMDSMI_MEM_TYPE_VIS_VRAM: int#
AMDSMI_MEM_TYPE_GTT: int#
AMDSMI_MEM_TYPE_LAST: int#
class rocm.bindings.amdsmi.amdsmi_freq_ind_t#

Bases: enum.IntEnum

The values of this enum are used as frequency identifiers.

AMDSMI_FREQ_IND_MIN: int#
AMDSMI_FREQ_IND_MAX: int#
AMDSMI_FREQ_IND_INVALID: int#
class rocm.bindings.amdsmi.amdsmi_xgmi_status_t#

Bases: enum.IntEnum

XGMI Status

AMDSMI_XGMI_STATUS_NO_ERRORS: int#
AMDSMI_XGMI_STATUS_ERROR: int#
AMDSMI_XGMI_STATUS_MULTIPLE_ERRORS: int#
class rocm.bindings.amdsmi.amdsmi_memory_page_status_t#

Bases: enum.IntEnum

Reserved Memory Page States

AMDSMI_MEM_PAGE_STATUS_RESERVED: int#
AMDSMI_MEM_PAGE_STATUS_PENDING: int#
AMDSMI_MEM_PAGE_STATUS_UNRESERVABLE: int#
class rocm.bindings.amdsmi.amdsmi_utilization_counter_type_t#

Bases: enum.IntEnum

The utilization counter type

AMDSMI_UTILIZATION_COUNTER_FIRST: int#
AMDSMI_COARSE_GRAIN_GFX_ACTIVITY: int#
AMDSMI_COARSE_GRAIN_MEM_ACTIVITY: int#
AMDSMI_COARSE_DECODER_ACTIVITY: int#
AMDSMI_FINE_GRAIN_GFX_ACTIVITY: int#
AMDSMI_FINE_GRAIN_MEM_ACTIVITY: int#
AMDSMI_FINE_DECODER_ACTIVITY: int#
AMDSMI_UTILIZATION_COUNTER_LAST: int#
class rocm.bindings.amdsmi.amdsmi_utilization_counter_t(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

The utilization counter data

The max number of values per counter type

type: Any#
value: Any#
fine_value: Any#
fine_value_count: Any#
static PROPERTIES() → list[str]#
static fromObj(pyobj) → Any#
static allocate(count: int = 1) → Any#
c_sizeof() → int#
as_c_void_p() → Any#
class rocm.bindings.amdsmi.amdsmi_retired_page_record_t(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

Reserved Memory Page Record

page_address: Any#
page_size: Any#
status: Any#
static PROPERTIES() → list[str]#
static fromObj(pyobj) → Any#
static allocate(count: int = 1) → Any#
c_sizeof() → int#
as_c_void_p() → Any#
class rocm.bindings.amdsmi.amdsmi_power_profile_status_t(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

This structure contains information about which power profiles are supported by the system for a given device, and which power profile is currently active.

available_profiles: Any#
current: Any#
num_profiles: Any#
static PROPERTIES() → list[str]#
static fromObj(pyobj) → Any#
static allocate(count: int = 1) → Any#
c_sizeof() → int#
as_c_void_p() → Any#
class rocm.bindings.amdsmi.amdsmi_frequencies_t(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

This structure holds information about clock frequencies.

has_deep_sleep: Any#
num_supported: Any#
current: Any#
frequency: Any#
static PROPERTIES() → list[str]#
static fromObj(pyobj) → Any#
static allocate(count: int = 1) → Any#
c_sizeof() → int#
as_c_void_p() → Any#
class rocm.bindings.amdsmi.amdsmi_dpm_policy_entry_t(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

The dpm policy.

policy_id: Any#
policy_description: Any#
static PROPERTIES() → list[str]#
static fromObj(pyobj) → Any#
static allocate(count: int = 1) → Any#
c_sizeof() → int#
as_c_void_p() → Any#
class rocm.bindings.amdsmi.amdsmi_dpm_policy_t(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

DPM Policy

Only the first num_supported policies are valid.

num_supported: Any#
current: Any#
static PROPERTIES() → list[str]#
static fromObj(pyobj) → Any#
static allocate(count: int = 1) → Any#
c_sizeof() → int#
as_c_void_p() → Any#
class rocm.bindings.amdsmi.amdsmi_pcie_bandwidth_t(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

This structure holds information about the possible PCIe bandwidths. Specifically, the possible transfer rates and their associated numbers of lanes are stored here.

Only the first num_supported bandwidths are valid.

transfer_rate: Any#
lanes: Any#
static PROPERTIES() → list[str]#
static fromObj(pyobj) → Any#
static allocate(count: int = 1) → Any#
c_sizeof() → int#
as_c_void_p() → Any#
class rocm.bindings.amdsmi.amdsmi_version_t(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

This structure holds version information.

major: Any#
minor: Any#
release: Any#
build: Any#
static PROPERTIES() → list[str]#
static fromObj(pyobj) → Any#
static allocate(count: int = 1) → Any#
c_sizeof() → int#
as_c_void_p() → Any#
class rocm.bindings.amdsmi.amdsmi_od_vddc_point_t(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

This structure represents a point on the frequency-voltage plane.

frequency: Any#
voltage: Any#
static PROPERTIES() → list[str]#
static fromObj(pyobj) → Any#
static allocate(count: int = 1) → Any#
c_sizeof() → int#
as_c_void_p() → Any#
class rocm.bindings.amdsmi.amdsmi_freq_volt_region_t(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

This structure holds 2 ::amdsmi_range_t’s, one for frequency and one for voltage. These 2 ranges indicate the range of possible values for the corresponding ::amdsmi_od_vddc_point_t.

freq_range: Any#
volt_range: Any#
static PROPERTIES() → list[str]#
static fromObj(pyobj) → Any#
static allocate(count: int = 1) → Any#
c_sizeof() → int#
as_c_void_p() → Any#
class rocm.bindings.amdsmi.amdsmi_od_volt_curve_t(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

OD Vold Curve ::AMDSMI_NUM_VOLTAGE_CURVE_POINTS number of ::amdsmi_od_vddc_point_t’s

class rocm.bindings.amdsmi.amdsmi_od_volt_freq_data_t(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

This structure holds the frequency-voltage values for a device.

curr_sclk_range: Any#
curr_mclk_range: Any#
curr_fclk_range: Any#
sclk_freq_limits: Any#
mclk_freq_limits: Any#
fclk_freq_limits: Any#
curve: Any#
num_regions: Any#
static PROPERTIES() → list[str]#
static fromObj(pyobj) → Any#
static allocate(count: int = 1) → Any#
c_sizeof() → int#
as_c_void_p() → Any#
class rocm.bindings.amdsmi.amd_metrics_table_header_t(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

Structure holds the gpu metrics table header for a device

Size and version information of metrics data

structure_size: Any#
format_revision: Any#
content_revision: Any#
static PROPERTIES() → list[str]#
static fromObj(pyobj) → Any#
static allocate(count: int = 1) → Any#
c_sizeof() → int#
as_c_void_p() → Any#
class rocm.bindings.amdsmi.amdsmi_gpu_xcp_metrics_t(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

The following structures hold the gpu statistics for a device.

gfx_busy_inst: Any#
jpeg_busy: Any#
vcn_busy: Any#
gfx_busy_acc: Any#
gfx_below_host_limit_acc: Any#
gfx_below_host_limit_ppt_acc: Any#
gfx_below_host_limit_thm_acc: Any#
gfx_low_utilization_acc: Any#
gfx_below_host_limit_total_acc: Any#
temperature_xcd: Any#
static PROPERTIES() → list[str]#
static fromObj(pyobj) → Any#
static allocate(count: int = 1) → Any#
c_sizeof() → int#
as_c_void_p() → Any#
class rocm.bindings.amdsmi.amdsmi_apu_metrics_t(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

APU metrics auxiliary data.

This structure holds unified APU-specific metrics data derived from the underlying driver metrics table. It is attached via ::amdsmi_gpu_metrics_t.apu_metrics when APU-specific metrics are available.

Version Support: - v2.4: format_revision == 2 && content_revision == 4 - v3.0: format_revision == 3 && content_revision == 0 Use ::amdsmi_gpu_metrics_t.common_header to identify which version populated the fields.

Sentinel Values: Fields not applicable to the current version are initialized to the maximum value of their respective type: 0xFFFF for uint16_t fields, 0xFFFFFFFF for uint32_t fields, and UINT64_MAX for uint64_t fields. For example, on v3.0 hardware, v2.4-only fields like average_mm_activity and temperature_l3 will contain 0xFFFF. Similarly, array elements beyond the version-specific count (e.g., elements 8-15 of temperature_core on v2.4) will contain 0xFFFF. However, uint32_t elements such as ‘throttle_status’ will contain 0xFFFFFFFF and UINT64_MAX for uint64_t elements such as ‘indep_throttle_status’. Callers should check the version and treat maximum values as invalid/not applicable.

temperature_gfx: Any#
temperature_soc: Any#
temperature_core: Any#
temperature_l3: Any#
temperature_skin: Any#
average_gfx_activity: Any#
average_mm_activity: Any#
average_vcn_activity: Any#
average_ipu_activity: Any#
average_core_c0_activity: Any#
average_dram_reads: Any#
average_dram_writes: Any#
average_ipu_reads: Any#
average_ipu_writes: Any#
average_socket_power: Any#
average_cpu_power: Any#
average_soc_power: Any#
average_gfx_power: Any#
average_core_power: Any#
average_ipu_power: Any#
average_apu_power: Any#
average_dgpu_power: Any#
average_all_core_power: Any#
average_sys_power: Any#
stapm_power_limit: Any#
current_stapm_power_limit: Any#
average_gfxclk_frequency: Any#
average_socclk_frequency: Any#
average_uclk_frequency: Any#
average_fclk_frequency: Any#
average_vclk_frequency: Any#
average_dclk_frequency: Any#
average_vpeclk_frequency: Any#
average_ipuclk_frequency: Any#
average_mpipu_frequency: Any#
current_gfxclk: Any#
current_socclk: Any#
current_uclk: Any#
current_fclk: Any#
current_vclk: Any#
current_dclk: Any#
current_coreclk: Any#
current_l3clk: Any#
current_core_maxfreq: Any#
current_gfx_maxfreq: Any#
throttle_status: Any#
indep_throttle_status: Any#
throttle_residency_prochot: Any#
throttle_residency_spl: Any#
throttle_residency_fppt: Any#
throttle_residency_sppt: Any#
throttle_residency_thm_core: Any#
throttle_residency_thm_gfx: Any#
throttle_residency_thm_soc: Any#
fan_pwm: Any#
average_temperature_gfx: Any#
average_temperature_soc: Any#
average_temperature_core: Any#
average_temperature_l3: Any#
average_cpu_voltage: Any#
average_soc_voltage: Any#
average_gfx_voltage: Any#
average_cpu_current: Any#
average_soc_current: Any#
average_gfx_current: Any#
time_filter_alphavalue: Any#
static PROPERTIES() → list[str]#
static fromObj(pyobj) → Any#
static allocate(count: int = 1) → Any#
c_sizeof() → int#
as_c_void_p() → Any#
class rocm.bindings.amdsmi.amdsmi_gpu_metrics_t(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

Structure holds the gpu metrics values for a device

This structure is extended to fit the needs of different GPU metric versions when exposing data through the structure. Depending on the version, some data members will hold data, and some will not. A good example is the set of ‘current clocks’: current_gfxclk, current_socclk, current_vclk0, current_dclk0. These are single-valued data members, up to version 1.3. For version 1.4 and up these are multi-valued data members (arrays) and their counterparts; current_gfxclks[], current_socclks[], current_vclk0s[], current_dclk0s[], will hold the data

common_header: Any#
temperature_edge: Any#
temperature_hotspot: Any#
temperature_mem: Any#
temperature_vrgfx: Any#
temperature_vrsoc: Any#
temperature_vrmem: Any#
average_gfx_activity: Any#
average_umc_activity: Any#
average_mm_activity: Any#
average_socket_power: Any#
energy_accumulator: Any#
system_clock_counter: Any#
average_gfxclk_frequency: Any#
average_socclk_frequency: Any#
average_uclk_frequency: Any#
average_vclk0_frequency: Any#
average_dclk0_frequency: Any#
average_vclk1_frequency: Any#
average_dclk1_frequency: Any#
current_gfxclk: Any#
current_socclk: Any#
current_uclk: Any#
current_vclk0: Any#
current_dclk0: Any#
current_vclk1: Any#
current_dclk1: Any#
throttle_status: Any#
current_fan_speed: Any#
gfx_activity_acc: Any#
mem_activity_acc: Any#
temperature_hbm: Any#
firmware_timestamp: Any#
voltage_soc: Any#
voltage_gfx: Any#
voltage_mem: Any#
indep_throttle_status: Any#
current_socket_power: Any#
vcn_activity: Any#
gfxclk_lock_status: Any#
pcie_bandwidth_acc: Any#
pcie_bandwidth_inst: Any#
pcie_l0_to_recov_count_acc: Any#
pcie_replay_count_acc: Any#
pcie_replay_rover_count_acc: Any#
xgmi_read_data_acc: Any#
xgmi_write_data_acc: Any#
current_gfxclks: Any#
current_socclks: Any#
current_vclk0s: Any#
current_dclk0s: Any#
jpeg_activity: Any#
pcie_nak_sent_count_acc: Any#
pcie_nak_rcvd_count_acc: Any#
accumulation_counter: Any#
prochot_residency_acc: Any#
ppt_residency_acc: Any#
socket_thm_residency_acc: Any#
vr_thm_residency_acc: Any#
hbm_thm_residency_acc: Any#
num_partition: Any#
pcie_lc_perf_other_end_recovery: Any#
vram_max_bandwidth: Any#
temperature_hbm_stacks: Any#
temperature_mid: Any#
temperature_aid: Any#
current_uclk_aid: Any#
current_socclks_mid: Any#
apu_metrics: Any#
static PROPERTIES() → list[str]#
static fromObj(pyobj) → Any#
static allocate(count: int = 1) → Any#
c_sizeof() → int#
as_c_void_p() → Any#

Bases: enum.IntEnum

XGMI Link Status Type

Bases: rocm.bindings.util.types.Pointer

XGMI Link Status

class rocm.bindings.amdsmi.amdsmi_name_value_t(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

This structure holds the name value pairs

name: Any#
value: Any#
static PROPERTIES() → list[str]#
static fromObj(pyobj) → Any#
static allocate(count: int = 1) → Any#
c_sizeof() → int#
as_c_void_p() → Any#
class rocm.bindings.amdsmi.amdsmi_reg_type_t#

Bases: enum.IntEnum

This register type for register table

AMDSMI_REG_XGMI: int#
AMDSMI_REG_WAFL: int#
AMDSMI_REG_PCIE: int#
AMDSMI_REG_USR: int#
AMDSMI_REG_USR1: int#
class rocm.bindings.amdsmi.amdsmi_ras_feature_t_ras_info_(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

(No short description)

dram_ecc: Any#
sram_ecc: Any#
poisoning: Any#
rsvd: Any#
static PROPERTIES() → list[str]#
static fromObj(pyobj) → Any#
static allocate(count: int = 1) → Any#
c_sizeof() → int#
as_c_void_p() → Any#
class rocm.bindings.amdsmi.amdsmi_ras_feature_t(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

This structure holds ras feature information.

ras_eeprom_version: Any#
ecc_correction_schema_flag: Any#
ras_info: Any#
needs_reboot: Any#
static PROPERTIES() → list[str]#
static fromObj(pyobj) → Any#
static allocate(count: int = 1) → Any#
c_sizeof() → int#
as_c_void_p() → Any#
class rocm.bindings.amdsmi.amdsmi_error_count_t(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

This structure holds error counts.

correctable_count: Any#
uncorrectable_count: Any#
deferred_count: Any#
reserved: Any#
static PROPERTIES() → list[str]#
static fromObj(pyobj) → Any#
static allocate(count: int = 1) → Any#
c_sizeof() → int#
as_c_void_p() → Any#
class rocm.bindings.amdsmi.amdsmi_process_info_t(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

This structure contains information specific to a process. Sum of the process memory is not expected to be the total memory usage.

process_id: Any#
vram_usage: Any#
sdma_usage: Any#
cu_occupancy: Any#
evicted_time: Any#
static PROPERTIES() → list[str]#
static fromObj(pyobj) → Any#
static allocate(count: int = 1) → Any#
c_sizeof() → int#
as_c_void_p() → Any#
class rocm.bindings.amdsmi.amdsmi_topology_nearest_t(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

Topology Nearest

count: Any#
reserved: Any#
static PROPERTIES() → list[str]#
static fromObj(pyobj) → Any#
static allocate(count: int = 1) → Any#
c_sizeof() → int#
as_c_void_p() → Any#
class rocm.bindings.amdsmi.amdsmi_virtualization_mode_t#

Bases: enum.IntEnum

Variant placeholder

Place-holder “variant” for functions that have don’t have any variants, but do have monitors or sensors.

AMDSMI_VIRTUALIZATION_MODE_UNKNOWN: int#
AMDSMI_VIRTUALIZATION_MODE_BAREMETAL: int#
AMDSMI_VIRTUALIZATION_MODE_HOST: int#
AMDSMI_VIRTUALIZATION_MODE_GUEST: int#
AMDSMI_VIRTUALIZATION_MODE_PASSTHROUGH: int#
class rocm.bindings.amdsmi.amdsmi_affinity_scope_t#

Bases: enum.IntEnum

Scope for Numa affinity or Socket affinity

AMDSMI_AFFINITY_SCOPE_NODE: int#
AMDSMI_AFFINITY_SCOPE_SOCKET: int#
class rocm.bindings.amdsmi.amdsmi_npm_status_t#

Bases: enum.IntEnum

NPM status

AMDSMI_NPM_STATUS_DISABLED: int#
AMDSMI_NPM_STATUS_ENABLED: int#
class rocm.bindings.amdsmi.amdsmi_npm_info_t(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

NPM info

status: Any#
limit: Any#
ubb_power_threshold: Any#
reserved: Any#
static PROPERTIES() → list[str]#
static fromObj(pyobj) → Any#
static allocate(count: int = 1) → Any#
c_sizeof() → int#
as_c_void_p() → Any#
class rocm.bindings.amdsmi.amdsmi_ptl_data_format_t#

Bases: enum.IntEnum

PTL (Peak Tops Limiter) data format types These correspond to the hardware data types used in matrix operations. Only F8 and XF32 are always supported at full performance. From the remaining five types, only two can be supported at peak performance simultaneously.

AMDSMI_PTL_DATA_FORMAT_I8: int#
AMDSMI_PTL_DATA_FORMAT_F16: int#
AMDSMI_PTL_DATA_FORMAT_BF16: int#
AMDSMI_PTL_DATA_FORMAT_F32: int#
AMDSMI_PTL_DATA_FORMAT_F64: int#
AMDSMI_PTL_DATA_FORMAT_F8: int#
AMDSMI_PTL_DATA_FORMAT_VECTOR: int#
AMDSMI_PTL_DATA_FORMAT_INVALID: int#
class rocm.bindings.amdsmi.amdsmi_smu_fw_version_t(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

This structure holds SMU Firmware version information.

debug: Any#
minor: Any#
major: Any#
unused: Any#
static PROPERTIES() → list[str]#
static fromObj(pyobj) → Any#
static allocate(count: int = 1) → Any#
c_sizeof() → int#
as_c_void_p() → Any#
class rocm.bindings.amdsmi.amdsmi_ddr_bw_metrics_t(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

DDR bandwidth metrics.

max_bw: Any#
utilized_bw: Any#
utilized_pct: Any#
static PROPERTIES() → list[str]#
static fromObj(pyobj) → Any#
static allocate(count: int = 1) → Any#
c_sizeof() → int#
as_c_void_p() → Any#
class rocm.bindings.amdsmi.amdsmi_temp_range_refresh_rate_t(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

temperature range and refresh rate metrics of a DIMM

range: Any#
ref_rate: Any#
static PROPERTIES() → list[str]#
static fromObj(pyobj) → Any#
static allocate(count: int = 1) → Any#
c_sizeof() → int#
as_c_void_p() → Any#
class rocm.bindings.amdsmi.amdsmi_dimm_power_t(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

DIMM Power(mW), power update rate(ms) and dimm address

power: Any#
update_rate: Any#
dimm_addr: Any#
static PROPERTIES() → list[str]#
static fromObj(pyobj) → Any#
static allocate(count: int = 1) → Any#
c_sizeof() → int#
as_c_void_p() → Any#
class rocm.bindings.amdsmi.amdsmi_dimm_thermal_t(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

DIMM temperature(°C) and update rate(ms) and dimm address

sensor: Any#
update_rate: Any#
dimm_addr: Any#
temp: Any#
static PROPERTIES() → list[str]#
static fromObj(pyobj) → Any#
static allocate(count: int = 1) → Any#
c_sizeof() → int#
as_c_void_p() → Any#
class rocm.bindings.amdsmi.amdsmi_io_bw_encoding_t#

Bases: enum.IntEnum

xGMI Bandwidth Encoding types

AMDSMI_AGG_BW0: int#
AMDSMI_RD_BW0: int#
AMDSMI_WR_BW0: int#
AGG_BW0: int#
RD_BW0: int#
WR_BW0: int#

Bases: rocm.bindings.util.types.Pointer

LINK name and Bandwidth type Information.It contains link names i.e valid link names are “P0”, “P1”, “P2”, “P3”, “P4”, “G0”, “G1”, “G2”, “G3”, “G4” “G5”, “G6”, “G7” Valid bandwidth types 1(Aggregate_BW), 2 (Read BW), 4 (Write BW).

class rocm.bindings.amdsmi.amdsmi_dpm_level_t(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

max and min LCLK DPM level on a given NBIO ID. Valid max and min DPM level values are 0 - 1.

max_dpm_level: Any#
min_dpm_level: Any#
static PROPERTIES() → list[str]#
static fromObj(pyobj) → Any#
static allocate(count: int = 1) → Any#
c_sizeof() → int#
as_c_void_p() → Any#
class rocm.bindings.amdsmi.amdsmi_hsmp_metrics_table_t(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

HSMP Metrics table (supported only with hsmp proto version 6).

accumulation_counter: Any#
max_socket_temperature: Any#
max_vr_temperature: Any#
max_hbm_temperature: Any#
max_socket_temperature_acc: Any#
max_vr_temperature_acc: Any#
max_hbm_temperature_acc: Any#
socket_power_limit: Any#
max_socket_power_limit: Any#
socket_power: Any#
timestamp: Any#
socket_energy_acc: Any#
ccd_energy_acc: Any#
xcd_energy_acc: Any#
aid_energy_acc: Any#
hbm_energy_acc: Any#
cclk_frequency_limit: Any#
gfxclk_frequency_limit: Any#
fclk_frequency: Any#
uclk_frequency: Any#
socclk_frequency: Any#
vclk_frequency: Any#
dclk_frequency: Any#
lclk_frequency: Any#
gfxclk_frequency_acc: Any#
cclk_frequency_acc: Any#
max_cclk_frequency: Any#
min_cclk_frequency: Any#
max_gfxclk_frequency: Any#
min_gfxclk_frequency: Any#
fclk_frequency_table: Any#
uclk_frequency_table: Any#
socclk_frequency_table: Any#
vclk_frequency_table: Any#
dclk_frequency_table: Any#
lclk_frequency_table: Any#
max_lclk_dpm_range: Any#
min_lclk_dpm_range: Any#
xgmi_width: Any#
xgmi_bitrate: Any#
xgmi_read_bandwidth_acc: Any#
xgmi_write_bandwidth_acc: Any#
socket_c0_residency: Any#
socket_gfx_busy: Any#
dram_bandwidth_utilization: Any#
socket_c0_residency_acc: Any#
socket_gfx_busy_acc: Any#
dram_bandwidth_acc: Any#
max_dram_bandwidth: Any#
dram_bandwidth_utilization_acc: Any#
pcie_bandwidth_acc: Any#
prochot_residency_acc: Any#
ppt_residency_acc: Any#
socket_thm_residency_acc: Any#
vr_thm_residency_acc: Any#
hbm_thm_residency_acc: Any#
spare: Any#
gfxclk_frequency: Any#
static PROPERTIES() → list[str]#
static fromObj(pyobj) → Any#
static allocate(count: int = 1) → Any#
c_sizeof() → int#
as_c_void_p() → Any#
class rocm.bindings.amdsmi.amdsmi_cpu_info_t(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

cpu info data

model_name: Any#
cpu_family_id: Any#
model_id: Any#
threads_per_core: Any#
cores_per_socket: Any#
frequency_boost: Any#
vendor_id: Any#
vendor_name: Any#
subvendor_id: Any#
device_id: Any#
rev_id: Any#
asic_serial: Any#
socket_id: Any#
core_id: Any#
num_of_cpu_cores: Any#
socket_count: Any#
core_count: Any#
reserved: Any#
static PROPERTIES() → list[str]#
static fromObj(pyobj) → Any#
static allocate(count: int = 1) → Any#
c_sizeof() → int#
as_c_void_p() → Any#
class rocm.bindings.amdsmi.amdsmi_sock_info_t(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

cpu socket info data

socket_id: Any#
cores_per_socket: Any#
static PROPERTIES() → list[str]#
static fromObj(pyobj) → Any#
static allocate(count: int = 1) → Any#
c_sizeof() → int#
as_c_void_p() → Any#
class rocm.bindings.amdsmi.amdsmi_nic_stat_t(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

Structure for NIC statistic name-value pairs

This structure represents a single NIC statistic with its name and value.

name: Any#
value: Any#
static PROPERTIES() → list[str]#
static fromObj(pyobj) → Any#
static allocate(count: int = 1) → Any#
c_sizeof() → int#
as_c_void_p() → Any#
class rocm.bindings.amdsmi.amdsmi_nic_asic_info_t(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

NIC asic information

vendor_id: Any#
subvendor_id: Any#
device_id: Any#
subsystem_id: Any#
revision: Any#
permanent_address: Any#
product_name: Any#
part_number: Any#
serial_number: Any#
vendor_name: Any#
static PROPERTIES() → list[str]#
static fromObj(pyobj) → Any#
static allocate(count: int = 1) → Any#
c_sizeof() → int#
as_c_void_p() → Any#
class rocm.bindings.amdsmi.amdsmi_nic_bus_info_t(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

NIC bus information

bdf: Any#
max_pcie_width: Any#
max_pcie_speed: Any#
pcie_interface_version: Any#
slot_type: Any#
static PROPERTIES() → list[str]#
static fromObj(pyobj) → Any#
static allocate(count: int = 1) → Any#
c_sizeof() → int#
as_c_void_p() → Any#
class rocm.bindings.amdsmi.amdsmi_nic_numa_info_t(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

NIC NUMA information

node: Any#
affinity: Any#
static PROPERTIES() → list[str]#
static fromObj(pyobj) → Any#
static allocate(count: int = 1) → Any#
c_sizeof() → int#
as_c_void_p() → Any#
class rocm.bindings.amdsmi.amdsmi_nic_fw_entry_t(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

NIC firmware information

name: Any#
version: Any#
static PROPERTIES() → list[str]#
static fromObj(pyobj) → Any#
static allocate(count: int = 1) → Any#
c_sizeof() → int#
as_c_void_p() → Any#
class rocm.bindings.amdsmi.amdsmi_nic_fw_info_t(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

NIC firmware information collection

num_fw: Any#
static PROPERTIES() → list[str]#
static fromObj(pyobj) → Any#
static allocate(count: int = 1) → Any#
c_sizeof() → int#
as_c_void_p() → Any#
class rocm.bindings.amdsmi.amdsmi_nic_port_t(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

NIC port information

Active FEC Modes: The active_fec field provides a bitmask representation of Active FEC (Active Forward Error Correction) modes. The bitmask values are derived from the ethtool_fecparam structure, specifically the active_fec field. Below are examples of the defined FEC modes:

Examples: - ETHTOOL_FEC_NONE (0x01) - ETHTOOL_FEC_AUTO (0x02) - ETHTOOL_FEC_RS (0x04) - ETHTOOL_FEC_BASER (0x08) - ETHTOOL_FEC_LLRS (0x10) - ETHTOOL_FEC_OFF (0x20)

Note: These definitions are based on the latest available ethtool information. Users should verify if there are any updates or changes to these definitions in the relevant ethtool structure or field before implementing them in their code.

bdf: Any#
port_num: Any#
type: Any#
flavour: Any#
netdev: Any#
ifindex: Any#
mac_address: Any#
carrier: Any#
mtu: Any#
active_fec: Any#
autoneg: Any#
pause_autoneg: Any#
pause_rx: Any#
pause_tx: Any#
static PROPERTIES() → list[str]#
static fromObj(pyobj) → Any#
static allocate(count: int = 1) → Any#
c_sizeof() → int#
as_c_void_p() → Any#
class rocm.bindings.amdsmi.amdsmi_nic_port_info_t(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

NIC port information collection

num_ports: Any#
static PROPERTIES() → list[str]#
static fromObj(pyobj) → Any#
static allocate(count: int = 1) → Any#
c_sizeof() → int#
as_c_void_p() → Any#
class rocm.bindings.amdsmi.amdsmi_nic_driver_info_t(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

NIC driver information

name: Any#
version: Any#
static PROPERTIES() → list[str]#
static fromObj(pyobj) → Any#
static allocate(count: int = 1) → Any#
c_sizeof() → int#
as_c_void_p() → Any#
class rocm.bindings.amdsmi.amdsmi_nic_rdma_port_info_t(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

NIC RDMA port information

netdev: Any#
state: Any#
rdma_port: Any#
max_mtu: Any#
active_mtu: Any#
static PROPERTIES() → list[str]#
static fromObj(pyobj) → Any#
static allocate(count: int = 1) → Any#
c_sizeof() → int#
as_c_void_p() → Any#
class rocm.bindings.amdsmi.amdsmi_nic_rdma_dev_info_t(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

NIC RDMA device information

rdma_dev: Any#
node_guid: Any#
node_type: Any#
sys_image_guid: Any#
fw_ver: Any#
num_rdma_ports: Any#
static PROPERTIES() → list[str]#
static fromObj(pyobj) → Any#
static allocate(count: int = 1) → Any#
c_sizeof() → int#
as_c_void_p() → Any#
class rocm.bindings.amdsmi.amdsmi_nic_rdma_devices_info_t(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

NIC RDMA devices information collection

num_rdma_dev: Any#
static PROPERTIES() → list[str]#
static fromObj(pyobj) → Any#
static allocate(count: int = 1) → Any#
c_sizeof() → int#
as_c_void_p() → Any#
rocm.bindings.amdsmi.amdsmi_init(init_flags)#

Initialize the AMD SMI library

@platform{gpu_bm_linux} @platform{host} @platform{cpu_bm} @platform{guest_1vf} @platform{guest_mvf} @platform{guest_windows}

This function initializes the library and the internal data structures, including those corresponding to sources of information that SMI provides. Singleton Design, requires the same number of inits as shutdowns.

The init_flags decides which type of processor can be discovered by ::amdsmi_get_socket_handles(). AMDSMI_INIT_AMD_GPUS returns sockets with AMD GPUS, and AMDSMI_INIT_AMD_GPUS | AMDSMI_INIT_AMD_CPUS returns sockets with either AMD GPUS or CPUS. Both AMDSMI_INIT_AMD_GPUS and AMDSMI_INIT_AMD_CPUS flags are supported.

Args:
init_flags (int) – IN:

Bit flags that tell SMI how to initialize. Values of ::amdsmi_init_flags_t may be OR’d together and passed through init_flags to modify how AMDSMI initializes.

Returns:

A tuple of size 1 that contains (in that order):

  • amdsmi_status_t: amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail

C signature

amdsmi_status_t amdsmi_init(uint64_t init_flags)
rocm.bindings.amdsmi.amdsmi_shut_down()#

Shutdown the AMD SMI library

@platform{gpu_bm_linux} @platform{host} @platform{cpu_bm} @platform{guest_1vf} @platform{guest_mvf} @platform{guest_windows}

This function shuts down the library and internal data structures and performs any necessary clean ups. Singleton Design, requires the same number of inits as shutdowns.

Returns:

A tuple of size 1 that contains (in that order):

  • amdsmi_status_t: amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail

C signature

amdsmi_status_t amdsmi_shut_down()
rocm.bindings.amdsmi.amdsmi_get_socket_handles(socket_count, socket_handles)#

Get the list of socket handles in the system.

@platform{gpu_bm_linux} @platform{host} @platform{cpu_bm} @platform{guest_1vf} @platform{guest_mvf} @platform{guest_windows}

Depends on what flag is passed to ::amdsmi_init. AMDSMI_INIT_AMD_GPUS returns sockets with AMD GPUS, and AMDSMI_INIT_AMD_GPUS | AMDSMI_INIT_AMD_CPUS returns sockets with either AMD GPUS or CPUS. The socket handles can be used to query the processor handles in that socket, which will be used in other APIs to get processor detail information or telemtries.

Args:
socket_count (PointerToUnsigned/object) – IN,OUT:

As input, the value passed through this parameter is the number of ::amdsmi_socket_handle that may be safely written to the memory pointed to by socket_handles. This is the limit on how many socket handles will be written to socket_handles. On return, socket_count will contain the number of socket handles written to socket_handles, or the number of socket handles that could have been written if enough memory had been provided. If socket_handles is NULL, as output, socket_count will contain how many sockets are available to read in the system.

socket_handles (ListOfPointer/object) – IN,OUT:

A pointer to a block of memory to which the ::amdsmi_socket_handle values will be written. This value may be NULL. In this case, this function can be used to query how many sockets are available to read in the system.

Returns:

A tuple of size 1 that contains (in that order):

  • amdsmi_status_t: amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail

C signature

amdsmi_status_t amdsmi_get_socket_handles(uint32_t * socket_count, amdsmi_socket_handle * socket_handles)
rocm.bindings.amdsmi.amdsmi_get_socket_info(socket_handle, len, name)#

Get information about the given socket

@platform{gpu_bm_linux} @platform{host} @platform{guest_1vf} @platform{guest_mvf} @platform{guest_windows}

This function retrieves socket information. The socket_handle must be provided to retrieve the Socket ID.

Args:
socket_handle (Pointer/object) – IN:

a socket handle

len (int) – IN:

the length of the caller provided buffer name.

name (CStr/object) – OUT:

The id of the socket.

Returns:

A tuple of size 1 that contains (in that order):

  • amdsmi_status_t: amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail

C signature

amdsmi_status_t amdsmi_get_socket_info(amdsmi_socket_handle socket_handle, size_t len, char * name)
rocm.bindings.amdsmi.amdsmi_get_processor_handles(socket_handle, processor_count, processor_handles)#

Get the list of the processor handles associated to a socket.

@platform{gpu_bm_linux} @platform{host} @platform{guest_1vf} @platform{guest_mvf} @platform{guest_windows}

This function retrieves the processor handles of a socket. The socket_handle must be provided for the processor. A socket may have multiple different type processors: An APU on a socket have both CPUs and GPUs. Currently, only AMD GPUs are supported.

Note:

Sockets are not supported on the @platform{host}.

Note:

On the @platform{host} this function currently supports only AMD GPUs. To enumerate other devices, such as AMD NICs, use amdsmi_get_processor_handles_by_type().

The number of processor count is returned through processor_count if processor_handles is NULL. Then the number of processor_count can be pass as input to retrieval all processors on the socket to processor_handles.

Args:
socket_handle (Pointer/object) – IN:

The socket to query

processor_count (PointerToUnsigned/object) – IN,OUT:

As input, the value passed through this parameter is the number of ::amdsmi_processor_handle’s that may be safely written to the memory pointed to by processor_handles. This is the limit on how many processor handles will be written to processor_handles. On return, processor_count will contain the number of processor handles written to processor_handles, or the number of processor handles that could have been written if enough memory had been provided. If processor_handles is NULL, as output, processor_count will contain how many processors are available to read for the socket.

processor_handles (ListOfPointer/object) – IN,OUT:

A pointer to a block of memory to which the ::amdsmi_processor_handle values will be written. This value may be NULL. In this case, this function can be used to query how many processors are available to read.

Returns:

A tuple of size 1 that contains (in that order):

  • amdsmi_status_t: amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail

C signature

amdsmi_status_t amdsmi_get_processor_handles(amdsmi_socket_handle socket_handle, uint32_t * processor_count, amdsmi_processor_handle * processor_handles)
rocm.bindings.amdsmi.amdsmi_get_node_handle(processor_handle)#

Get the node handle associated with processor handle.

@platform{gpu_bm_linux} @platform{host}

This function retrieves the node handle of a processor handler. The processor_handle must be provided for the processor. Currently, only AMD GPUs are supported.

Args:
processor_handle (Pointer/object) – IN:

A pointer to a ::amdsmi_processor_handle, this is required to be OAM ID 0 otherwise the API will fail. OAM ID is sourced from amdsmi_get_gpu_asic_info API.

Returns:

A tuple of size 2 that contains (in that order):

  • amdsmi_status_t: amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail

  • Pointer/object:

    A pointer to a block of memory where amdsmi_node_handle will be written.

C signature

amdsmi_status_t amdsmi_get_node_handle(amdsmi_processor_handle processor_handle, amdsmi_node_handle * node_handle)
rocm.bindings.amdsmi.amdsmi_get_processor_type(processor_handle)#

Get the processor type of the processor_handle

@platform{gpu_bm_linux} @platform{host} @platform{cpu_bm} @platform{guest_1vf} @platform{guest_mvf} @platform{guest_windows}

This function retrieves the processor type. A processor_handle must be provided for that processor.

Args:
processor_handle (Pointer/object) – IN:

a processor handle

Returns:

A tuple of size 2 that contains (in that order):

  • amdsmi_status_t: amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail

  • amdsmi_processor_type_t:

    a pointer to ::amdsmi_processor_type_t to which the processor type will be written. If this parameter is nullptr, this function will return ::AMDSMI_STATUS_INVAL.

C signature

amdsmi_status_t amdsmi_get_processor_type(amdsmi_processor_handle processor_handle, amdsmi_processor_type_t * processor_type)
rocm.bindings.amdsmi.amdsmi_get_processor_info(processor_handle, len, name)#

Get a string identifier for the given processor.

@platform{gpu_bm_linux} @platform{cpu_bm}

This function writes the processor’s index into name as a decimal string (for example “0”, “1”, “2”). The index is the processor’s zero-based position in the library’s processor list, the same order used by ::amdsmi_get_processor_handles. A valid processor_handle must be provided.

Args:
processor_handle (Pointer/object) – IN:

a processor handle

len (int) – IN:

The length of the caller-provided buffer name.

name (CStr/object) – OUT:

Buffer that receives the processor index as a decimal string. Must not be NULL.

Returns:

A tuple of size 1 that contains (in that order):

  • amdsmi_status_t: amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail

C signature

amdsmi_status_t amdsmi_get_processor_info(amdsmi_processor_handle processor_handle, size_t len, char * name)
rocm.bindings.amdsmi.amdsmi_get_processor_count_from_handles(processor_handles, processor_count)#

Get respective processor counts from the processor handles

@platform{gpu_bm_linux} @platform{cpu_bm}

This function classifies a list of processor handles and returns the per-type totals. Counts are derived purely from ::amdsmi_get_processor_type and do not require ENABLE_ESMI_LIB; on builds without ESMI, nr_cpusockets and nr_cpucores will be 0.

Args:
processor_handles (ListOfPointer/object) – IN:

A pointer to a block of memory to which the ::amdsmi_processor_handle values will be written. This value may be NULL.

processor_count (PointerToUnsigned/object) – IN:

total processor count per socket

Returns:

A tuple of size 4 that contains (in that order):

  • amdsmi_status_t: amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail

  • int:

    Total number of cpu sockets

  • int:

    Total number of cpu cores

  • int:

    Total number of gpu devices

C signature

amdsmi_status_t amdsmi_get_processor_count_from_handles(amdsmi_processor_handle * processor_handles, uint32_t * processor_count, uint32_t * nr_cpusockets, uint32_t * nr_cpucores, uint32_t * nr_gpus)
rocm.bindings.amdsmi.amdsmi_get_processor_handles_by_type(socket_handle, processor_type, processor_handles, processor_count)#

Returns a list of processor handles of the specified type in the system.

@platform{gpu_bm_linux} @platform{host} @platform{cpu_bm}

This function retrieves processor list as per the processor type from the total processor handles list. The list of processor_handles and processor type must be provided.

Note:

This function fills the user-provided buffer with processor handles of the given type (e.g., GPU, NIC). The processor handles returned are used to instantiate the rest of processor queries in the library. If the buffer is not large enough, the call will fail.

Args:
socket_handle (Pointer/object) – IN:

The socket to query.

processor_type (amdsmi_processor_type_t) – IN:

The type of processor to query (see ::amdsmi_processor_type_t).

processor_handles (ListOfPointer/object) – OUT:

Reference to list of processor handles returned by the library. Buffer must be allocated by user.

processor_count (PointerToUnsigned/object) – IN,OUT:

As input, the size of the provided buffer. As output, number of processor handles in the buffer. Parameter must be allocated by user.

Returns:

A tuple of size 1 that contains (in that order):

  • amdsmi_status_t: amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail

C signature

amdsmi_status_t amdsmi_get_processor_handles_by_type(amdsmi_socket_handle socket_handle, amdsmi_processor_type_t processor_type, amdsmi_processor_handle * processor_handles, uint32_t * processor_count)
rocm.bindings.amdsmi.amdsmi_get_processor_handle_from_bdf(bdf)#

Get processor handle with the matching bdf.

@platform{gpu_bm_linux} @platform{host} @platform{guest_1vf} @platform{guest_mvf} @platform{guest_windows}

Given bdf info bdf, this function will get the processor handle with the matching bdf.

Args:
bdf (amdsmi_bdf_t) – IN:

The bdf to match with corresponding processor handle.

Returns:

A tuple of size 2 that contains (in that order):

  • amdsmi_status_t: amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail

  • Pointer/object:

    processor handle with the matching bdf.

C signature

amdsmi_status_t amdsmi_get_processor_handle_from_bdf(amdsmi_bdf_t bdf, amdsmi_processor_handle * processor_handle)
rocm.bindings.amdsmi.amdsmi_get_gpu_device_bdf(processor_handle, bdf)#

Returns BDF of the given GPU device

@platform{gpu_bm_linux} @platform{host} @platform{guest_1vf} @platform{guest_mvf} @platform{guest_windows}

Args:
processor_handle (Pointer/object) – IN:

Device which to query

bdf (amdsmi_bdf_t/object) – OUT:

Reference to BDF. Must be allocated by user.

Returns:

A tuple of size 1 that contains (in that order):

  • amdsmi_status_t: amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail

C signature

amdsmi_status_t amdsmi_get_gpu_device_bdf(amdsmi_processor_handle processor_handle, amdsmi_bdf_t * bdf)
rocm.bindings.amdsmi.amdsmi_get_gpu_device_uuid(processor_handle, uuid_length, uuid)#

Returns the UUID of the device

@platform{gpu_bm_linux} @platform{host} @platform{guest_1vf} @platform{guest_mvf} @platform{guest_windows}

Args:
processor_handle (Pointer/object) – IN:

Device which to query

uuid_length (PointerToUnsigned/object) – IN,OUT:

Length of the uuid string. As input, must be equal or greater than AMDSMI_GPU_UUID_SIZE and be allocated by user. As output it is the length of the uuid string.

uuid (CStr/object) – OUT:

Pointer to string to store the UUID. Must be allocated by user.

Returns:

A tuple of size 1 that contains (in that order):

  • amdsmi_status_t: amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail

C signature

amdsmi_status_t amdsmi_get_gpu_device_uuid(amdsmi_processor_handle processor_handle, unsigned int * uuid_length, char * uuid)
rocm.bindings.amdsmi.amdsmi_get_gpu_enumeration_info(processor_handle)#

Returns the Enumeration information for the device

@platform{gpu_bm_linux} @platform{guest_1vf} @platform{guest_mvf}

This function returns Enumeration information of the corresponding processor_handle. It will return the render number, card number, HSA ID, HIP ID, and the HIP UUID.

Args:
processor_handle (Pointer/object) – IN:

Device which to query

Returns:

A tuple of size 2 that contains (in that order):

C signature

amdsmi_status_t amdsmi_get_gpu_enumeration_info(amdsmi_processor_handle processor_handle, amdsmi_enumeration_info_t * info)
rocm.bindings.amdsmi.amdsmi_get_cpu_affinity_with_scope(processor_handle, cpu_set_size, cpu_set, scope)#
Retrieves an array of uint64_t (sized to cpu_set_size) of bitmasks with the

affinity within numa node or socket for the device.

@platform{gpu_bm_linux} @platform{host}

Given a processor handle processor_handle, the size of the cpu_set array cpu_set_size, and a pointer to an array of int64_t cpu_set, and scope, this function will write the CPU affinity bitmask to the array pointed to by cpu_set.

User must allocate the enough memory for the cpu_set array. The size of the array is determined by the number of CPU cores in the system. As an example, if there are 2 CPUs and each has 112 cores, the size should be ceiling(2*112/64) = 4, where 64 is the bits of uint64_t. The function will write the CPU affinity bitmask to the array. For example, to describe the CPU cores 0-55,112-167, it will set the 0-55 and 112-167 bits to 1 and the reset of bits to 0 in the cpu_set array.

Args:
processor_handle (Pointer/object) – IN:

a processor handle

cpu_set_size (int) – IN:

The size of the cpu_set array that is safe to access

cpu_set (PointerToUInt64/object) – IN,OUT:

Array reference in which to return a bitmask of CPU cores that this processor affinities with.

scope (amdsmi_affinity_scope_t) – IN:

Scope for socket or numa affinity.

Returns:

A tuple of size 1 that contains (in that order):

  • amdsmi_status_t: amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail

C signature

amdsmi_status_t amdsmi_get_cpu_affinity_with_scope(amdsmi_processor_handle processor_handle, uint32_t cpu_set_size, uint64_t * cpu_set, amdsmi_affinity_scope_t scope)
rocm.bindings.amdsmi.amdsmi_get_gpu_virtualization_mode(processor_handle, mode)#

Returns the virtualization mode for the target device.

@platform{gpu_bm_linux} @platform{host} @platform{guest_windows}

The virtualization mode is detected and returned as an enum.

Args:
processor_handle (Pointer/object) – IN:

The identifier of the given device.

mode (Pointer/object) – IN,OUT:

Reference to the enum representing virtualization mode. - When zero, the virtualization mode is unknown - When non-zero, the virtualization mode is detected

Returns:

A tuple of size 1 that contains (in that order):

  • amdsmi_status_t: amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail.

C signature

amdsmi_status_t amdsmi_get_gpu_virtualization_mode(amdsmi_processor_handle processor_handle, amdsmi_virtualization_mode_t * mode)
rocm.bindings.amdsmi.amdsmi_get_nic_processor_handles(socket_handle, processor_count, processor_handles)#

Get the list of the NIC processor handles associated to a socket.

@platform{gpu_bm_linux} @platform{host}

This function retrieves the processor handles of a socket. The socket_handle must be provided for the processor.

Note:

Sockets are not supported on the @platform{host}.

The number of processor count is returned through processor_count if processor_handles is NULL. Then the number of processor_count can be pass as input to retrieval all processors on the socket to processor_handles.

Args:
socket_handle (Pointer/object) – IN:

The socket to query

processor_count (PointerToUnsigned/object) – IN,OUT:

As input, the value passed through this parameter is the number of ::amdsmi_processor_handle’s that may be safely written to the memory pointed to by processor_handles. This is the limit on how many processor handles will be written to processor_handles. On return, processor_count will contain the number of processor handles written to processor_handles, or the number of processor handles that could have been written if enough memory had been provided. If processor_handles is NULL, as output, processor_count will contain how many processors are available to read for the socket.

processor_handles (ListOfPointer/object) – IN,OUT:

A pointer to a block of memory to which the ::amdsmi_processor_handle values will be written. This value may be NULL. In this case, this function can be used to query how many processors are available to read.

Returns:

A tuple of size 1 that contains (in that order):

  • amdsmi_status_t: amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail

C signature

amdsmi_status_t amdsmi_get_nic_processor_handles(amdsmi_socket_handle socket_handle, uint32_t * processor_count, amdsmi_processor_handle * processor_handles)
rocm.bindings.amdsmi.amdsmi_get_nic_device_bdf(processor_handle, bdf)#

Returns BDF of the given NIC device

@platform{gpu_bm_linux} @platform{host}

Args:
processor_handle (Pointer/object) – IN:

Device which to query

bdf (amdsmi_bdf_t/object) – OUT:

Reference to BDF. Must be allocated by user.

Returns:

A tuple of size 1 that contains (in that order):

  • amdsmi_status_t: amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail

C signature

amdsmi_status_t amdsmi_get_nic_device_bdf(amdsmi_processor_handle processor_handle, amdsmi_bdf_t * bdf)
rocm.bindings.amdsmi.amdsmi_get_gpu_id(processor_handle, id)#

Get the device id associated with the device with provided device handler.

@platform{gpu_bm_linux}

Given a processor handle processor_handle and a pointer to a uint32_t id, this function will write the device id value to the uint64_t pointed to by id. This ID is an identification of the type of device, so calling this function for different devices will give the same value if they are kind of device. Consequently, this function should not be used to distinguish one device from another. amdsmi_get_gpu_bdf_id() should be used to get a unique identifier.

Args:
processor_handle (Pointer/object) – IN:

a processor handle

id (Pointer/object) – IN,OUT:

a pointer to uint64_t to which the device id will be written If this parameter is nullptr, this function will return ::AMDSMI_STATUS_INVAL if the function is supported with the provided, arguments and ::AMDSMI_STATUS_NOT_SUPPORTED if it is not supported with the provided arguments.

Returns:

A tuple of size 1 that contains (in that order):

  • amdsmi_status_t: amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail

C signature

amdsmi_status_t amdsmi_get_gpu_id(amdsmi_processor_handle processor_handle, uint16_t * id)
rocm.bindings.amdsmi.amdsmi_get_gpu_revision(processor_handle)#

Get the device revision associated with the device

@platform{gpu_bm_linux}

Given a processor handle processor_handle and a pointer to a uint16_t revision to which the revision id will be written

Args:
processor_handle (Pointer/object) – IN:

a processor handle

Returns:

A tuple of size 2 that contains (in that order):

  • amdsmi_status_t: amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail

  • int:

    a pointer to uint16_t to which the device revision will be written

C signature

amdsmi_status_t amdsmi_get_gpu_revision(amdsmi_processor_handle processor_handle, uint16_t * revision)
rocm.bindings.amdsmi.amdsmi_get_gpu_vendor_name(processor_handle, name, len)#

Get the name string for a give vendor ID

@platform{gpu_bm_linux}

Given a processor handle processor_handle, a pointer to a caller provided char buffer name, and a length of this buffer len, this function will write the name of the vendor (up to len characters) buffer name. The id may be a device vendor or subsystem vendor ID.

If the integer ID associated with the vendor is not found in one of the system files containing device name information (e.g. /usr/share/misc/pci.ids), then this function will return the hex vendor ID as a string. Updating the system name files can be accompplished with “sudo update-pciids”.

Note:

AMDSMI_STATUS_INSUFFICIENT_SIZE is returned if len bytes is not large enough to hold the entire name. In this case, only len bytes will be written.

Args:
processor_handle (Pointer/object) – IN:

a processor handle

name (CStr/object) – IN,OUT:

a pointer to a caller provided char buffer to which the name will be written If this parameter is nullptr, this function will return ::AMDSMI_STATUS_INVAL if the function is supported with the provided, arguments and ::AMDSMI_STATUS_NOT_SUPPORTED if it is not supported with the provided arguments.

len (int) – IN:

the length of the caller provided buffer name.

Returns:

A tuple of size 1 that contains (in that order):

  • amdsmi_status_t: amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail

C signature

amdsmi_status_t amdsmi_get_gpu_vendor_name(amdsmi_processor_handle processor_handle, char * name, size_t len)
rocm.bindings.amdsmi.amdsmi_get_gpu_vram_vendor(processor_handle, brand, len)#

Get the vram vendor string of a device.

Deprecated:

This API is slated for removal in a future ROCm release; ::amdsmi_get_gpu_vram_info() should be used instead

@platform{gpu_bm_linux}

This function retrieves the vram vendor name given a processor handle processor_handle, a pointer to a caller provided char buffer brand, and a length of this buffer len, this function will write the vram vendor of the device (up to len characters) to the buffer brand.

If the vram vendor for the device is not found as one of the values contained within amdsmi_get_gpu_vram_vendor, then this function will return the string ‘unknown’ instead of the vram vendor.

Args:
processor_handle (Pointer/object) – IN:

a processor handle

brand (Pointer/object) – IN,OUT:

a pointer to a caller provided char buffer to which the vram vendor will be written

len (int) – IN:

the length of the caller provided buffer brand.

Returns:

A tuple of size 1 that contains (in that order):

  • amdsmi_status_t: amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail

C signature

amdsmi_status_t amdsmi_get_gpu_vram_vendor(amdsmi_processor_handle processor_handle, char * brand, uint32_t len)
rocm.bindings.amdsmi.amdsmi_get_gpu_subsystem_id(processor_handle, id)#

Get the subsystem device id associated with the device with provided processor handle.

@platform{gpu_bm_linux}

Given a processor handle processor_handle and a pointer to a uint32_t id, this function will write the subsystem device id value to the uint64_t pointed to by id.

Args:
processor_handle (Pointer/object) – IN:

a processor handle

id (Pointer/object) – IN,OUT:

a pointer to uint64_t to which the subsystem device id will be written If this parameter is nullptr, this function will return ::AMDSMI_STATUS_INVAL if the function is supported with the provided, arguments and ::AMDSMI_STATUS_NOT_SUPPORTED if it is not supported with the provided arguments.

Returns:

A tuple of size 1 that contains (in that order):

  • amdsmi_status_t: amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail

C signature

amdsmi_status_t amdsmi_get_gpu_subsystem_id(amdsmi_processor_handle processor_handle, uint16_t * id)
rocm.bindings.amdsmi.amdsmi_get_gpu_subsystem_name(processor_handle, name, len)#

Get the name string for the device subsystem

@platform{gpu_bm_linux}

Given a processor handle processor_handle, a pointer to a caller provided char buffer name, and a length of this buffer len, this function will write the name of the device subsystem (up to len characters) to the buffer name.

If the integer ID associated with the sub-system is not found in one of the system files containing device name information (e.g. /usr/share/misc/pci.ids), then this function will return the hex sub-system ID as a string. Updating the system name files can be accompplished with “sudo update-pciids”.

Note:

AMDSMI_STATUS_INSUFFICIENT_SIZE is returned if len bytes is not large enough to hold the entire name. In this case, only len bytes will be written.

Args:
processor_handle (Pointer/object) – IN:

a processor handle

name (CStr/object) – IN,OUT:

a pointer to a caller provided char buffer to which the name will be written If this parameter is nullptr, this function will return ::AMDSMI_STATUS_INVAL if the function is supported with the provided, arguments and ::AMDSMI_STATUS_NOT_SUPPORTED if it is not supported with the provided arguments.

len (int) – IN:

the length of the caller provided buffer name.

Returns:

A tuple of size 1 that contains (in that order):

  • amdsmi_status_t: amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail

C signature

amdsmi_status_t amdsmi_get_gpu_subsystem_name(amdsmi_processor_handle processor_handle, char * name, size_t len)
rocm.bindings.amdsmi.amdsmi_get_gpu_pci_bandwidth(processor_handle, bandwidth)#

Get the list of possible PCIe bandwidths that are available. It is not supported on virtual machine guest

@platform{gpu_bm_linux} @platform{host}

Given a processor handle processor_handle and a pointer to a to an ::amdsmi_pcie_bandwidth_t structure bandwidth, this function will fill in bandwidth with the possible T/s values and associated number of lanes, and indication of the current selection.

Args:
processor_handle (Pointer/object) – IN:

a processor handle

bandwidth (amdsmi_pcie_bandwidth_t/object) – IN,OUT:

a pointer to a caller provided ::amdsmi_pcie_bandwidth_t structure to which the frequency information will be written

Returns:

A tuple of size 1 that contains (in that order):

  • amdsmi_status_t: amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail

C signature

amdsmi_status_t amdsmi_get_gpu_pci_bandwidth(amdsmi_processor_handle processor_handle, amdsmi_pcie_bandwidth_t * bandwidth)
rocm.bindings.amdsmi.amdsmi_get_gpu_bdf_id(processor_handle, bdfid)#

Get the unique PCI device identifier associated for a device

@platform{gpu_bm_linux}

Given a processor handle processor_handle and a pointer to a uint64_t bdfid, this function will write the Bus/Device/Function PCI identifier (BDFID) associated with device processor_handle to the value pointed to by bdfid.

The format of bdfid will be as follows:

BDFID = ((DOMAIN & 0xFFFFFFFF) << 32) | ((Partition & 0xF) << 28)
((BUS & 0xFF) << 8) | ((DEVICE & 0x1F) <<3 )
(FUNCTION & 0x7)
Name | Field | KFD property | KFD -> PCIe ID (uint64_t) |

————– | ——- | —————- | —————————- | | Domain | [63:32] | “domain” | (DOMAIN & 0xFFFFFFFF) << 32 | | Partition id | [31:28] | “location id” | (LOCATION & 0xF0000000) | | Reserved | [27:16] | “location id” | N/A | | Bus | [15: 8] | “location id” | (LOCATION & 0xFF00) | | Device | [ 7: 3] | “location id” | (LOCATION & 0xF8) | | Function | [ 2: 0] | “location id” | (LOCATION & 0x7) |

Note: In some devices, the partition ID may be stored in the function bits BDFID[2:0] instead of BDFID[31:28].

Note: For MI series devices, the function bits are only used to store the partition ID, but this modified BDF is internal to the ROCm stack. To the OS, partitions share the same BDF as the unpartitioned device and have function bits = 0, which can be verified through lspci.

Args:
processor_handle (Pointer/object) – IN:

a processor handle

bdfid (PointerToUInt64/object) – IN,OUT:

a pointer to uint64_t to which the device bdfid value will be written If this parameter is nullptr, this function will return ::AMDSMI_STATUS_INVAL if the function is supported with the provided, arguments and ::AMDSMI_STATUS_NOT_SUPPORTED if it is not supported with the provided arguments.

Returns:

A tuple of size 1 that contains (in that order):

  • amdsmi_status_t: amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail

C signature

amdsmi_status_t amdsmi_get_gpu_bdf_id(amdsmi_processor_handle processor_handle, uint64_t * bdfid)
rocm.bindings.amdsmi.amdsmi_get_gpu_topo_numa_affinity(processor_handle, numa_node)#

Get the NUMA node associated with a device

@platform{gpu_bm_linux}

Given a processor handle processor_handle and a pointer to a int32_t numa_node, this function will retrieve the NUMA node value associated with device processor_handle and store the value at location pointed to by numa_node.

Args:
processor_handle (Pointer/object) – IN:

a processor handle

numa_node (PointerToInt/object) – IN,OUT:

pointer to location where NUMA node value will be written. If this parameter is nullptr, this function will return ::AMDSMI_STATUS_INVAL if the function is supported with the provided, arguments and ::AMDSMI_STATUS_NOT_SUPPORTED if it is not supported with the provided arguments.

Returns:

A tuple of size 1 that contains (in that order):

  • amdsmi_status_t: amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail

C signature

amdsmi_status_t amdsmi_get_gpu_topo_numa_affinity(amdsmi_processor_handle processor_handle, int32_t * numa_node)
rocm.bindings.amdsmi.amdsmi_get_gpu_pci_throughput(processor_handle, sent, received, max_pkt_sz)#

Get PCIe traffic information. It is not supported on virtual machine guest

@platform{gpu_bm_linux}

Give a processor handle processor_handle and pointers to a uint64_t’s, sent, received and max_pkt_sz, this function will write the number of bytes sent and received in 1 second to sent and received, respectively. The maximum possible packet size will be written to max_pkt_sz.

Args:
processor_handle (Pointer/object) – IN:

a processor handle

sent (PointerToUInt64/object) – IN,OUT:

a pointer to uint64_t to which the number of bytes sent will be written in 1 second. If pointer is NULL, it will be ignored.

received (PointerToUInt64/object) – IN,OUT:

a pointer to uint64_t to which the number of bytes received will be written. If pointer is NULL, it will be ignored.

max_pkt_sz (PointerToUInt64/object) – IN,OUT:

a pointer to uint64_t to which the maximum packet size will be written. If pointer is NULL, it will be ignored.

Returns:

A tuple of size 1 that contains (in that order):

  • amdsmi_status_t: amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail

C signature

amdsmi_status_t amdsmi_get_gpu_pci_throughput(amdsmi_processor_handle processor_handle, uint64_t * sent, uint64_t * received, uint64_t * max_pkt_sz)
rocm.bindings.amdsmi.amdsmi_get_gpu_pci_replay_counter(processor_handle, counter)#

Get PCIe replay counter

@platform{gpu_bm_linux}

Given a processor handle processor_handle and a pointer to a uint64_t counter, this function will write the sum of the number of NAK’s received by the GPU and the NAK’s generated by the GPU to memory pointed to by counter.

Args:
processor_handle (Pointer/object) – IN:

a processor handle

counter (PointerToUInt64/object) – IN,OUT:

a pointer to uint64_t to which the sum of the NAK’s received and generated by the GPU is written If this parameter is nullptr, this function will return ::AMDSMI_STATUS_INVAL if the function is supported with the provided, arguments and ::AMDSMI_STATUS_NOT_SUPPORTED if it is not supported with the provided arguments.

Returns:

A tuple of size 1 that contains (in that order):

  • amdsmi_status_t: amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail

C signature

amdsmi_status_t amdsmi_get_gpu_pci_replay_counter(amdsmi_processor_handle processor_handle, uint64_t * counter)
rocm.bindings.amdsmi.amdsmi_set_gpu_pci_bandwidth(processor_handle, bw_bitmask)#

Control the set of allowed PCIe bandwidths that can be used. It is not supported on virtual machine guest

@platform{gpu_bm_linux}

Given a processor handle processor_handle and a 64 bit bitmask bw_bitmask, this function will limit the set of allowable bandwidths. If a bit in bw_bitmask has a value of 1, then the frequency (as ordered in an ::amdsmi_frequencies_t returned by :: amdsmi_get_clk_freq()) corresponding to that bit index will be allowed.

This function will change the performance level to ::AMDSMI_DEV_PERF_LEVEL_MANUAL in order to modify the set of allowable band_widths. Caller will need to set to ::AMDSMI_DEV_PERF_LEVEL_AUTO in order to get back to default state.

All bits with indices greater than or equal to the value of the ::amdsmi_frequencies_t::num_supported field of ::amdsmi_pcie_bandwidth_t will be ignored.

Note:

This function requires admin/sudo privileges

Args:
processor_handle (Pointer/object) – IN:

a processor handle

bw_bitmask (int) – IN:

A bitmask indicating the indices of the bandwidths that are to be enabled (1) and disabled (0). Only the lowest ::amdsmi_frequencies_t::num_supported (of ::amdsmi_pcie_bandwidth_t) bits of this mask are relevant.

Returns:

A tuple of size 1 that contains (in that order):

  • amdsmi_status_t: amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail

C signature

amdsmi_status_t amdsmi_set_gpu_pci_bandwidth(amdsmi_processor_handle processor_handle, uint64_t bw_bitmask)
rocm.bindings.amdsmi.amdsmi_get_energy_count(processor_handle, energy_accumulator, counter_resolution, timestamp)#

Get the energy accumulator counter of the processor with provided processor handle. It is not supported on virtual machine guest

@platform{gpu_bm_linux}

Given a processor handle processor_handle, a pointer to a uint64_t energy_accumulator, and a pointer to a uint64_t timestamp, this function will write amount of energy consumed to the uint64_t pointed to by energy_accumulator, and the timestamp to the uint64_t pointed to by timestamp. This function accumulates all energy consumed.

Args:
processor_handle (Pointer/object) – IN:

a processor handle

energy_accumulator (PointerToUInt64/object) – IN,OUT:

a pointer to uint64_t to which the energy counter will be written If this parameter is nullptr, this function will return ::AMDSMI_STATUS_INVAL if the function is supported with the provided, and ::AMDSMI_STATUS_NOT_SUPPORTED if it is not supported with the provided arguments.

counter_resolution (Pointer/object) – IN,OUT:

resolution of the counter energy_accumulator in micro Joules

timestamp (PointerToUInt64/object) – IN,OUT:

a pointer to uint64_t to which the timestamp will be written. Resolution: 1 ns.

Returns:

A tuple of size 1 that contains (in that order):

  • amdsmi_status_t: amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail

C signature

amdsmi_status_t amdsmi_get_energy_count(amdsmi_processor_handle processor_handle, uint64_t * energy_accumulator, float * counter_resolution, uint64_t * timestamp)
rocm.bindings.amdsmi.amdsmi_set_power_cap(processor_handle, sensor_ind, cap)#

Set the maximum gpu power cap value. It is not supported on virtual machine guest

@platform{host} @platform{gpu_bm_linux} @platform{guest_1vf}

Set the power cap to the provided value cap. cap must be between the minimum and maximum power cap values set by the system, which can be obtained from ::amdsmi_dev_power_cap_range_get.

Args:
processor_handle (Pointer/object) – IN:

A processor handle

sensor_ind (int) – IN:

a 0-based sensor index. Normally, this will be 0. If a processor has more than one sensor, it could be greater than 0.

cap (int) – IN:

a uint64_t that indicates the desired power cap. The cap value must be greater than 0.

Returns:

A tuple of size 1 that contains (in that order):

  • amdsmi_status_t: amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail

C signature

amdsmi_status_t amdsmi_set_power_cap(amdsmi_processor_handle processor_handle, uint32_t sensor_ind, uint64_t cap)
rocm.bindings.amdsmi.amdsmi_set_gpu_power_profile(processor_handle, reserved, profile)#

Set the power performance profile. It is not supported on virtual machine guest

@platform{gpu_bm_linux}

This function will attempt to set the current profile to the provided profile, given a processor handle processor_handle and a profile. The provided profile must be one of the currently supported profiles, as indicated by a call to :: amdsmi_get_gpu_power_profile_presets()

Args:
processor_handle (Pointer/object) – IN:

a processor handle

reserved (int) – IN:

Not currently used. Set to 0.

profile (amdsmi_power_profile_preset_masks_t) – IN:

a ::amdsmi_power_profile_preset_masks_t that hold the mask of the desired new power profile

Returns:

A tuple of size 1 that contains (in that order):

  • amdsmi_status_t: amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail

C signature

amdsmi_status_t amdsmi_set_gpu_power_profile(amdsmi_processor_handle processor_handle, uint32_t reserved, amdsmi_power_profile_preset_masks_t profile)
rocm.bindings.amdsmi.amdsmi_get_supported_power_cap(processor_handle, sensor_inds, sensor_types)#

Query the supported power cap sensors and their types for a device.

@platform{gpu_bm_linux} @platform{host}

This function returns the list of supported power cap sensors for the given device, including their sensor indices and types (e.g., PPT0, PPT1).

Args:
processor_handle (Pointer/object) – IN:

A processor handle.

sensor_inds (ListOfUnsigned/object) – OUT:

Pointer to an array of uint32_t to be filled with sensor indices. The array must be allocated by the caller with enough space.

sensor_types (Pointer/object) – OUT:

Pointer to an array of amdsmi_power_cap_type_t to be filled with sensor types. The array must be allocated by the caller with enough space.

Returns:

A tuple of size 2 that contains (in that order):

  • amdsmi_status_t: amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail.

  • int:

    Pointer to a uint32_t that will be set to the number of supported sensors.

C signature

amdsmi_status_t amdsmi_get_supported_power_cap(amdsmi_processor_handle processor_handle, uint32_t * sensor_count, uint32_t * sensor_inds, amdsmi_power_cap_type_t * sensor_types)
rocm.bindings.amdsmi.amdsmi_get_cpu_socket_power(processor_handle)#

Get the socket power.

@platform{cpu_bm}

Args:
processor_handle (Pointer/object) – IN:

Cpu socket which to query

Returns:

A tuple of size 2 that contains (in that order):

  • amdsmi_status_t: amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail

  • int:
    • Input buffer to return socket power in milliwatts (mW)

C signature

amdsmi_status_t amdsmi_get_cpu_socket_power(amdsmi_processor_handle processor_handle, uint32_t * ppower)
rocm.bindings.amdsmi.amdsmi_get_cpu_socket_power_cap(processor_handle)#

Get the socket power cap.

@platform{cpu_bm}

Args:
processor_handle (Pointer/object) – IN:

Cpu socket which to query

Returns:

A tuple of size 2 that contains (in that order):

  • amdsmi_status_t: amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail

  • int:
    • Input buffer to return power cap in milliwatts (mW)

C signature

amdsmi_status_t amdsmi_get_cpu_socket_power_cap(amdsmi_processor_handle processor_handle, uint32_t * pcap)
rocm.bindings.amdsmi.amdsmi_get_cpu_socket_power_cap_max(processor_handle)#

Get the maximum power cap value for a given socket.

@platform{cpu_bm}

Args:
processor_handle (Pointer/object) – IN:

Cpu socket which to query

Returns:

A tuple of size 2 that contains (in that order):

  • amdsmi_status_t: amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail

  • int:
    • Input buffer to return maximum power limit value in milliwatts (mW)

C signature

amdsmi_status_t amdsmi_get_cpu_socket_power_cap_max(amdsmi_processor_handle processor_handle, uint32_t * pmax)
rocm.bindings.amdsmi.amdsmi_get_cpu_pwr_svi_telemetry_all_rails(processor_handle, power)#

Get the SVI based power telemetry for all rails.

@platform{cpu_bm}

Args:
processor_handle (Pointer/object) – IN:

Cpu socket which to query

power (PointerToUnsigned/object) – IN,OUT:
  • Input buffer to return svi based power value

Returns:

A tuple of size 1 that contains (in that order):

  • amdsmi_status_t: amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail

C signature

amdsmi_status_t amdsmi_get_cpu_pwr_svi_telemetry_all_rails(amdsmi_processor_handle processor_handle, uint32_t * power)
rocm.bindings.amdsmi.amdsmi_set_cpu_socket_power_cap(processor_handle, pcap)#

Set the power cap value for a given socket.

@platform{cpu_bm}

Args:
processor_handle (Pointer/object) – IN:

Cpu socket which to query

pcap (int) – IN:
  • Input power limit value in milliwatts (mW)

Returns:

A tuple of size 1 that contains (in that order):

  • amdsmi_status_t: amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail

C signature

amdsmi_status_t amdsmi_set_cpu_socket_power_cap(amdsmi_processor_handle processor_handle, uint32_t pcap)
rocm.bindings.amdsmi.amdsmi_set_cpu_pwr_efficiency_mode(processor_handle, power_efficiency_mode, utilization, ppt_limit)#

Set the power efficiency profile policy.

@platform{cpu_bm}

Args:
processor_handle (Pointer/object) – IN:

Cpu socket which to configure

power_efficiency_mode (int) – IN:
  • power efficiency mode to be set

utilization (PointerToUnsigned/object) – IN,OUT:
  • pointer to store utilization for balanced core modes (%)

ppt_limit (PointerToUnsigned/object) – IN,OUT:
  • pointer to PPT (Package Power Tracking) limit value

in milliwatts (mW)

Returns:

A tuple of size 1 that contains (in that order):

  • amdsmi_status_t: amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail

C signature

amdsmi_status_t amdsmi_set_cpu_pwr_efficiency_mode(amdsmi_processor_handle processor_handle, uint8_t power_efficiency_mode, uint32_t * utilization, uint32_t * ppt_limit)
rocm.bindings.amdsmi.amdsmi_get_cpu_pwr_efficiency_mode(processor_handle)#

Get the power efficiency profile policy

This function retrieves the current power efficiency mode, utility value, and PPT (Package Power Tracking) limit for a given processor socket.

@platform{cpu_bm}

Args:
processor_handle (Pointer/object) – IN:

Cpu socket which to query

Returns:

A tuple of size 4 that contains (in that order):

  • amdsmi_status_t: amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail

  • int:
    • pointer to store current power efficiency mode

  • int:
    • pointer to store utilization for balanced core modes (%)

  • int:
    • pointer to store PPT (Package Power Tracking) limit value

    in milliwatts (mW)

C signature

amdsmi_status_t amdsmi_get_cpu_pwr_efficiency_mode(amdsmi_processor_handle processor_handle, uint32_t * power_efficiency_mode, uint32_t * utilization, uint32_t * ppt_limit)
rocm.bindings.amdsmi.amdsmi_get_cpu_core_ccd_power(processor_handle)#

Read CCD (Core Complex Die) power consumption

This function reads the power consumption of a specific CCD within a CPU socket.

@platform{cpu_bm}

Args:
processor_handle (Pointer/object) – IN:

Cpu core which to query

Returns:

A tuple of size 2 that contains (in that order):

  • amdsmi_status_t: amdsmi_status_t

    ::AMDSMI_STATUS_SUCCESS on successful register read, non-zero on failure

  • int:
    • Input buffer to store power consumption in milliwatts (mW)

C signature

amdsmi_status_t amdsmi_get_cpu_core_ccd_power(amdsmi_processor_handle processor_handle, uint32_t * power)
rocm.bindings.amdsmi.amdsmi_get_gpu_memory_total(processor_handle, mem_type, total)#

Get the total amount of memory that exists

@platform{gpu_bm_linux}

Given a processor handle processor_handle, a type of memory mem_type, and a pointer to a uint64_t total, this function will write the total amount of mem_type memory that exists to the location pointed to by total.

Note:

Sum of the process memory is not expected to be the total memory usage.

Args:
processor_handle (Pointer/object) – IN:

a processor handle

mem_type (amdsmi_memory_type_t) – IN:

The type of memory for which the total amount will be found

total (PointerToUInt64/object) – IN,OUT:

a pointer to uint64_t to which the total amount of memory will be written If this parameter is nullptr, this function will return ::AMDSMI_STATUS_INVAL if the function is supported with the provided, arguments and ::AMDSMI_STATUS_NOT_SUPPORTED if it is not supported with the provided arguments.

Returns:

A tuple of size 1 that contains (in that order):

  • amdsmi_status_t: amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail

C signature

amdsmi_status_t amdsmi_get_gpu_memory_total(amdsmi_processor_handle processor_handle, amdsmi_memory_type_t mem_type, uint64_t * total)
rocm.bindings.amdsmi.amdsmi_get_gpu_memory_usage(processor_handle, mem_type, used)#

Get the current memory usage

@platform{gpu_bm_linux}

This function will write the amount of mem_type memory that that is currently being used to the location pointed to by used.

Note:

Sum of the process memory is not expected to be the total memory usage.

Args:
processor_handle (Pointer/object) – IN:

a processor handle

mem_type (amdsmi_memory_type_t) – IN:

The type of memory for which the amount being used will be found

used (PointerToUInt64/object) – IN,OUT:

a pointer to uint64_t to which the amount of memory currently being used will be written If this parameter is nullptr, this function will return ::AMDSMI_STATUS_INVAL if the function is supported with the provided, arguments and ::AMDSMI_STATUS_NOT_SUPPORTED if it is not supported with the provided arguments.

Returns:

A tuple of size 1 that contains (in that order):

  • amdsmi_status_t: amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail

C signature

amdsmi_status_t amdsmi_get_gpu_memory_usage(amdsmi_processor_handle processor_handle, amdsmi_memory_type_t mem_type, uint64_t * used)
rocm.bindings.amdsmi.amdsmi_get_gpu_bad_page_info(processor_handle)#

Get the bad pages of a processor. It is not supported on virtual machine guest

@platform{gpu_bm_linux}

This call will query the device processor_handle for the number of bad pages (written to num_pages address). The results are written to address held by the info pointer. The first call to this API returns the number of bad pages which should be used to allocate the buffer that should contain the bad page records.

Args:
processor_handle (Pointer/object) – IN:

a processor handle

Returns:

A tuple of size 3 that contains (in that order):

C signature

amdsmi_status_t amdsmi_get_gpu_bad_page_info(amdsmi_processor_handle processor_handle, uint32_t * num_pages, amdsmi_retired_page_record_t * info)
rocm.bindings.amdsmi.amdsmi_get_gpu_bad_page_threshold(processor_handle)#

Get the bad pages threshold of a processor. It is not supported on virtual machine guest

@platform{gpu_bm_linux}

This call will query the device processor_handle for the threshold of bad pages (written to threshold address).

Note:

This function requires admin/sudo privileges

Args:
processor_handle (Pointer/object) – IN:

a processor handle

Returns:

A tuple of size 2 that contains (in that order):

  • amdsmi_status_t: amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail

  • int:

    of bad page count.

C signature

amdsmi_status_t amdsmi_get_gpu_bad_page_threshold(amdsmi_processor_handle processor_handle, uint32_t * threshold)
rocm.bindings.amdsmi.amdsmi_gpu_validate_ras_eeprom(processor_handle)#

Verify the checksum of RAS EEPROM. It is not supported on virtual machine guest

@platform{gpu_bm_linux}

This call will verify the device processor_handle for the checksum of RAS EEPROM.

Note:

This function requires admin/sudo privileges

Args:
processor_handle (Pointer/object) – IN:

a processor handle

Returns:

A tuple of size 1 that contains (in that order):

  • amdsmi_status_t: amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success

    AMDSMI_STATUS_CORRUPTED_EEPROM on the device’s EEPROM corruption others on fail

C signature

amdsmi_status_t amdsmi_gpu_validate_ras_eeprom(amdsmi_processor_handle processor_handle)
rocm.bindings.amdsmi.amdsmi_get_gpu_ras_block_features_enabled(processor_handle, block, state)#

Returns if RAS features are enabled or disabled for given block. It is not supported on virtual machine guest

@platform{gpu_bm_linux}

Given a processor handle processor_handle, this function queries the state of RAS features for a specific block block. Result will be written to address held by pointer state.

Args:
processor_handle (Pointer/object) – IN:

Device handle which to query

block (amdsmi_gpu_block_t) – IN:

Block which to query

state (Pointer/object) – IN,OUT:

A pointer to amdsmi_ras_err_state_t to which the state of block will be written. If this parameter is nullptr, this function will return ::AMDSMI_STATUS_INVAL if the function is supported with the provided arguments and ::AMDSMI_STATUS_NOT_SUPPORTED if it is not supported with the provided arguments.

Returns:

A tuple of size 1 that contains (in that order):

  • amdsmi_status_t: amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail

C signature

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)
rocm.bindings.amdsmi.amdsmi_get_gpu_memory_reserved_pages(processor_handle, num_pages, records)#

Get information about reserved (“retired”) memory pages. It is not supported on virtual machine guest

@platform{gpu_bm_linux}

Given a processor handle processor_handle, this function returns retired page information records corresponding to the device with the provided processor handle processor_handle. The number of retired page records is returned through num_pages. records may be NULL on input. In this case, the number of records available for retrieval will be returned through num_pages.

Args:
processor_handle (Pointer/object) – IN:

a processor handle

num_pages (PointerToUnsigned/object) – IN,OUT:

a pointer to a uint32. As input, the value passed through this parameter is the number of ::amdsmi_retired_page_record_t’s that may be safely written to the memory pointed to by records. This is the limit on how many records will be written to records. On return, num_pages will contain the number of records written to records, or the number of records that could have been written if enough memory had been provided. If this parameter is nullptr, this function will return ::AMDSMI_STATUS_INVAL if the function is supported with the provided, arguments and ::AMDSMI_STATUS_NOT_SUPPORTED if it is not supported with the provided arguments.

records (amdsmi_retired_page_record_t/object) – IN,OUT:

A pointer to a block of memory to which the ::amdsmi_retired_page_record_t values will be written. This value may be NULL. In this case, this function can be used to query how many records are available to read.

Returns:

A tuple of size 1 that contains (in that order):

  • amdsmi_status_t: amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail

C signature

amdsmi_status_t amdsmi_get_gpu_memory_reserved_pages(amdsmi_processor_handle processor_handle, uint32_t * num_pages, amdsmi_retired_page_record_t * records)
rocm.bindings.amdsmi.amdsmi_get_gpu_fan_rpms(processor_handle, sensor_ind, speed)#

Get the fan speed in RPMs of the device with the specified processor handle and 0-based sensor index. It is not supported on virtual machine guest

@platform{gpu_bm_linux}

Given a processor handle processor_handle and a pointer to a uint32_t speed, this function will write the current fan speed in RPMs to the uint32_t pointed to by speed

Args:
processor_handle (Pointer/object) – IN:

a processor handle

sensor_ind (int) – IN:

a 0-based sensor index. Normally, this will be 0. If a device has more than one sensor, it could be greater than 0.

speed (PointerToInt64/object) – IN,OUT:

a pointer to uint32_t to which the speed will be written If this parameter is nullptr, this function will return ::AMDSMI_STATUS_INVAL if the function is supported with the provided, arguments and ::AMDSMI_STATUS_NOT_SUPPORTED if it is not supported with the provided arguments.

Returns:

A tuple of size 1 that contains (in that order):

  • amdsmi_status_t: amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail

C signature

amdsmi_status_t amdsmi_get_gpu_fan_rpms(amdsmi_processor_handle processor_handle, uint32_t sensor_ind, int64_t * speed)
rocm.bindings.amdsmi.amdsmi_get_gpu_fan_speed(processor_handle, sensor_ind, speed)#

Get the fan speed for the specified device as a value relative to the maximum fan speed. It is not supported on virtual machine guest

@platform{gpu_bm_linux}

Given a processor handle processor_handle and a pointer to a uint32_t speed, this function will write the current fan speed (a value between 0 and the maximum fan speed) to the uint32_t pointed to by speed. For legacy hwmon GPUs the maximum is ::AMDSMI_MAX_FAN_SPEED (255). For GPUs with the gpu_od sysfs interface, use amdsmi_get_gpu_fan_speed_max() to query the actual maximum

Args:
processor_handle (Pointer/object) – IN:

a processor handle

sensor_ind (int) – IN:

a 0-based sensor index. Normally, this will be 0. If a device has more than one sensor, it could be greater than 0.

speed (PointerToInt64/object) – IN,OUT:

a pointer to uint32_t to which the speed will be written If this parameter is nullptr, this function will return ::AMDSMI_STATUS_INVAL if the function is supported with the provided, arguments and ::AMDSMI_STATUS_NOT_SUPPORTED if it is not supported with the provided arguments.

Returns:

A tuple of size 1 that contains (in that order):

  • amdsmi_status_t: amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail

C signature

amdsmi_status_t amdsmi_get_gpu_fan_speed(amdsmi_processor_handle processor_handle, uint32_t sensor_ind, int64_t * speed)
rocm.bindings.amdsmi.amdsmi_get_gpu_fan_speed_max(processor_handle, sensor_ind, max_speed)#

Get the max. fan speed of the device with provided processor handle. It is not supported on virtual machine guest

@platform{gpu_bm_linux}

Given a processor handle processor_handle and a pointer to a uint32_t max_speed, this function will write the maximum fan speed possible to the uint32_t pointed to by max_speed. For legacy hwmon GPUs this is ::AMDSMI_MAX_FAN_SPEED (255). For GPUs with the gpu_od sysfs interface, the maximum is read from the OD_RANGE section of the fan_minimum_pwm sysfs file (e.g. 100)

Args:
processor_handle (Pointer/object) – IN:

a processor handle

sensor_ind (int) – IN:

a 0-based sensor index. Normally, this will be 0. If a device has more than one sensor, it could be greater than 0.

max_speed (PointerToUInt64/object) – IN,OUT:

a pointer to uint32_t to which the maximum speed will be written If this parameter is nullptr, this function will return ::AMDSMI_STATUS_INVAL if the function is supported with the provided, arguments and ::AMDSMI_STATUS_NOT_SUPPORTED if it is not supported with the provided arguments.

Returns:

A tuple of size 1 that contains (in that order):

  • amdsmi_status_t: amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail

C signature

amdsmi_status_t amdsmi_get_gpu_fan_speed_max(amdsmi_processor_handle processor_handle, uint32_t sensor_ind, uint64_t * max_speed)
rocm.bindings.amdsmi.amdsmi_get_gpu_cache_info(processor_handle)#

Returns gpu cache info.

@platform{gpu_bm_linux} @platform{host}

Args:
processor_handle (Pointer/object) – IN:

PF of a processor for which to query

Returns:

A tuple of size 2 that contains (in that order):

C signature

amdsmi_status_t amdsmi_get_gpu_cache_info(amdsmi_processor_handle processor_handle, amdsmi_gpu_cache_info_t * info)
rocm.bindings.amdsmi.amdsmi_get_gpu_volt_metric(processor_handle, sensor_type, metric, voltage)#

Get the voltage metric value for the specified metric, from the specified voltage sensor on the specified device. It is not supported on virtual machine guest

@platform{gpu_bm_linux}

Given a processor handle processor_handle, a sensor type sensor_type, a ::amdsmi_voltage_metric_t metric and a pointer to an int64_t voltage, this function will write the value of the metric indicated by metric and sensor_type to the memory location voltage.

Args:
processor_handle (Pointer/object) – IN:

a processor handle

sensor_type (amdsmi_voltage_type_t) – IN:

part of device from which voltage should be obtained. This should come from the enum ::amdsmi_voltage_type_t

metric (amdsmi_voltage_metric_t) – IN:

enum indicated which voltage value should be retrieved

voltage (PointerToInt64/object) – IN,OUT:

a pointer to int64_t to which the voltage will be written, in millivolts. If this parameter is nullptr, this function will return ::AMDSMI_STATUS_INVAL if the function is supported with the provided, arguments and ::AMDSMI_STATUS_NOT_SUPPORTED if it is not supported with the provided arguments.

Returns:

A tuple of size 1 that contains (in that order):

  • amdsmi_status_t: amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail

C signature

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)
rocm.bindings.amdsmi.amdsmi_reset_gpu_fan(processor_handle, sensor_ind)#

Reset the fan to automatic driver control. It is not supported on virtual machine guest

@platform{gpu_bm_linux}

This function returns control of the fan to the system. For GPUs with the gpu_od sysfs interface, this writes the OD_RANGE minimum value to fan_minimum_pwm and commits the change

Args:
processor_handle (Pointer/object) – IN:

a processor handle

sensor_ind (int) – IN:

a 0-based sensor index. Normally, this will be 0. If a device has more than one sensor, it could be greater than 0.

Returns:

A tuple of size 1 that contains (in that order):

  • amdsmi_status_t: amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail

C signature

amdsmi_status_t amdsmi_reset_gpu_fan(amdsmi_processor_handle processor_handle, uint32_t sensor_ind)
rocm.bindings.amdsmi.amdsmi_set_gpu_fan_speed(processor_handle, sensor_ind, speed)#

Set the fan speed for the specified device with the provided speed, in RPMs. It is not supported on virtual machine guest

@platform{gpu_bm_linux}

Given a processor handle processor_handle and a integer value indicating speed speed, this function will attempt to set the fan speed to speed. An error will be returned if the specified speed is outside the allowable range for the device. For legacy hwmon GPUs the range is 0-255. For GPUs with the gpu_od sysfs interface, the valid range is determined dynamically from the OD_RANGE (e.g. 20-100).

Note:

This function requires admin/sudo privileges

Args:
processor_handle (Pointer/object) – IN:

a processor handle

sensor_ind (int) – IN:

a 0-based sensor index. Normally, this will be 0. If a device has more than one sensor, it could be greater than 0.

speed (int) – IN:

the speed to which the function will attempt to set the fan

Returns:

A tuple of size 1 that contains (in that order):

  • amdsmi_status_t: amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail

C signature

amdsmi_status_t amdsmi_set_gpu_fan_speed(amdsmi_processor_handle processor_handle, uint32_t sensor_ind, uint64_t speed)
rocm.bindings.amdsmi.amdsmi_get_gpu_busy_percent(processor_handle, gpu_busy_percent)#

Get GPU busy percent from gpu_busy_percent sysfs file

@platform{gpu_bm_linux}

Given a processor handle processor_handle, this function returns GPU busy percentage.

Args:
processor_handle (Pointer/object) – IN:

a processor handle

gpu_busy_percent (PointerToUnsigned/object) – IN,OUT:

Direct output from the gpu_busy_percent sysfs file

Returns:

A tuple of size 1 that contains (in that order):

  • amdsmi_status_t: amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail

C signature

amdsmi_status_t amdsmi_get_gpu_busy_percent(amdsmi_processor_handle processor_handle, uint32_t * gpu_busy_percent)
rocm.bindings.amdsmi.amdsmi_get_vcn_busy_percent(processor_handle)#

Get VCN busy percent from vcn_busy_percent sysfs file

@platform{gpu_bm_linux}

Given a processor handle processor_handle, this function returns VCN busy percentage.

@retval ::AMDSMI_STATUS_SUCCESS on success

@retval ::AMDSMI_STATUS_NOT_SUPPORTED if the device does not support this query @retval ::AMDSMI_STATUS_INVAL if the input parameters are invalid @retval ::AMDSMI_STATUS_UNEXPECTED_DATA if data read from the sysfs file is not in the expected

format or empty

Args:
processor_handle (Pointer/object) – IN:

a processor handle

Returns:

A tuple of size 2 that contains (in that order):

C signature

amdsmi_status_t amdsmi_get_vcn_busy_percent(amdsmi_processor_handle processor_handle, uint32_t * vcn_busy_percent)
rocm.bindings.amdsmi.amdsmi_get_utilization_count(processor_handle, utilization_counters, count, timestamp)#

Get coarse grain utilization counter of the specified device

@platform{gpu_bm_linux}

Given a processor handle processor_handle, the array of the utilization counters, the size of the array, this function returns the coarse grain utilization counters and timestamp. The counter is the accumulated percentages. Every milliseconds the firmware calculates % busy count and then accumulates that value in the counter. This provides minimally invasive coarse grain GPU usage information.

If the function returns AMDSMI_STATUS_SUCCESS, the counter will be set in the value field of the amdsmi_utilization_counter_t.

Args:
processor_handle (Pointer/object) – IN:

a processor handle

utilization_counters (amdsmi_utilization_counter_t/object) – IN,OUT:

Multiple utilization counters can be retrieved with a single call. The caller must allocate enough space to the utilization_counters array. The caller also needs to set valid AMDSMI_UTILIZATION_COUNTER_TYPE type for each element of the array. ::AMDSMI_STATUS_NOT_SUPPORTED if it is not supported with the provided arguments.

count (int) – IN:

The size of utilization_counters array.

timestamp (PointerToUInt64/object) – IN,OUT:

The timestamp when the counter is retrieved. Resolution: 1 ns.

Returns:

A tuple of size 1 that contains (in that order):

  • amdsmi_status_t: amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail

C signature

amdsmi_status_t amdsmi_get_utilization_count(amdsmi_processor_handle processor_handle, amdsmi_utilization_counter_t[] utilization_counters, uint32_t count, uint64_t * timestamp)
rocm.bindings.amdsmi.amdsmi_get_gpu_perf_level(processor_handle, perf)#

Get the performance level of the device. It is not supported on virtual machine guest

@platform{gpu_bm_linux}

This function will write the ::amdsmi_dev_perf_level_t to the uint32_t pointed to by perf, for a given processor handle processor_handle and a pointer to a uint32_t perf.

Args:
processor_handle (Pointer/object) – IN:

a processor handle

perf (Pointer/object) – IN,OUT:

a pointer to ::amdsmi_dev_perf_level_t to which the performance level will be written If this parameter is nullptr, this function will return ::AMDSMI_STATUS_INVAL if the function is supported with the provided, arguments and ::AMDSMI_STATUS_NOT_SUPPORTED if it is not supported with the provided arguments.

Returns:

A tuple of size 1 that contains (in that order):

  • amdsmi_status_t: amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail

C signature

amdsmi_status_t amdsmi_get_gpu_perf_level(amdsmi_processor_handle processor_handle, amdsmi_dev_perf_level_t * perf)
rocm.bindings.amdsmi.amdsmi_set_gpu_perf_determinism_mode(processor_handle, clkvalue)#

Enter performance determinism mode with provided processor handle. It is not supported on virtual machine guest

@platform{gpu_bm_linux}

Given a processor handle processor_handle and clkvalue this function will enable performance determinism mode, which enforces a GFXCLK frequency SoftMax limit per GPU set by the user. This prevents the GFXCLK PLL from stretching when running the same workload on different GPUS, making performance variation minimal. This call will result in the performance level ::amdsmi_dev_perf_level_t of the device being ::AMDSMI_DEV_PERF_LEVEL_DETERMINISM.

Args:
processor_handle (Pointer/object) – IN:

a processor handle

clkvalue (int) – IN:

Softmax value for GFXCLK in MHz.

Returns:

A tuple of size 1 that contains (in that order):

  • amdsmi_status_t: amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail

C signature

amdsmi_status_t amdsmi_set_gpu_perf_determinism_mode(amdsmi_processor_handle processor_handle, uint64_t clkvalue)
rocm.bindings.amdsmi.amdsmi_get_gpu_overdrive_level(processor_handle, od)#

Get the overdrive percent associated with the device with provided processor handle. It is not supported on virtual machine guest

@platform{gpu_bm_linux}

Given a processor handle processor_handle and a pointer to a uint32_t od, this function will write the overdrive percentage to the uint32_t pointed to by od

Args:
processor_handle (Pointer/object) – IN:

a processor handle

od (PointerToUnsigned/object) – IN,OUT:

a pointer to uint32_t to which the overdrive percentage will be written If this parameter is nullptr, this function will return ::AMDSMI_STATUS_INVAL if the function is supported with the provided, arguments and ::AMDSMI_STATUS_NOT_SUPPORTED if it is not supported with the provided arguments.

Returns:

A tuple of size 1 that contains (in that order):

  • amdsmi_status_t: amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail

C signature

amdsmi_status_t amdsmi_get_gpu_overdrive_level(amdsmi_processor_handle processor_handle, uint32_t * od)
rocm.bindings.amdsmi.amdsmi_get_gpu_mem_overdrive_level(processor_handle, od)#

Get the GPU memory clock overdrive percent associated with the device with provided processor handle. It is not supported on virtual machine guest

@platform{gpu_bm_linux}

Given a processor handle processor_handle and a pointer to a uint32_t od, this function will write the overdrive percentage to the uint32_t pointed to by od

Args:
processor_handle (Pointer/object) – IN:

a processor handle

od (PointerToUnsigned/object) – IN,OUT:

a pointer to uint32_t to which the GPU memory clock overdrive percentage will be written If this parameter is nullptr, this function will return ::AMDSMI_STATUS_INVAL if the function is supported with the provided, arguments and ::AMDSMI_STATUS_NOT_SUPPORTED if it is not supported with the provided arguments.

Returns:

A tuple of size 1 that contains (in that order):

  • amdsmi_status_t: amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail

C signature

amdsmi_status_t amdsmi_get_gpu_mem_overdrive_level(amdsmi_processor_handle processor_handle, uint32_t * od)
rocm.bindings.amdsmi.amdsmi_get_clk_freq(processor_handle, clk_type, f)#

Get the list of possible system clock speeds of device for a specified clock type. It is not supported on virtual machine guest

@platform{gpu_bm_linux}

Given a processor handle processor_handle, a clock type clk_type, and a pointer to a to an ::amdsmi_frequencies_t structure f, this function will fill in f with the possible clock speeds, and indication of the current clock speed selection.

Args:
processor_handle (Pointer/object) – IN:

a processor handle

clk_type (amdsmi_clk_type_t) – IN:

the type of clock for which the frequency is desired

f (amdsmi_frequencies_t/object) – IN,OUT:

a pointer to a caller provided ::amdsmi_frequencies_t structure to which the frequency information will be written. Frequency values are in Hz.

Returns:

A tuple of size 1 that contains (in that order):

  • amdsmi_status_t: amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail

C signature

amdsmi_status_t amdsmi_get_clk_freq(amdsmi_processor_handle processor_handle, amdsmi_clk_type_t clk_type, amdsmi_frequencies_t * f)
rocm.bindings.amdsmi.amdsmi_reset_gpu(processor_handle)#

Triggers a chain that resets all GPUs. It is not supported on virtual machine guest

@platform{gpu_bm_linux} @platform{host}

Note:

After this function returns, the caller must wait a few seconds before calling any other AMD SMI API functions to allow the GPU reset to complete. Calling other APIs too soon may result in AMDSMI_STATUS_BUSY or undefined behavior.

Given a processor handle processor_handle, this function will reset the GPU

Args:
processor_handle (Pointer/object) – IN:

a processor handle

Returns:

A tuple of size 1 that contains (in that order):

  • amdsmi_status_t: amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail

C signature

amdsmi_status_t amdsmi_reset_gpu(amdsmi_processor_handle processor_handle)
rocm.bindings.amdsmi.amdsmi_get_gpu_od_volt_info(processor_handle, odv)#

This function retrieves the overdrive GFX & MCLK information. If valid for the GPU it will also populate the voltage curve data. It is not supported on virtual machine guest

@platform{gpu_bm_linux}

Given a processor handle processor_handle and a pointer to a ::amdsmi_od_volt_freq_data_t structure odv, this function will populate odv. See ::amdsmi_od_volt_freq_data_t for more details.

Args:
processor_handle (Pointer/object) – IN:

a processor handle

odv (amdsmi_od_volt_freq_data_t/object) – IN,OUT:

a pointer to an ::amdsmi_od_volt_freq_data_t structure If this parameter is nullptr, this function will return ::AMDSMI_STATUS_INVAL if the function is supported with the provided, arguments and ::AMDSMI_STATUS_NOT_SUPPORTED if it is not supported with the provided arguments.

Returns:

A tuple of size 1 that contains (in that order):

  • amdsmi_status_t: amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail

C signature

amdsmi_status_t amdsmi_get_gpu_od_volt_info(amdsmi_processor_handle processor_handle, amdsmi_od_volt_freq_data_t * odv)
rocm.bindings.amdsmi.amdsmi_get_gpu_metrics_header_info(processor_handle, header_value)#

Get the ‘metrics_header_info’ from the GPU metrics associated with the device

@platform{gpu_bm_linux}

Given a processor handle processor_handle and a pointer to a amd_metrics_table_header_t in which the ‘metrics_header_info’ will stored

@retval ::AMDSMI_STATUS_SUCCESS is returned upon successful call. ::AMDSMI_STATUS_NOT_SUPPORTED is returned in case the metric unit

does not exist for the given device

Args:
processor_handle (Pointer/object) – IN:

Device which to query

header_value (amd_metrics_table_header_t/object) – INOUT:

a pointer to amd_metrics_table_header_t to which the device gpu metric unit will be stored

Returns:

A tuple of size 1 that contains (in that order):

C signature

amdsmi_status_t amdsmi_get_gpu_metrics_header_info(amdsmi_processor_handle processor_handle, amd_metrics_table_header_t * header_value)
rocm.bindings.amdsmi.amdsmi_get_gpu_metrics_info(processor_handle, pgpu_metrics)#

This function retrieves the gpu metrics information. It is not supported on virtual machine guest

@platform{gpu_bm_linux}

Given a processor handle processor_handle and a pointer to a ::amdsmi_gpu_metrics_t structure pgpu_metrics, this function will populate pgpu_metrics. See ::amdsmi_gpu_metrics_t for more details.

APU Metrics: When APU-specific metrics are available (APU metrics table v2.4 or v3.0), pgpu_metrics->apu_metrics will point to thread-local library-owned storage. This pointer is invalidated by ANY subsequent call to ::amdsmi_get_gpu_metrics_info or ::amdsmi_get_gpu_partition_metrics_info on the same thread, even for different devices. Callers must copy the entire ::amdsmi_apu_metrics_t structure immediately after the call to preserve the data. For non-APU devices, pgpu_metrics->apu_metrics will be nullptr.

Args:
processor_handle (Pointer/object) – IN:

a processor handle

pgpu_metrics (amdsmi_gpu_metrics_t/object) – IN,OUT:

a pointer to an ::amdsmi_gpu_metrics_t structure If this parameter is nullptr, this function will return ::AMDSMI_STATUS_INVAL if the function is supported with the provided, arguments and ::AMDSMI_STATUS_NOT_SUPPORTED if it is not supported with the provided arguments.

Returns:

A tuple of size 1 that contains (in that order):

  • amdsmi_status_t: amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail

C signature

amdsmi_status_t amdsmi_get_gpu_metrics_info(amdsmi_processor_handle processor_handle, amdsmi_gpu_metrics_t * pgpu_metrics)
rocm.bindings.amdsmi.amdsmi_get_gpu_partition_metrics_info(processor_handle, pgpu_metrics)#

This function retrieves the partition metrics information.

@platform{gpu_bm_linux} @platform{guest_1vf}

Given a processor handle processor_handle and a pointer to a ::amdsmi_gpu_metrics_t structure pgpu_metrics, this function will populate pgpu_metrics. See ::amdsmi_gpu_metrics_t for more details.

APU Metrics: When APU-specific metrics are available (APU metrics table v2.4 or v3.0), pgpu_metrics->apu_metrics will point to thread-local library-owned storage. This pointer is invalidated by ANY subsequent call to ::amdsmi_get_gpu_metrics_info or ::amdsmi_get_gpu_partition_metrics_info on the same thread, even for different devices. Callers must copy the entire ::amdsmi_apu_metrics_t structure immediately after the call to preserve the data. For non-APU devices, pgpu_metrics->apu_metrics will be nullptr.

Args:
processor_handle (Pointer/object) – IN:

a processor handle

pgpu_metrics (amdsmi_gpu_metrics_t/object) – IN,OUT:

a pointer to an ::amdsmi_gpu_metrics_t structure If this parameter is nullptr, this function will return ::AMDSMI_STATUS_INVAL if the function is supported with the provided, arguments and ::AMDSMI_STATUS_NOT_SUPPORTED if it is not supported with the provided arguments.

Returns:

A tuple of size 1 that contains (in that order):

  • amdsmi_status_t: amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail

C signature

amdsmi_status_t amdsmi_get_gpu_partition_metrics_info(amdsmi_processor_handle processor_handle, amdsmi_gpu_metrics_t * pgpu_metrics)
rocm.bindings.amdsmi.amdsmi_get_gpu_pm_metrics_info(processor_handle, pm_metrics, num_of_metrics)#

Get the pm metrics table with provided device index.

@platform{gpu_bm_linux}

Given a device handle processor_handle, pm_metrics pointer, and num_of_metrics pointer, this function will write the pm metrics name value pair to the array at pm_metrics and the number of metrics retrieved to num_of_metrics Note: the library allocated memory for pm_metrics, and user must call free(pm_metrics) to free it after use.

@retval ::AMDSMI_STATUS_SUCCESS call was successful @retval ::AMDSMI_STATUS_NOT_SUPPORTED installed software or hardware does not support this function with the given arguments @retval ::AMDSMI_STATUS_INVAL the provided arguments are not valid

Args:
processor_handle (Pointer/object) – IN:

a processor handle

pm_metrics (Pointer/object) – INOUT:

A pointerto an array to hold multiple PM metrics. On success, the library will allocate memory of pm_metrics and write metrics to this array. The caller must free this memory after usage to avoid memory leak.

num_of_metrics (PointerToUnsigned/object) – INOUT:

a pointer to uint32_t to which the number of metrics is allocated for pm_metrics array as input, and the number of metrics retrieved as output. If this parameter is NULL, this function will return ::AMDSMI_STATUS_INVAL if the function is supported with the provided, arguments and ::AMDSMI_STATUS_NOT_SUPPORTED if it is not supported with the provided arguments.

Returns:

A tuple of size 1 that contains (in that order):

C signature

amdsmi_status_t amdsmi_get_gpu_pm_metrics_info(amdsmi_processor_handle processor_handle, amdsmi_name_value_t ** pm_metrics, uint32_t * num_of_metrics)
rocm.bindings.amdsmi.amdsmi_get_gpu_reg_table_info(processor_handle, reg_type, reg_metrics, num_of_metrics)#

Get the register metrics table with provided device index and register type.

@platform{gpu_bm_linux}

Given a device handle processor_handle, reg_type, reg_metrics pointer, and num_of_metrics pointer, this function will write the register metrics name value pair to the array at reg_metrics and the number of metrics retrieved to num_of_metrics Note: the library allocated memory for reg_metrics, and user must call free(reg_metrics) to free it after use.

@retval ::AMDSMI_STATUS_SUCCESS call was successful @retval ::AMDSMI_STATUS_NOT_SUPPORTED installed software or hardware does not support this function with the given arguments @retval ::AMDSMI_STATUS_INVAL the provided arguments are not valid

Args:
processor_handle (Pointer/object) – IN:

a processor handle

reg_type (amdsmi_reg_type_t) – IN:

The register type

reg_metrics (Pointer/object) – INOUT:

A pointerto an array to hold multiple register metrics. On success, the library will allocate memory of reg_metrics and write metrics to this array. The caller must free this memory after usage to avoid memory leak.

num_of_metrics (PointerToUnsigned/object) – INOUT:

a pointer to uint32_t to which the number of metrics is allocated for reg_metrics array as input, and the number of metrics retrieved as output. If this parameter is NULL, this function will return ::AMDSMI_STATUS_INVAL if the function is supported with the provided, arguments and ::AMDSMI_STATUS_NOT_SUPPORTED if it is not supported with the provided arguments.

Returns:

A tuple of size 1 that contains (in that order):

C signature

amdsmi_status_t amdsmi_get_gpu_reg_table_info(amdsmi_processor_handle processor_handle, amdsmi_reg_type_t reg_type, amdsmi_name_value_t ** reg_metrics, uint32_t * num_of_metrics)
rocm.bindings.amdsmi.amdsmi_set_gpu_clk_limit(processor_handle, clk_type, limit_type, clk_value)#

This function sets the clock sets the clock min/max level

@platform{gpu_bm_linux}

Given a processor handle processor_handle, a clock type clk_type, a value clk_value needs to be set, and the level indicates min or max clock you want to set, this function the clock limit.

Args:
processor_handle (Pointer/object) – IN:

a processor handle

clk_type (amdsmi_clk_type_t) – IN:

AMDSMI_CLK_TYPE_SYS, AMDSMI_CLK_TYPE_MEM and so on

limit_type (amdsmi_clk_limit_type_t) – IN:

AMDSMI_FREQ_IND_MIN|AMDSMI_FREQ_IND_MAX to set the minimum (0) or maximum (1) speed.

clk_value (int) – IN:

value to apply to. Frequency values are in MHz.

Returns:

A tuple of size 1 that contains (in that order):

  • amdsmi_status_t: amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail

C signature

amdsmi_status_t amdsmi_set_gpu_clk_limit(amdsmi_processor_handle processor_handle, amdsmi_clk_type_t clk_type, amdsmi_clk_limit_type_t limit_type, uint64_t clk_value)
rocm.bindings.amdsmi.amdsmi_set_gpu_od_clk_info(processor_handle, level, clkvalue, clkType)#

This function sets the clock frequency information. It is not supported on virtual machine guest

@platform{gpu_bm_linux}

Given a processor handle processor_handle, a frequency level level, a clock value clkvalue and a clock type clkType this function will set the sclk|mclk range

Args:
processor_handle (Pointer/object) – IN:

a processor handle

level (amdsmi_freq_ind_t) – IN:

AMDSMI_FREQ_IND_MIN|AMDSMI_FREQ_IND_MAX to set the minimum (0) or maximum (1) speed.

clkvalue (int) – IN:

value to apply to the clock range. Frequency values are in MHz.

clkType (amdsmi_clk_type_t) – IN:

AMDSMI_CLK_TYPE_SYS | AMDSMI_CLK_TYPE_MEM range type

Returns:

A tuple of size 1 that contains (in that order):

  • amdsmi_status_t: amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail

C signature

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)
rocm.bindings.amdsmi.amdsmi_set_gpu_od_volt_info(processor_handle, vpoint, clkvalue, voltvalue)#

This function sets 1 of the 3 voltage curve points. It is not supported on virtual machine guest

@platform{gpu_bm_linux}

Given a processor handle processor_handle, a voltage point vpoint and a voltage value voltvalue this function will set voltage curve point

Args:
processor_handle (Pointer/object) – IN:

a processor handle

vpoint (int) – IN:

voltage point [0|1|2] on the voltage curve

clkvalue (int) – IN:

clock value component of voltage curve point. Frequency values are in MHz.

voltvalue (int) – IN:

voltage value component of voltage curve point. Voltage is in mV.

Returns:

A tuple of size 1 that contains (in that order):

  • amdsmi_status_t: amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail

C signature

amdsmi_status_t amdsmi_set_gpu_od_volt_info(amdsmi_processor_handle processor_handle, uint32_t vpoint, uint64_t clkvalue, uint64_t voltvalue)
rocm.bindings.amdsmi.amdsmi_get_gpu_od_volt_curve_regions(processor_handle, num_regions, buffer)#

This function will retrieve the current valid regions in the frequency/voltage space. It is not supported on virtual machine guest

@platform{gpu_bm_linux}

Given a processor handle processor_handle, a pointer to an unsigned integer num_regions and a buffer of ::amdsmi_freq_volt_region_t structures, buffer, this function will populate buffer with the current frequency-volt space regions. The caller should assign buffer to memory that can be written to by this function. The caller should also indicate the number of ::amdsmi_freq_volt_region_t structures that can safely be written to buffer in num_regions.

The number of regions to expect this function provide (num_regions) can be obtained by calling :: amdsmi_get_gpu_od_volt_info().

Args:
processor_handle (Pointer/object) – IN:

a processor handle

num_regions (PointerToUnsigned/object) – IN,OUT:

As input, this is the number of ::amdsmi_freq_volt_region_t structures that can be written to buffer. As output, this is the number of ::amdsmi_freq_volt_region_t structures that were actually written. If this parameter is nullptr, this function will return ::AMDSMI_STATUS_INVAL if the function is supported with the provided, arguments and ::AMDSMI_STATUS_NOT_SUPPORTED if it is not supported with the provided arguments.

buffer (amdsmi_freq_volt_region_t/object) – IN,OUT:

a caller provided buffer to which ::amdsmi_freq_volt_region_t structures will be written If this parameter is nullptr, this function will return ::AMDSMI_STATUS_INVAL if the function is supported with the provided, arguments and ::AMDSMI_STATUS_NOT_SUPPORTED if it is not supported with the provided arguments.

Returns:

A tuple of size 1 that contains (in that order):

  • amdsmi_status_t: amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail

C signature

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)
rocm.bindings.amdsmi.amdsmi_get_gpu_power_profile_presets(processor_handle, sensor_ind, status)#

Get the list of available preset power profiles and an indication of which profile is currently active. It is not supported on virtual machine guest

@platform{gpu_bm_linux}

Given a processor handle processor_handle and a pointer to a ::amdsmi_power_profile_status_t status, this function will set the bits of the ::amdsmi_power_profile_status_t.available_profiles bit field of status to 1 if the profile corresponding to the respective ::amdsmi_power_profile_preset_masks_t profiles are enabled. For example, if both the VIDEO and VR power profiles are available selections, then ::AMDSMI_PWR_PROF_PRST_VIDEO_MASK AND’ed with ::amdsmi_power_profile_status_t.available_profiles will be non-zero as will ::AMDSMI_PWR_PROF_PRST_VR_MASK AND’ed with ::amdsmi_power_profile_status_t.available_profiles. Additionally, ::amdsmi_power_profile_status_t.current will be set to the ::amdsmi_power_profile_preset_masks_t of the profile that is currently active.

Args:
processor_handle (Pointer/object) – IN:

a processor handle

sensor_ind (int) – IN:

a 0-based sensor index. Normally, this will be 0. If a device has more than one sensor, it could be greater than 0.

status (amdsmi_power_profile_status_t/object) – IN,OUT:

a pointer to ::amdsmi_power_profile_status_t that will be populated by a call to this function If this parameter is nullptr, this function will return ::AMDSMI_STATUS_INVAL if the function is supported with the provided, arguments and ::AMDSMI_STATUS_NOT_SUPPORTED if it is not supported with the provided arguments.

Returns:

A tuple of size 1 that contains (in that order):

  • amdsmi_status_t: amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail

C signature

amdsmi_status_t amdsmi_get_gpu_power_profile_presets(amdsmi_processor_handle processor_handle, uint32_t sensor_ind, amdsmi_power_profile_status_t * status)
rocm.bindings.amdsmi.amdsmi_set_gpu_perf_level(processor_handle, perf_lvl)#

Set the PowerPlay performance level associated with the device with provided processor handle with the provided value. It is not supported on virtual machine guest

@platform{gpu_bm_linux}

Given a processor handle processor_handle and an ::amdsmi_dev_perf_level_t perf_level, this function will set the PowerPlay performance level for the device to the value perf_lvl.

Note:

This function requires admin/sudo privileges

Args:
processor_handle (Pointer/object) – IN:

a processor handle

perf_lvl (amdsmi_dev_perf_level_t) – IN:

the value to which the performance level should be set

Returns:

A tuple of size 1 that contains (in that order):

  • amdsmi_status_t: amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail

C signature

amdsmi_status_t amdsmi_set_gpu_perf_level(amdsmi_processor_handle processor_handle, amdsmi_dev_perf_level_t perf_lvl)
rocm.bindings.amdsmi.amdsmi_set_gpu_overdrive_level(processor_handle, od)#

Set the overdrive percent associated with the device with provided processor handle with the provided value. See details for WARNING. It is not supported on virtual machine guest

@platform{gpu_bm_linux}

Given a processor handle processor_handle and an overdrive level od, this function will set the overdrive level for the device to the value od. The overdrive level is an integer value between 0 and 20, inclusive, which represents the overdrive percentage; e.g., a value of 5 specifies an overclocking of 5%.

The overdrive level is specific to the gpu system clock.

The overdrive level is the percentage above the maximum Performance Level to which overclocking will be limited. The overclocking percentage does not apply to clock speeds other than the maximum. This percentage is limited to 20%.

****WARNING****

Operating your AMD GPU outside of official AMD specifications or outside of factory settings, including but not limited to the conducting of overclocking (including use of this overclocking software, even if such software has been directly or indirectly provided by AMD or otherwise affiliated in any way with AMD), may cause damage to your AMD GPU, system components and/or result in system failure, as well as cause other problems. DAMAGES CAUSED BY USE OF YOUR AMD GPU OUTSIDE OF OFFICIAL AMD SPECIFICATIONS OR OUTSIDE OF FACTORY SETTINGS ARE NOT COVERED UNDER ANY AMD PRODUCT WARRANTY AND MAY NOT BE COVERED BY YOUR BOARD OR SYSTEM MANUFACTURER’S WARRANTY. Please use this utility with caution.

Args:
processor_handle (Pointer/object) – IN:

a processor handle

od (int) – IN:

the value to which the overdrive level should be set

Returns:

A tuple of size 1 that contains (in that order):

  • amdsmi_status_t: amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail

C signature

amdsmi_status_t amdsmi_set_gpu_overdrive_level(amdsmi_processor_handle processor_handle, uint32_t od)
rocm.bindings.amdsmi.amdsmi_set_clk_freq(processor_handle, clk_type, freq_bitmask)#

Control the set of allowed frequencies that can be used for the specified clock. It is not supported on virtual machine guest

@platform{gpu_bm_linux}

Given a processor handle processor_handle, a clock type clk_type, and a 64 bit bitmask freq_bitmask, this function will limit the set of allowable frequencies. If a bit in freq_bitmask has a value of 1, then the frequency (as ordered in an ::amdsmi_frequencies_t returned by amdsmi_get_clk_freq()) corresponding to that bit index will be allowed.

This function will change the performance level to ::AMDSMI_DEV_PERF_LEVEL_MANUAL in order to modify the set of allowable frequencies. Caller will need to set to ::AMDSMI_DEV_PERF_LEVEL_AUTO in order to get back to default state.

All bits with indices greater than or equal to ::amdsmi_frequencies_t::num_supported will be ignored.

Note:

This function requires admin/sudo privileges

Args:
processor_handle (Pointer/object) – IN:

a processor handle

clk_type (amdsmi_clk_type_t) – IN:

the type of clock for which the set of frequencies will be modified

freq_bitmask (int) – IN:

A bitmask indicating the indices of the frequencies that are to be enabled (1) and disabled (0). Only the lowest ::amdsmi_frequencies_t.num_supported bits of this mask are relevant.

Returns:

A tuple of size 1 that contains (in that order):

  • amdsmi_status_t: amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail

C signature

amdsmi_status_t amdsmi_set_clk_freq(amdsmi_processor_handle processor_handle, amdsmi_clk_type_t clk_type, uint64_t freq_bitmask)
rocm.bindings.amdsmi.amdsmi_get_soc_pstate(processor_handle, policy)#

Get the soc pstate policy for the processor

@platform{gpu_bm_linux} @platform{guest_1vf} @platform{host}

Given a processor handle processor_handle, this function will write current soc pstate policy settings to policy. All the processors at the same socket will have the same policy.

Args:
processor_handle (Pointer/object) – IN:

a processor handle

policy (amdsmi_dpm_policy_t/object) – IN,OUT:

the soc pstate policy for this processor. If this parameter is nullptr, this function will return ::AMDSMI_STATUS_INVAL

Returns:

A tuple of size 1 that contains (in that order):

  • amdsmi_status_t: amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail

C signature

amdsmi_status_t amdsmi_get_soc_pstate(amdsmi_processor_handle processor_handle, amdsmi_dpm_policy_t * policy)
rocm.bindings.amdsmi.amdsmi_set_soc_pstate(processor_handle, policy_id)#

Set the soc pstate policy for the processor

@platform{gpu_bm_linux} @platform{guest_1vf} @platform{host}

Given a processor handle processor_handle and a soc pstate policy policy_id, this function will set the soc pstate policy for this processor. All the processors at the same socket will be set to the same policy.

Note:

This function requires admin/sudo privileges on @platform{gpu_bm_linux}

Args:
processor_handle (Pointer/object) – IN:

a processor handle

policy_id (int) – IN:

the soc pstate policy id to set. The id is the id in amdsmi_dpm_policy_entry_t, which can be obtained by calling amdsmi_get_soc_pstate()

Returns:

A tuple of size 1 that contains (in that order):

  • amdsmi_status_t: amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail

C signature

amdsmi_status_t amdsmi_set_soc_pstate(amdsmi_processor_handle processor_handle, uint32_t policy_id)
rocm.bindings.amdsmi.amdsmi_get_xgmi_plpd(processor_handle, xgmi_plpd)#

Get the xgmi per-link power down policy parameter for the processor

@platform{gpu_bm_linux} @platform{guest_1vf} @platform{host}

Given a processor handle processor_handle, this function will write current xgmi plpd settings to policy. All the processors at the same socket will have the same policy.

Args:
processor_handle (Pointer/object) – IN:

a processor handle

xgmi_plpd (amdsmi_dpm_policy_t/object) – IN,OUT:

the xgmi plpd for this processor. If this parameter is nullptr, this function will return ::AMDSMI_STATUS_INVAL

Returns:

A tuple of size 1 that contains (in that order):

  • amdsmi_status_t: amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail

C signature

amdsmi_status_t amdsmi_get_xgmi_plpd(amdsmi_processor_handle processor_handle, amdsmi_dpm_policy_t * xgmi_plpd)
rocm.bindings.amdsmi.amdsmi_set_xgmi_plpd(processor_handle, policy_id)#

Set the xgmi per-link power down policy parameter for the processor

@platform{gpu_bm_linux} @platform{guest_1vf} @platform{host}

Given a processor handle processor_handle and a dpm policy policy_id, this function will set the xgmi plpd for this processor. All the processors at the same socket will be set to the same policy.

Note:

This function requires admin/sudo privileges

Args:
processor_handle (Pointer/object) – IN:

a processor handle

policy_id (int) – IN:

the xgmi plpd id to set. The id is the id in amdsmi_dpm_policy_entry_t, which can be obtained by calling amdsmi_get_xgmi_plpd()

Returns:

A tuple of size 1 that contains (in that order):

  • amdsmi_status_t: amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail

C signature

amdsmi_status_t amdsmi_set_xgmi_plpd(amdsmi_processor_handle processor_handle, uint32_t policy_id)
rocm.bindings.amdsmi.amdsmi_get_gpu_process_isolation(processor_handle, pisolate)#

Get the status of the Process Isolation

@platform{gpu_bm_linux} @platform{guest_1vf} @platform{guest_windows}

Given a processor handle processor_handle, this function will write current process isolation status to pisolate. The 0 is the process isolation disabled, and the 1 is the process isolation enabled.

Args:
processor_handle (Pointer/object) – IN:

a processor handle

pisolate (PointerToUnsigned/object) – IN,OUT:

the process isolation status. If this parameter is nullptr, this function will return ::AMDSMI_STATUS_INVAL

Returns:

A tuple of size 1 that contains (in that order):

  • amdsmi_status_t: amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail

C signature

amdsmi_status_t amdsmi_get_gpu_process_isolation(amdsmi_processor_handle processor_handle, uint32_t * pisolate)
rocm.bindings.amdsmi.amdsmi_set_gpu_process_isolation(processor_handle, pisolate)#

Enable/disable the system Process Isolation

@platform{gpu_bm_linux} @platform{guest_1vf} @platform{guest_windows}

Given a processor handle processor_handle and a process isolation pisolate, flag, this function will set the Process Isolation for this processor. The 0 is the process isolation disabled, and the 1 is the process isolation enabled.

Note:

This function requires admin/sudo privileges

Args:
processor_handle (Pointer/object) – IN:

a processor handle

pisolate (int) – IN:

the process isolation status to set.

Returns:

A tuple of size 1 that contains (in that order):

  • amdsmi_status_t: amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail

C signature

amdsmi_status_t amdsmi_set_gpu_process_isolation(amdsmi_processor_handle processor_handle, uint32_t pisolate)
rocm.bindings.amdsmi.amdsmi_clean_gpu_local_data(processor_handle)#

Run the cleaner shader to clean up data in LDS/GPRs

@platform{gpu_bm_linux} @platform{guest_1vf} @platform{guest_windows}

Given a processor handle processor_handle, this function will clean the local data of this processor. This can be called between user logins to prevent information leak.

Note:

This function requires admin/sudo privileges

Args:
processor_handle (Pointer/object) – IN:

a processor handle

Returns:

A tuple of size 1 that contains (in that order):

  • amdsmi_status_t: amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail

C signature

amdsmi_status_t amdsmi_clean_gpu_local_data(amdsmi_processor_handle processor_handle)
class rocm.bindings.amdsmi.amdsmi_fabric_telemetry_category_t#

Bases: enum.IntEnum

Fabric telemetry categories

AMDSMI_FABRIC_TELEMETRY_CATEGORY_UALOE: int#
AMDSMI_FABRIC_TELEMETRY_CATEGORY_SWITCH: int#
AMDSMI_FABRIC_TELEMETRY_CATEGORY_CRYPTO: int#
AMDSMI_FABRIC_TELEMETRY_CATEGORY_PFC: int#
AMDSMI_FABRIC_TELEMETRY_CATEGORY_NETPORT: int#
AMDSMI_FABRIC_TELEMETRY_CATEGORY_DERIVED_UALOE: int#
AMDSMI_FABRIC_TELEMETRY_CATEGORY_DERIVED_NETPORT: int#
AMDSMI_FABRIC_TELEMETRY_CATEGORY_MAX: int#
AMDSMI_FABRIC_TELEMETRY_CATEGORY_INVALID: int#
AMDSMI_FABRIC_TELEMETRY_CATEGORY_UNKNOWN: int#
class rocm.bindings.amdsmi.amdsmi_fabric_telemetry_category_mask_t#

Bases: enum.IntEnum

Fabric telemetry category bitmask values

AMDSMI_FABRIC_TELEMETRY_CATEGORY_MASK_UALOE: int#
AMDSMI_FABRIC_TELEMETRY_CATEGORY_MASK_SWITCH: int#
AMDSMI_FABRIC_TELEMETRY_CATEGORY_MASK_CRYPTO: int#
AMDSMI_FABRIC_TELEMETRY_CATEGORY_MASK_PFC: int#
AMDSMI_FABRIC_TELEMETRY_CATEGORY_MASK_NETPORT: int#
AMDSMI_FABRIC_TELEMETRY_CATEGORY_MASK_DERIVED_UALOE: int#
AMDSMI_FABRIC_TELEMETRY_CATEGORY_MASK_DERIVED_NETPORT: int#
AMDSMI_FABRIC_TELEMETRY_CATEGORY_MASK_ALL_KNOWN: int#
class rocm.bindings.amdsmi.amdsmi_fabric_telemetry_item_t(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

Fabric telemetry item structure

id: Any#
value: Any#
static PROPERTIES() → list[str]#
static fromObj(pyobj) → Any#
static allocate(count: int = 1) → Any#
c_sizeof() → int#
as_c_void_p() → Any#
class rocm.bindings.amdsmi.amdsmi_fabric_label_t(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

(No short description)

text: Any#
static PROPERTIES() → list[str]#
static fromObj(pyobj) → Any#
static allocate(count: int = 1) → Any#
c_sizeof() → int#
as_c_void_p() → Any#
class rocm.bindings.amdsmi.amdsmi_fabric_telemetry_instance_t(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

Fabric telemetry instance structure

Collection of telemetry data items for an instance of a category of telemetry

name: Any#
logical_idx: Any#
item_count: Any#
items: Any#
static PROPERTIES() → list[str]#
static fromObj(pyobj) → Any#
static allocate(count: int = 1) → Any#
c_sizeof() → int#
as_c_void_p() → Any#
class rocm.bindings.amdsmi.amdsmi_fabric_telemetry_dataset_t(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

Fabric telemetry dataset structure

Contains all telemetry for one category

category: Any#
generation_count: Any#
timestamp: Any#
instance_count: Any#
instances: Any#
static PROPERTIES() → list[str]#
static fromObj(pyobj) → Any#
static allocate(count: int = 1) → Any#
c_sizeof() → int#
as_c_void_p() → Any#
class rocm.bindings.amdsmi.amdsmi_fabric_telemetry_t(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

Fabric telemetry structure

Top level structure defining telemetry data for Fabric. Contains datasets for each category of telemetry. A null pointer means no telemetry is available for that category.

rocm.bindings.amdsmi.amdsmi_alloc_fabric_telemetry(processor_handle, category_mask)#

Allocate storage for Fabric telemetry data

@platform{gpu_bm_linux} @platform{host}

This function allocates storage for Fabric telemetry data for the specified categories. The allocated storage can be reused for multiple telemetry retrievals.

Args:
processor_handle (Pointer/object) – IN:
  • Handle for the target processor

category_mask (int) – IN:
  • Bitmask of telemetry categories to allocate,

constructed using AMDSMI_FABRIC_TELEMETRY_CATEGORY_MASK(cat)

Returns:

A tuple of size 2 that contains (in that order):

C signature

amdsmi_status_t amdsmi_alloc_fabric_telemetry(amdsmi_processor_handle processor_handle, uint32_t category_mask, amdsmi_fabric_telemetry_t ** telemetry)
rocm.bindings.amdsmi.amdsmi_get_fabric_telemetry_data(processor_handle, telemetry)#

Get Fabric telemetry data

@platform{gpu_bm_linux} @platform{host}

This function retrieves the latest Fabric telemetry data snapshot into pre-allocated storage.

Args:
processor_handle (Pointer/object) – IN:
  • Handle for the target processor

telemetry (amdsmi_fabric_telemetry_t/object) – IN,OUT:
  • Pre-allocated telemetry structure to populate

Returns:

A tuple of size 1 that contains (in that order):

  • amdsmi_status_t: amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail

C signature

amdsmi_status_t amdsmi_get_fabric_telemetry_data(amdsmi_processor_handle processor_handle, amdsmi_fabric_telemetry_t * telemetry)
rocm.bindings.amdsmi.amdsmi_fabric_telem_id_to_string(telem_id, telem_name)#

Get string name for a telemetry item ID

@platform{gpu_bm_linux}

Given a telemetry item ID telem_id, this function returns a pointer to a string containing the human-readable name for the specified telemetry item. The returned string is statically allocated and should not be freed by the caller.

Args:
telem_id (int) – IN:

The telemetry item ID for which the name is requested

telem_name (CStr/object) – OUT:

The telemetry item name

Returns:

A tuple of size 1 that contains (in that order):

  • amdsmi_status_t: amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail

C signature

amdsmi_status_t amdsmi_fabric_telem_id_to_string(uint64_t telem_id, const char ** telem_name)
rocm.bindings.amdsmi.amdsmi_free_fabric_telemetry(processor_handle, telemetry)#

Free Fabric telemetry storage

@platform{gpu_bm_linux} @platform{host}

This function frees the storage allocated for Fabric telemetry data.

Args:
processor_handle (Pointer/object) – IN:
  • Handle for the target processor

telemetry (amdsmi_fabric_telemetry_t/object) – IN:
  • Telemetry structure to free

Returns:

A tuple of size 1 that contains (in that order):

  • amdsmi_status_t: amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail

C signature

amdsmi_status_t amdsmi_free_fabric_telemetry(amdsmi_processor_handle processor_handle, amdsmi_fabric_telemetry_t * telemetry)
class rocm.bindings.amdsmi.amdsmi_fabric_size_constants_t#

Bases: enum.IntEnum

Fabric size constants

AMDSMI_FABRIC_ACTIVE_ACCELERATORS_BITMAP_SIZE: int#
AMDSMI_FABRIC_MAX_LOCAL_GPUS: int#
class rocm.bindings.amdsmi.amdsmi_fabric_type_t#

Bases: enum.IntEnum

Fabric type

AMDSMI_FABRIC_TYPE_UALOE: int#
AMDSMI_FABRIC_TYPE_UNKNOWN: int#
class rocm.bindings.amdsmi.amdsmi_fabric_npa_address_mode_t#

Bases: enum.IntEnum

Fabric NPA address mode

AMDSMI_FABRIC_NPA_ADDRESS_MODE_SOURCE_ALIASING: int#
AMDSMI_FABRIC_NPA_ADDRESS_MODE_SOURCE_IDENTIFICATION: int#
AMDSMI_FABRIC_NPA_ADDRESS_MODE_UNKNOWN: int#
class rocm.bindings.amdsmi.amdsmi_fabric_accelerator_vpod_state_t#

Bases: enum.IntEnum

Fabric accelerator vPoD state

AMDSMI_FABRIC_ACCELERATOR_VPOD_STATE_UNCONFIGURED: int#
AMDSMI_FABRIC_ACCELERATOR_VPOD_STATE_CONFIGURED: int#
AMDSMI_FABRIC_ACCELERATOR_VPOD_STATE_READY: int#
AMDSMI_FABRIC_ACCELERATOR_VPOD_STATE_ACTIVE: int#
AMDSMI_FABRIC_ACCELERATOR_VPOD_STATE_ERROR: int#
AMDSMI_FABRIC_ACCELERATOR_VPOD_STATE_UNKNOWN: int#
class rocm.bindings.amdsmi.amdsmi_fabric_info_v1_t(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

Fabric device configuration information (version 1)

accelerator_id: Any#
fabric_type: Any#
bandwidth: Any#
latency: Any#
ppod_id: Any#
ppod_size: Any#
vpod_id: Any#
vpod_size: Any#
vpod_active_accelerators: Any#
local_accelerators: Any#
addr_mode: Any#
accel_state: Any#
static PROPERTIES() → list[str]#
static fromObj(pyobj) → Any#
static allocate(count: int = 1) → Any#
c_sizeof() → int#
as_c_void_p() → Any#
class rocm.bindings.amdsmi.amdsmi_fabric_info_t_fabric_info_(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

(No short description)

v1: Any#
static PROPERTIES() → list[str]#
static fromObj(pyobj) → Any#
static allocate(count: int = 1) → Any#
c_sizeof() → int#
as_c_void_p() → Any#
class rocm.bindings.amdsmi.amdsmi_fabric_info_t(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

Fabric device information structure

bdf: Any#
fabric_version: Any#
fabric_info: Any#
reserved: Any#
static PROPERTIES() → list[str]#
static fromObj(pyobj) → Any#
static allocate(count: int = 1) → Any#
c_sizeof() → int#
as_c_void_p() → Any#
rocm.bindings.amdsmi.amdsmi_get_gpu_fabric_info(processor_handle)#

Get Fabric device information

@platform{gpu_bm_linux} @platform{host}

Reads optional UALoE fabric attributes from sysfs (one file per field). Missing or unreadable files are skipped so the call can return partial data:

  • any field that was not updated from sysfs keeps its sentinel value (ie: numeric fields at their maximum representable value, and unknown enumeration values where documented for ::amdsmi_fabric_info_v1_t).

  • The device BDF in info is always filled when the call completes successfully or returns ::AMDSMI_STATUS_NO_DATA.

Note:

This path reads sysfs only. It does not require UALoE netlink (::ualoe_open) to succeed; that handle is still needed for fabric telemetry APIs.

Args:
processor_handle (Pointer/object) – IN:
  • Handle for the target processor

Returns:

A tuple of size 2 that contains (in that order):

  • amdsmi_status_t: amdsmi_status_t
    • ::AMDSMI_STATUS_SUCCESS if at least one sysfs file yielded usable content.

    • ::AMDSMI_STATUS_NO_DATA if no sysfs file yielded usable lines (output still contains BDF and default/sentinel fabric fields).

    • Other codes (e.g. invalid processor handle) on failure.

  • amdsmi_fabric_info_t:
    • Pointer to Fabric information structure to be populated.

    Must be allocated by the caller. Written on every return except errors such as ::AMDSMI_STATUS_INVAL.

C signature

amdsmi_status_t amdsmi_get_gpu_fabric_info(amdsmi_processor_handle processor_handle, amdsmi_fabric_info_t * info)
rocm.bindings.amdsmi.amdsmi_get_lib_version()#

Get the build version information for the currently running build of AMDSMI

@platform{gpu_bm_linux} @platform{cpu_bm} @platform{guest_1vf} @platform{guest_mvf} @platform{guest_windows}

Get the major, minor, patch and build string for AMDSMI build currently in use through version

Returns:

A tuple of size 2 that contains (in that order):

  • amdsmi_status_t: amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail

  • amdsmi_version_t:

    A pointer to an ::amdsmi_version_t structure that will be updated with the version information upon return.

C signature

amdsmi_status_t amdsmi_get_lib_version(amdsmi_version_t * version)
rocm.bindings.amdsmi.amdsmi_get_gpu_ecc_count(processor_handle, block, ec)#

Retrieve the error counts for a GPU block. It is not supported on virtual machine guest

See [RAS Error Count sysfs Interface (AMDGPU RAS Support - Linux Kernel documentation)](https://docs.kernel.org/gpu/amdgpu/ras.html:py:obj:ras-error-count-sysfs-interface) to learn how these error counts are accessed.

@platform{gpu_bm_linux} @platform{host}

Given a processor handle processor_handle, an ::amdsmi_gpu_block_t block and a pointer to an ::amdsmi_error_count_t ec, this function will write the error count values for the GPU block indicated by block to memory pointed to by ec.

Args:
processor_handle (Pointer/object) – IN:

a processor handle

block (amdsmi_gpu_block_t) – IN:

The block for which error counts should be retrieved

ec (amdsmi_error_count_t/object) – IN,OUT:

A pointer to an ::amdsmi_error_count_t to which the error counts should be written If this parameter is nullptr, this function will return ::AMDSMI_STATUS_INVAL if the function is supported with the provided arguments and ::AMDSMI_STATUS_NOT_SUPPORTED if it is not supported with the provided arguments.

Returns:

A tuple of size 1 that contains (in that order):

  • amdsmi_status_t: amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail

C signature

amdsmi_status_t amdsmi_get_gpu_ecc_count(amdsmi_processor_handle processor_handle, amdsmi_gpu_block_t block, amdsmi_error_count_t * ec)
rocm.bindings.amdsmi.amdsmi_get_gpu_ecc_enabled(processor_handle, enabled_blocks)#

Retrieve the enabled ECC bit-mask. It is not supported on virtual machine guest

See [RAS Error Count sysfs Interface (AMDGPU RAS Support - Linux Kernel documentation)](https://docs.kernel.org/gpu/amdgpu/ras.html:py:obj:ras-error-count-sysfs-interface) to learn how these error counts are accessed.

@platform{gpu_bm_linux} @platform{host}

Given a processor handle processor_handle, and a pointer to a uint64_t enabled_mask, this function will write bits to memory pointed to by enabled_blocks. Upon a successful call, enabled_blocks can then be AND’d with elements of the ::amdsmi_gpu_block_t ennumeration to determine if the corresponding block has ECC enabled.

Note:

Whether a block has ECC enabled or not in the device is independent of whether there is kernel support for error counting for that block. Although a block may be enabled, but there may not be kernel support for reading error counters for that block.

Args:
processor_handle (Pointer/object) – IN:

a processor handle

enabled_blocks (PointerToUInt64/object) – IN,OUT:

A pointer to a uint64_t to which the enabled blocks bits will be written. If this parameter is nullptr, this function will return ::AMDSMI_STATUS_INVAL if the function is supported with the provided arguments and ::AMDSMI_STATUS_NOT_SUPPORTED if it is not supported with the provided arguments.

Returns:

A tuple of size 1 that contains (in that order):

  • amdsmi_status_t: amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail

C signature

amdsmi_status_t amdsmi_get_gpu_ecc_enabled(amdsmi_processor_handle processor_handle, uint64_t * enabled_blocks)
rocm.bindings.amdsmi.amdsmi_get_gpu_total_ecc_count(processor_handle)#
Returns the total number of ECC errors (correctable,

uncorrectable and deferred) in the given GPU. It is not supported on virtual machine guest

See [RAS Error Count sysfs Interface (AMDGPU RAS Support - Linux Kernel documentation)](https://docs.kernel.org/gpu/amdgpu/ras.html:py:obj:ras-error-count-sysfs-interface) to learn how these error counts are accessed.

@platform{gpu_bm_linux} @platform{host} @platform{guest_windows}

Args:
processor_handle (Pointer/object) – IN:

Device which to query

Returns:

A tuple of size 2 that contains (in that order):

  • amdsmi_status_t: amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail

  • amdsmi_error_count_t:

    Reference to ecc error count structure. Must be allocated by user.

C signature

amdsmi_status_t amdsmi_get_gpu_total_ecc_count(amdsmi_processor_handle processor_handle, amdsmi_error_count_t * ec)
class rocm.bindings.amdsmi.amdsmi_cper_guid_t(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

Cper

b: Any#
static PROPERTIES() → list[str]#
static fromObj(pyobj) → Any#
static allocate(count: int = 1) → Any#
c_sizeof() → int#
as_c_void_p() → Any#
class rocm.bindings.amdsmi.amdsmi_cper_timestamp_t(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

(No short description)

seconds: Any#
minutes: Any#
hours: Any#
flag: Any#
day: Any#
month: Any#
year: Any#
century: Any#
static PROPERTIES() → list[str]#
static fromObj(pyobj) → Any#
static allocate(count: int = 1) → Any#
c_sizeof() → int#
as_c_void_p() → Any#
class rocm.bindings.amdsmi.amdsmi_cper_valid_bits_t_valid_bits_(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

(No short description)

platform_id: Any#
timestamp: Any#
partition_id: Any#
reserved: Any#
static PROPERTIES() → list[str]#
static fromObj(pyobj) → Any#
static allocate(count: int = 1) → Any#
c_sizeof() → int#
as_c_void_p() → Any#
class rocm.bindings.amdsmi.amdsmi_cper_valid_bits_t(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

(No short description)

valid_bits: Any#
valid_mask: Any#
static PROPERTIES() → list[str]#
static fromObj(pyobj) → Any#
static allocate(count: int = 1) → Any#
c_sizeof() → int#
as_c_void_p() → Any#
class rocm.bindings.amdsmi.amdsmi_cper_hdr_t(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

(No short description)

signature: Any#
revision: Any#
signature_end: Any#
sec_cnt: Any#
error_severity: Any#
cper_valid_bits: Any#
record_length: Any#
timestamp: Any#
platform_id: Any#
partition_id: Any#
creator_id: Any#
notify_type: Any#
record_id: Any#
flags: Any#
persistence_info: Any#
reserved: Any#
static PROPERTIES() → list[str]#
static fromObj(pyobj) → Any#
static allocate(count: int = 1) → Any#
c_sizeof() → int#
as_c_void_p() → Any#
rocm.bindings.amdsmi.amdsmi_get_afids_from_cper(cper_buffer, buf_size, afids, num_afids)#

Get the AFIDs from CPER buffer

@platform{gpu_bm_linux} @platform{host} @platform{guest_1vf} @platform{guest_mvf}

A utility function which retrieves the AFIDs from the CPER record.

Args:
cper_buffer (Pointer/object) – IN:

a pointer to the buffer with one CPER record. The caller must make sure the whole CPER record is loaded into the buffer.

buf_size (int) – IN:

is the size of the cper_buffer.

afids (ListOfUInt64/object) – OUT:

a pointer to an array of uint64_t to which the AF IDs will be written

num_afids (PointerToUnsigned/object) – IN,OUT:
As input, the value passed through this parameter is the number of

uint64_t that may be safely written to the memory pointed to by afids. This is the limit on how many AF IDs will be written to afids. On return, num_afids will contain the number of AF IDs written to afids, or the number of AF IDs that could have been written if enough memory had been provided. It is suggest to pass AMDSMI_MAX_NUMBER_OF_AFIDS_PER_RECORD

for all AF Ids.

Returns:

A tuple of size 1 that contains (in that order):

  • amdsmi_status_t: amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail

C signature

amdsmi_status_t amdsmi_get_afids_from_cper(char * cper_buffer, uint32_t buf_size, uint64_t * afids, uint32_t * num_afids)
rocm.bindings.amdsmi.amdsmi_get_gpu_ras_feature_info(processor_handle)#

Returns RAS features info.

@platform{gpu_bm_linux} @platform{host} @platform{guest_windows}

Args:
processor_handle (Pointer/object) – IN:

Device handle which to query

Returns:

A tuple of size 2 that contains (in that order):

  • amdsmi_status_t: amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail

  • amdsmi_ras_feature_t:

    RAS features that are currently enabled and supported on the processor. Must be allocated by user.

C signature

amdsmi_status_t amdsmi_get_gpu_ras_feature_info(amdsmi_processor_handle processor_handle, amdsmi_ras_feature_t * ras_feature)
rocm.bindings.amdsmi.amdsmi_get_gpu_cper_entries(processor_handle, severity_mask, cper_data, buf_size, cper_hdrs, entry_count, cursor)#

Retrieve CPER entries cached in the driver.

The user will pass buffers to hold the CPER data and CPER headers. The library will fill the buffer based on the severity_mask user passed. It will also parse the CPER header and stored in the cper_hdrs array. The user can use the cper_hdrs to get the timestamp and other header information. A cursor is also returned to the user, which can be used to get the next set of CPER entries.

If there are more data than any of the buffers user pass, the library will return AMDSMI_STATUS_MORE_DATA. User can call the API again with the cursor returned at previous call to get more data. If the buffer size is too small to even hold one entry, the library will return AMDSMI_STATUS_OUT_OF_RESOURCES.

Even if the API returns AMDSMI_STATUS_MORE_DATA, the 2nd call may still get the entry_count == 0 as the driver cache may not contain the severity user is interested in. The API returns AMDSMI_STATUS_SUCCESS with entry_count == 0 and buf_size == 0 in this case so that user can ignore that call.

An empty CPER ring (no records) also returns AMDSMI_STATUS_SUCCESS with entry_count == 0 and buf_size == 0.

@platform{gpu_bm_linux} @platform{host} @platform{guest_1vf}

Args:
processor_handle (Pointer/object) – IN:

Handle to the processor for which CPER entries are to be retrieved.

severity_mask (int) – IN:

The severity mask of the entries to be retrieved.

cper_data (Pointer/object) – IN,OUT:

Pointer to a buffer where the CPER data will be stored. User must allocate the buffer and set the buf_size correctly.

buf_size (PointerToUInt64/object) – IN,OUT:

Pointer to a variable that specifies the size of the cper_data. On return, it will contain the actual size of the data written to the cper_data.

cper_hdrs (Pointer/object) – IN,OUT:
Array of the parsed headers of the cper_data. The user must allocate

the array of pointers to cper_hdr. The library will fill the array with the

pointers to the parsed headers. The underlying data is in the cper_data buffer and only pointer is stored in this array.

entry_count (PointerToUInt64/object) – IN,OUT:

Pointer to a variable that specifies the array length of the cper_hdrs user allocated. On return, it will contain the actual entries written to the cper_hdrs.

cursor (PointerToUInt64/object) – IN,OUT:

Pointer to a variable that will contain the cursor for the next call.

Returns:

A tuple of size 1 that contains (in that order):

  • amdsmi_status_t: amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail

C signature

amdsmi_status_t amdsmi_get_gpu_cper_entries(amdsmi_processor_handle processor_handle, uint32_t severity_mask, char * cper_data, uint64_t * buf_size, amdsmi_cper_hdr_t ** cper_hdrs, uint64_t * entry_count, uint64_t * cursor)
rocm.bindings.amdsmi.amdsmi_get_gpu_ecc_status(processor_handle, block, state)#

Retrieve the ECC status for a GPU block. It is not supported on virtual machine guest

See [RAS Error Count sysfs Interface (AMDGPU RAS Support - Linux Kernel documentation)](https://docs.kernel.org/gpu/amdgpu/ras.html:py:obj:ras-error-count-sysfs-interface) to learn how these error counts are accessed.

@platform{gpu_bm_linux}

Given a processor handle processor_handle, an ::amdsmi_gpu_block_t block and a pointer to an ::amdsmi_ras_err_state_t state, this function will write the current state for the GPU block indicated by block to memory pointed to by state.

Args:
processor_handle (Pointer/object) – IN:

a processor handle

block (amdsmi_gpu_block_t) – IN:

The block for which error counts should be retrieved

state (Pointer/object) – IN,OUT:

A pointer to an ::amdsmi_ras_err_state_t to which the ECC state should be written If this parameter is nullptr, this function will return ::AMDSMI_STATUS_INVAL if the function is supported with the provided, arguments and ::AMDSMI_STATUS_NOT_SUPPORTED if it is not supported with the provided arguments.

Returns:

A tuple of size 1 that contains (in that order):

  • amdsmi_status_t: amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail

C signature

amdsmi_status_t amdsmi_get_gpu_ecc_status(amdsmi_processor_handle processor_handle, amdsmi_gpu_block_t block, amdsmi_ras_err_state_t * state)
rocm.bindings.amdsmi.amdsmi_status_code_to_string(status, status_string)#

Get a description of a provided AMDSMI error status

@platform{gpu_bm_linux} @platform{host} @platform{cpu_bm} @platform{guest_1vf} @platform{guest_mvf} @platform{guest_windows}

Set the provided pointer to a const char *, status_string, to a string containing a description of the provided error code status.

Args:
status (amdsmi_status_t) – IN:

The error status for which a description is desired

status_string (Pointer/object) – IN,OUT:

A pointer to a const char * which will be made to point to a description of the provided error code

Returns:

A tuple of size 1 that contains (in that order):

  • amdsmi_status_t: amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail

C signature

amdsmi_status_t amdsmi_status_code_to_string(amdsmi_status_t status, const char ** status_string)
rocm.bindings.amdsmi.amdsmi_gpu_counter_group_supported(processor_handle, group)#

Tell if an event group is supported by a given device. It is not supported on virtual machine guest

@platform{gpu_bm_linux}

Given a processor handle processor_handle and an event group specifier group, tell if group type events are supported by the device associated with processor_handle

Args:
processor_handle (Pointer/object) – IN:

processor handle of device being queried

group (amdsmi_event_group_t) – IN:

amdsmi_event_group_t identifier of group for which support is being queried

Returns:

A tuple of size 1 that contains (in that order):

  • amdsmi_status_t: amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail

C signature

amdsmi_status_t amdsmi_gpu_counter_group_supported(amdsmi_processor_handle processor_handle, amdsmi_event_group_t group)
rocm.bindings.amdsmi.amdsmi_gpu_create_counter(processor_handle, type, evnt_handle)#

Create a performance counter object

@platform{gpu_bm_linux}

Create a performance counter object of type type for the device with a processor handle of processor_handle, and write a handle to the object to the memory location pointed to by evnt_handle. evnt_handle can be used with other performance event operations. The handle should be deallocated with ::amdsmi_gpu_destroy_counter() when no longer needed.

Note:

This function requires admin/sudo privileges

Args:
processor_handle (Pointer/object) – IN:

a processor handle

type (amdsmi_event_type_t) – IN:

the ::amdsmi_event_type_t of performance event to create

evnt_handle (PointerToUInt64/object) – IN,OUT:

A pointer to a ::amdsmi_event_handle_t which will be associated with a newly allocated counter If this parameter is nullptr, this function will return ::AMDSMI_STATUS_INVAL if the function is supported with the provided, arguments and ::AMDSMI_STATUS_NOT_SUPPORTED if it is not supported with the provided arguments.

Returns:

A tuple of size 1 that contains (in that order):

  • amdsmi_status_t: amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail

C signature

amdsmi_status_t amdsmi_gpu_create_counter(amdsmi_processor_handle processor_handle, amdsmi_event_type_t type, amdsmi_event_handle_t * evnt_handle)
rocm.bindings.amdsmi.amdsmi_gpu_destroy_counter(evnt_handle)#

Deallocate a performance counter object

@platform{gpu_bm_linux}

Deallocate the performance counter object with the provided ::amdsmi_event_handle_t evnt_handle

Note:

This function requires admin/sudo privileges

Args:
evnt_handle (int) – IN:

handle to event object to be deallocated

Returns:

A tuple of size 1 that contains (in that order):

  • amdsmi_status_t: amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail

C signature

amdsmi_status_t amdsmi_gpu_destroy_counter(amdsmi_event_handle_t evnt_handle)
rocm.bindings.amdsmi.amdsmi_gpu_control_counter(evt_handle, cmd, cmd_args)#

Issue performance counter control commands. It is not supported on virtual machine guest

@platform{gpu_bm_linux}

Issue a command cmd on the event counter associated with the provided handle evt_handle.

Note:

This function requires admin/sudo privileges

Args:
evt_handle (int) – IN:

an event handle

cmd (amdsmi_counter_command_t) – IN:

The event counter command to be issued

cmd_args (Pointer/object) – IN,OUT:

Currently not used. Should be set to NULL.

Returns:

A tuple of size 1 that contains (in that order):

  • amdsmi_status_t: amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail

C signature

amdsmi_status_t amdsmi_gpu_control_counter(amdsmi_event_handle_t evt_handle, amdsmi_counter_command_t cmd, void * cmd_args)
rocm.bindings.amdsmi.amdsmi_gpu_read_counter(evt_handle, value)#

Read the current value of a performance counter

@platform{gpu_bm_linux}

Read the current counter value of the counter associated with the provided handle evt_handle and write the value to the location pointed to by value.

Note:

This function requires admin/sudo privileges

Args:
evt_handle (int) – IN:

an event handle

value (amdsmi_counter_value_t/object) – IN,OUT:

pointer to memory of size of ::amdsmi_counter_value_t to which the counter value will be written

Returns:

A tuple of size 1 that contains (in that order):

  • amdsmi_status_t: amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail

C signature

amdsmi_status_t amdsmi_gpu_read_counter(amdsmi_event_handle_t evt_handle, amdsmi_counter_value_t * value)
rocm.bindings.amdsmi.amdsmi_get_gpu_available_counters(processor_handle, grp, available)#

Get the number of currently available counters. It is not supported on virtual machine guest

@platform{gpu_bm_linux}

Given a processor handle processor_handle, a performance event group grp, and a pointer to a uint32_t available, this function will write the number of grp type counters that are available on the device with handle processor_handle to the memory that available points to.

Args:
processor_handle (Pointer/object) – IN:

a processor handle

grp (amdsmi_event_group_t) – IN:

an event device group

available (PointerToUnsigned/object) – IN,OUT:

A pointer to a uint32_t to which the number of available counters will be written

Returns:

A tuple of size 1 that contains (in that order):

  • amdsmi_status_t: amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail

C signature

amdsmi_status_t amdsmi_get_gpu_available_counters(amdsmi_processor_handle processor_handle, amdsmi_event_group_t grp, uint32_t * available)
rocm.bindings.amdsmi.amdsmi_get_gpu_compute_process_info(procs, num_items)#

Get process information about processes currently using GPU

@platform{gpu_bm_linux}

Given a non-NULL pointer to an array procs of ::amdsmi_process_info_t’s, of length *num_items, this function will write up to *num_items instances of ::amdsmi_process_info_t to the memory pointed to by procs. These instances contain information about each process utilizing a GPU. If procs is not NULL, num_items will be updated with the number of processes actually written. If procs is NULL, num_items will be updated with the number of processes for which there is current process information. Calling this function with procs being NULL is a way to determine how much memory should be allocated for when procs is not NULL.

Args:
procs (amdsmi_process_info_t/object) – IN,OUT:

a pointer to memory provided by the caller to which process information will be written. This may be NULL in which case only num_items will be updated with the number of processes found.

num_items (PointerToUnsigned/object) – IN,OUT:

A pointer to a uint32_t, which on input, should contain the amount of memory in ::amdsmi_process_info_t’s which have been provided by the procs argument. On output, if procs is non-NULL, this will be updated with the number ::amdsmi_process_info_t structs actually written. If procs is NULL, this argument will be updated with the number processes for which there is information.

Returns:

A tuple of size 1 that contains (in that order):

  • amdsmi_status_t: amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail

C signature

amdsmi_status_t amdsmi_get_gpu_compute_process_info(amdsmi_process_info_t * procs, uint32_t * num_items)
rocm.bindings.amdsmi.amdsmi_get_gpu_compute_process_info_by_pid(pid, proc)#

Get process information about a specific process

@platform{gpu_bm_linux}

Given a pointer to an ::amdsmi_process_info_t proc and a process id pid, this function will write the process information for pid, if available, to the memory pointed to by proc.

Args:
pid (int) – IN:

The process ID for which process information is being requested

proc (amdsmi_process_info_t/object) – IN,OUT:

a pointer to a ::amdsmi_process_info_t to which process information for pid will be written if it is found.

Returns:

A tuple of size 1 that contains (in that order):

  • amdsmi_status_t: amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail

C signature

amdsmi_status_t amdsmi_get_gpu_compute_process_info_by_pid(uint32_t pid, amdsmi_process_info_t * proc)
rocm.bindings.amdsmi.amdsmi_get_gpu_compute_process_gpus(pid, dv_indices, num_devices)#

Get the device indices currently being used by a process

@platform{gpu_bm_linux}

Given a process id pid, a non-NULL pointer to an array of uint32_t’s processor_handleices of length *num_devices, this function will write up to num_devices device indices to the memory pointed to by processor_handleices. If processor_handleices is not NULL, num_devices will be updated with the number of gpu’s currently being used by process pid. If processor_handleices is NULL, processor_handleices will be updated with the number of gpus currently being used by pid. Calling this function with dv_indices being NULL is a way to determine how much memory is required for when processor_handleices is not NULL.

Args:
pid (int) – IN:

The process id of the process for which the number of gpus currently being used is requested

dv_indices (PointerToUnsigned/object) – IN,OUT:

a pointer to memory provided by the caller to which indices of devices currently being used by the process will be written. This may be NULL in which case only num_devices will be updated with the number of devices being used.

num_devices (PointerToUnsigned/object) – IN,OUT:

A pointer to a uint32_t, which on input, should contain the amount of memory in uint32_t’s which have been provided by the processor_handleices argument. On output, if processor_handleices is non-NULL, this will be updated with the number uint32_t’s actually written. If processor_handleices is NULL, this argument will be updated with the number devices being used.

Returns:

A tuple of size 1 that contains (in that order):

  • amdsmi_status_t: amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail

C signature

amdsmi_status_t amdsmi_get_gpu_compute_process_gpus(uint32_t pid, uint32_t * dv_indices, uint32_t * num_devices)
rocm.bindings.amdsmi.amdsmi_gpu_xgmi_error_status(processor_handle, status)#

Retrieve the XGMI error status for a device. It is not supported on virtual machine guest

@platform{gpu_bm_linux}

Given a processor handle processor_handle, and a pointer to an ::amdsmi_xgmi_status_t status, this function will write the current XGMI error state ::amdsmi_xgmi_status_t for the device processor_handle to the memory pointed to by status.

Args:
processor_handle (Pointer/object) – IN:

a processor handle

status (Pointer/object) – IN,OUT:

A pointer to an ::amdsmi_xgmi_status_t to which the XGMI error state should be written If this parameter is nullptr, this function will return ::AMDSMI_STATUS_INVAL if the function is supported with the provided, arguments and ::AMDSMI_STATUS_NOT_SUPPORTED if it is not supported with the provided arguments.

Returns:

A tuple of size 1 that contains (in that order):

  • amdsmi_status_t: amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail

C signature

amdsmi_status_t amdsmi_gpu_xgmi_error_status(amdsmi_processor_handle processor_handle, amdsmi_xgmi_status_t * status)
rocm.bindings.amdsmi.amdsmi_reset_gpu_xgmi_error(processor_handle)#

Reset the XGMI error status for a device. It is not supported on virtual machine guest

@platform{gpu_bm_linux}

Given a processor handle processor_handle, this function will reset the current XGMI error state ::amdsmi_xgmi_status_t for the device processor_handle to amdsmi_xgmi_status_t::AMDSMI_XGMI_STATUS_NO_ERRORS

Args:
processor_handle (Pointer/object) – IN:

a processor handle

Returns:

A tuple of size 1 that contains (in that order):

  • amdsmi_status_t: amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail

C signature

amdsmi_status_t amdsmi_reset_gpu_xgmi_error(amdsmi_processor_handle processor_handle)
rocm.bindings.amdsmi.amdsmi_get_xgmi_info(processor_handle)#

Returns XGMI information for the GPU.

@platform{gpu_bm_linux}

Args:
processor_handle (Pointer/object) – IN:

Device which to query

Returns:

A tuple of size 2 that contains (in that order):

  • amdsmi_status_t: amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail

  • amdsmi_xgmi_info_t:

    Reference to xgmi information structure. Must be allocated by user.

C signature

amdsmi_status_t amdsmi_get_xgmi_info(amdsmi_processor_handle processor_handle, amdsmi_xgmi_info_t * info)

Get the XGMI link status

@platform{gpu_bm_linux}

Given a processor handle processor_handle, this function will return the link status for each XGMI link connect to this processor. If the processor link type is not XGMI, it should return AMDSMI_STATUS_NOT_SUPPORTED.

Args:
processor_handle (Pointer/object) – IN:

a processor handle

Returns:

A tuple of size 2 that contains (in that order):

C signature

amdsmi_status_t amdsmi_get_gpu_xgmi_link_status(amdsmi_processor_handle processor_handle, amdsmi_xgmi_link_status_t * link_status)

Return link metric information

@platform{gpu_bm_linux} @platform{host}

Args:
processor_handle (Pointer/object) – IN:

PF of a processor for which to query

Returns:

A tuple of size 2 that contains (in that order):

C signature

amdsmi_status_t amdsmi_get_link_metrics(amdsmi_processor_handle processor_handle, amdsmi_link_metrics_t * link_metrics)
rocm.bindings.amdsmi.amdsmi_topo_get_numa_node_number(processor_handle, numa_node)#

Retrieve the NUMA CPU node number for a device

@platform{gpu_bm_linux} @platform{host}

Given a processor handle processor_handle, and a pointer to an uint32_t numa_node, this function will write the node number of NUMA CPU for the device processor_handle to the memory pointed to by numa_node.

Args:
processor_handle (Pointer/object) – IN:

a processor handle

numa_node (PointerToUnsigned/object) – IN,OUT:

A pointer to an uint32_t to which the numa node number should be written.

Returns:

A tuple of size 1 that contains (in that order):

  • amdsmi_status_t: amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail

C signature

amdsmi_status_t amdsmi_topo_get_numa_node_number(amdsmi_processor_handle processor_handle, uint32_t * numa_node)

Retrieve the weight for a connection between 2 GPUs

@platform{gpu_bm_linux}

Given a source processor handle processor_handle_src and a destination processor handle processor_handle_dst, and a pointer to an uint64_t weight, this function will write the weight for the connection between the device processor_handle_src and processor_handle_dst to the memory pointed to by weight.

The weight is a qualitative cost metric derived from the KFD io_link weight property (lower values indicate closer or faster connections), similar in spirit to the NUMA distances reported by numactl. The value is computed as follows:

  • Each physical xGMI hop contributes 15, so an xGMI route traversing N physical links has a weight of 15*N. A single-hop xGMI connection has a weight of 15.

  • PCIe segments are summed over all segments (GPU→CPU + CPU→CPU + CPU→GPU). Each GPU-to-CPU segment typically contributes 20. The CPU-to-CPU segment uses the actual io_link weight when available; if that weight cannot be read, a fallback value of 10 is used for that segment.

Args:
processor_handle_src (Pointer/object) – IN:

the source processor handle

processor_handle_dst (Pointer/object) – IN:

the destination processor handle

weight (PointerToUInt64/object) – IN,OUT:

A pointer to an uint64_t to which the weight for the connection should be written.

Returns:

A tuple of size 1 that contains (in that order):

  • amdsmi_status_t: amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail

C signature

amdsmi_status_t amdsmi_topo_get_link_weight(amdsmi_processor_handle processor_handle_src, amdsmi_processor_handle processor_handle_dst, uint64_t * weight)
rocm.bindings.amdsmi.amdsmi_get_minmax_bandwidth_between_processors(processor_handle_src, processor_handle_dst, min_bandwidth, max_bandwidth)#

Retrieve minimal and maximal io link bandwidth between 2 GPUs

@platform{gpu_bm_linux}

Given a source processor handle processor_handle_src and a destination processor handle processor_handle_dst, pointer to an uint64_t min_bandwidth, and a pointer to uint64_t max_bandiwidth, this function will write theoretical minimal and maximal bandwidth limits. API works if src and dst are connected via xgmi and have 1 hop distance.

Args:
processor_handle_src (Pointer/object) – IN:

the source processor handle

processor_handle_dst (Pointer/object) – IN:

the destination processor handle

min_bandwidth (PointerToUInt64/object) – IN,OUT:

A pointer to an uint64_t to which the minimal bandwidth for the connection should be written.

max_bandwidth (PointerToUInt64/object) – IN,OUT:

A pointer to an uint64_t to which the maximal bandwidth for the connection should be written.

Returns:

A tuple of size 1 that contains (in that order):

  • amdsmi_status_t: amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail

C signature

amdsmi_status_t amdsmi_get_minmax_bandwidth_between_processors(amdsmi_processor_handle processor_handle_src, amdsmi_processor_handle processor_handle_dst, uint64_t * min_bandwidth, uint64_t * max_bandwidth)

Retrieve the hops and the connection type between 2 GPUs

@platform{gpu_bm_linux}

Given a source processor handle processor_handle_src and a destination processor handle processor_handle_dst, and a pointer to an uint64_t hops and a pointer to an ::amdsmi_link_type_t type, this function will write the number of hops and the connection type between the device processor_handle_src and processor_handle_dst to the memory pointed to by hops and type.

Note:

The value written to hops is an abstracted topology step count, not the number of physical xGMI links traversed. The possible values are:

Value | Meaning |

|-------|———| | 1 | The two GPUs are reachable over xGMI, regardless of how many physical xGMI links the route traverses. | | 2 | The two GPUs communicate over PCIe within the same CPU NUMA node. | | 3 | The two GPUs communicate over PCIe across different CPU NUMA nodes. | | 4 | Fallback value used when the inter-CPU io_link weight cannot be read. |

Two GPUs on the same xGMI fabric always report a hop count of 1, even when the data physically crosses several xGMI links. To obtain the literal number of physical xGMI links between two devices, read the value exposed by the amdgpu driver at `/sys/class/drm/card{0,1,…}/device/xgmi_num_hops` instead.

Args:
processor_handle_src (Pointer/object) – IN:

the source processor handle

processor_handle_dst (Pointer/object) – IN:

the destination processor handle

hops (PointerToUInt64/object) – IN,OUT:

A pointer to an uint64_t to which the abstracted hop count for the connection should be written.

type (Pointer/object) – IN,OUT:

A pointer to an ::amdsmi_link_type_t to which the type for the connection should be written.

Returns:

A tuple of size 1 that contains (in that order):

  • amdsmi_status_t: amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail

C signature

amdsmi_status_t amdsmi_topo_get_link_type(amdsmi_processor_handle processor_handle_src, amdsmi_processor_handle processor_handle_dst, uint64_t * hops, amdsmi_link_type_t * type)
Retrieve the set of GPUs that are nearest to a given device

at a specific interconnectivity level.

@platform{gpu_bm_linux} @platform{host}

Once called topology_nearest_info will get populated with a list of all nearest devices for a given link_type. The list has a count of the number of devices found and their respective handles/identifiers.

Args:
processor_handle (Pointer/object) – IN:

The identifier of the given device.

link_type (amdsmi_link_type_t) – IN:

The amdsmi_link_type_t level to search for nearest GPUs.

topology_nearest_info (amdsmi_topology_nearest_t/object) – IN,OUT:
.count;
  • When zero, set to the number of matching GPUs such that .device_list can be

malloc’d.
  • When non-zero, .device_list will be filled with count number of

processor_handle. .device_list An array of processor_handle for GPUs found at level.

Returns:

A tuple of size 1 that contains (in that order):

  • amdsmi_status_t: amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail.

C signature

amdsmi_status_t amdsmi_get_link_topology_nearest(amdsmi_processor_handle processor_handle, amdsmi_link_type_t link_type, amdsmi_topology_nearest_t * topology_nearest_info)
rocm.bindings.amdsmi.amdsmi_is_P2P_accessible(processor_handle_src, processor_handle_dst, accessible)#

Return P2P availability status between 2 GPUs

@platform{gpu_bm_linux}

Given a source processor handle processor_handle_src and a destination processor handle processor_handle_dst, and a pointer to a bool accessible, this function will write the P2P connection status between the device processor_handle_src and processor_handle_dst to the memory pointed to by accessible.

Args:
processor_handle_src (Pointer/object) – IN:

the source processor handle

processor_handle_dst (Pointer/object) – IN:

the destination processor handle

accessible (Pointer/object) – IN,OUT:

A pointer to a bool to which the status for the P2P connection availability should be written.

Returns:

A tuple of size 1 that contains (in that order):

  • amdsmi_status_t: amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail

C signature

amdsmi_status_t amdsmi_is_P2P_accessible(amdsmi_processor_handle processor_handle_src, amdsmi_processor_handle processor_handle_dst, _Bool * accessible)
rocm.bindings.amdsmi.amdsmi_topo_get_p2p_status(processor_handle_src, processor_handle_dst, type, cap)#

Retrieve connection type and P2P capabilities between 2 GPUs

@platform{gpu_bm_linux} @platform{host} @platform{guest_1vf} @platform{guest_mvf}

Given a source processor handle processor_handle_src and

a destination processor handle processor_handle_dst, a pointer to an amdsmi_link_type_t type, and a pointer to amdsmi_p2p_capability_t cap. This function will write the connection

type, and io link capabilities between the device

processor_handle_src and processor_handle_dst to the memory pointed to by cap and type.

Args:
processor_handle_src (Pointer/object) – IN:

the source processor handle

processor_handle_dst (Pointer/object) – IN:

the destination processor handle

type (Pointer/object) – IN,OUT:

A pointer to an ::amdsmi_link_type_t to which the type for the connection should be written.

cap (amdsmi_p2p_capability_t/object) – IN,OUT:

A pointer to an ::amdsmi_p2p_capability_t to which the io link capabilities should be written.

Returns:

A tuple of size 1 that contains (in that order):

  • amdsmi_status_t: amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail

C signature

amdsmi_status_t amdsmi_topo_get_p2p_status(amdsmi_processor_handle processor_handle_src, amdsmi_processor_handle processor_handle_dst, amdsmi_link_type_t * type, amdsmi_p2p_capability_t * cap)
rocm.bindings.amdsmi.amdsmi_get_gpu_compute_partition(processor_handle, compute_partition, len)#

Retrieves the current compute partitioning for a desired device

Deprecated:

This API is slated for removal in a future ROCm release; ::amdsmi_get_gpu_accelerator_partition_profile() should be used instead

@platform{gpu_bm_linux}

Given a processor handle processor_handle and a string compute_partition, and uint32 len, this function will attempt to obtain the device’s current compute partition setting string. Upon successful retrieval, the obtained device’s compute partition settings string shall be stored in the passed compute_partition char string variable.

@retval ::AMDSMI_STATUS_SUCCESS call was successful @retval ::AMDSMI_STATUS_INVAL the provided arguments are not valid @retval ::AMDSMI_STATUS_UNEXPECTED_DATA data provided to function is not valid @retval ::AMDSMI_STATUS_NOT_SUPPORTED installed software or hardware does not support this function @retval ::AMDSMI_STATUS_INSUFFICIENT_SIZE is returned if len bytes is not large enough to hold the entire compute partition value. In this case, only len bytes will be written.

Args:
processor_handle (Pointer/object) – IN:

Device which to query

compute_partition (Pointer/object) – INOUT:

a pointer to a char string variable, which the device’s current compute partition will be written to.

len (int) – IN:

the length of the caller provided buffer compute_partition, suggested length is 4 or greater.

Returns:

A tuple of size 1 that contains (in that order):

C signature

amdsmi_status_t amdsmi_get_gpu_compute_partition(amdsmi_processor_handle processor_handle, char * compute_partition, uint32_t len)
rocm.bindings.amdsmi.amdsmi_set_gpu_compute_partition(processor_handle, compute_partition)#

Modifies a selected device’s compute partition setting.

Deprecated:

This API is slated for removal in a future ROCm release; ::amdsmi_set_gpu_accelerator_partition_profile() should be used instead

@platform{gpu_bm_linux}

Given a processor handle processor_handle, a type of compute partition compute_partition, this function will attempt to update the selected device’s compute partition setting. This function does not allow any concurrent operations. Device must be idle and have no workloads when performing set partition operations.

@retval ::AMDSMI_STATUS_SUCCESS call was successful @retval ::AMDSMI_STATUS_NO_PERM function requires admin/sudo privileges @retval ::AMDSMI_STATUS_INVAL the provided arguments are not valid @retval ::AMDSMI_STATUS_SETTING_UNAVAILABLE the provided setting is unavailable for current device @retval ::AMDSMI_STATUS_NOT_SUPPORTED installed software or hardware does not support this function

Args:
processor_handle (Pointer/object) – IN:

Device which to query

compute_partition (amdsmi_compute_partition_type_t) – IN:

using enum ::amdsmi_compute_partition_type_t, define what the selected device’s compute partition setting should be updated to.

Returns:

A tuple of size 1 that contains (in that order):

C signature

amdsmi_status_t amdsmi_set_gpu_compute_partition(amdsmi_processor_handle processor_handle, amdsmi_compute_partition_type_t compute_partition)
rocm.bindings.amdsmi.amdsmi_get_gpu_compute_partition_mem_alloc_mode(processor_handle)#

Retrieves the current compute partition memory allocation mode for a desired device.

Deprecated:

This API is slated for removal in a future ROCm release; ::amdsmi_get_gpu_accelerator_partition_mem_alloc_mode() should be used instead

@platform{gpu_bm_linux}

Given a processor handle processor_handle and a pointer mode, this function will attempt to obtain the device’s current compute partition memory allocation mode. The mode controls how HBM capacity is distributed across XCPs within each memory partition: - ::AMDSMI_ACCELERATOR_PARTITION_MEM_ALLOC_CAPPING — each XCP is capped

to an even share.

  • ::AMDSMI_ACCELERATOR_PARTITION_MEM_ALLOC_ALL — each XCP may use the full memory partition size (useful when only one XCP is active).

@retval ::AMDSMI_STATUS_SUCCESS call was successful @retval ::AMDSMI_STATUS_INVAL the provided arguments are not valid @retval ::AMDSMI_STATUS_UNEXPECTED_DATA data provided to function is not valid @retval ::AMDSMI_STATUS_FILE_ERROR problem accessing the sysfs file @retval ::AMDSMI_STATUS_NOT_SUPPORTED installed software or hardware does not support this function

Args:
processor_handle (Pointer/object) – IN:

Device which to query

Returns:

A tuple of size 2 that contains (in that order):

C signature

amdsmi_status_t amdsmi_get_gpu_compute_partition_mem_alloc_mode(amdsmi_processor_handle processor_handle, amdsmi_compute_partition_mem_alloc_mode_t * mode)
rocm.bindings.amdsmi.amdsmi_get_gpu_accelerator_partition_mem_alloc_mode(processor_handle)#

Retrieves the current accelerator partition memory allocation mode for a desired device.

@platform{gpu_bm_linux}

Given a processor handle processor_handle and a pointer mode, this function will attempt to obtain the device’s current accelerator partition memory allocation mode. The mode controls how HBM capacity is distributed across XCPs within each memory partition: - ::AMDSMI_ACCELERATOR_PARTITION_MEM_ALLOC_CAPPING — each XCP is capped

to an even share.

  • ::AMDSMI_ACCELERATOR_PARTITION_MEM_ALLOC_ALL — each XCP may use the full memory partition size (useful when only one XCP is active).

@retval ::AMDSMI_STATUS_SUCCESS call was successful @retval ::AMDSMI_STATUS_INVAL the provided arguments are not valid @retval ::AMDSMI_STATUS_UNEXPECTED_DATA data provided to function is not valid @retval ::AMDSMI_STATUS_FILE_ERROR problem accessing the sysfs file @retval ::AMDSMI_STATUS_NOT_SUPPORTED installed software or hardware does not support this function

Args:
processor_handle (Pointer/object) – IN:

Device which to query

Returns:

A tuple of size 2 that contains (in that order):

C signature

amdsmi_status_t amdsmi_get_gpu_accelerator_partition_mem_alloc_mode(amdsmi_processor_handle processor_handle, amdsmi_accelerator_partition_mem_alloc_mode_t * mode)
rocm.bindings.amdsmi.amdsmi_set_gpu_compute_partition_mem_alloc_mode(processor_handle, mode)#

Modifies a selected device’s compute partition memory allocation mode.

Deprecated:

This API is slated for removal in a future ROCm release; ::amdsmi_set_gpu_accelerator_partition_mem_alloc_mode() should be used instead

@platform{gpu_bm_linux}

Given a processor handle processor_handle and a mode mode, this function will attempt to update the selected device’s compute partition memory allocation mode. The mode controls how HBM capacity is distributed across XCPs within each memory partition: - ::AMDSMI_COMPUTE_PARTITION_MEM_ALLOC_CAPPING — each XCP is capped

to an even share. This is the default.

  • ::AMDSMI_COMPUTE_PARTITION_MEM_ALLOC_ALL — each XCP may use the full memory partition size.

@retval ::AMDSMI_STATUS_SUCCESS call was successful @retval ::AMDSMI_STATUS_NO_PERM function requires admin/sudo privileges @retval ::AMDSMI_STATUS_INVAL the provided arguments are not valid @retval ::AMDSMI_STATUS_FILE_ERROR problem accessing the sysfs file @retval ::AMDSMI_STATUS_NOT_SUPPORTED installed software or hardware does not support this function

Args:
processor_handle (Pointer/object) – IN:

Device which to modify

mode (amdsmi_compute_partition_mem_alloc_mode_t) – IN:

using enum ::amdsmi_compute_partition_mem_alloc_mode_t, define what the selected device’s memory allocation mode should be updated to.

Returns:

A tuple of size 1 that contains (in that order):

C signature

amdsmi_status_t amdsmi_set_gpu_compute_partition_mem_alloc_mode(amdsmi_processor_handle processor_handle, amdsmi_compute_partition_mem_alloc_mode_t mode)
rocm.bindings.amdsmi.amdsmi_set_gpu_accelerator_partition_mem_alloc_mode(processor_handle, mode)#

Modifies a selected device’s compute partition memory allocation mode.

@platform{gpu_bm_linux}

Given a processor handle processor_handle and a mode mode, this function will attempt to update the selected device’s compute partition memory allocation mode. The mode controls how HBM capacity is distributed across XCPs within each memory partition: - ::AMDSMI_ACCELERATOR_PARTITION_MEM_ALLOC_CAPPING — each XCP is capped

to an even share. This is the default.

  • ::AMDSMI_ACCELERATOR_PARTITION_MEM_ALLOC_ALL — each XCP may use the full memory partition size.

@retval ::AMDSMI_STATUS_SUCCESS call was successful @retval ::AMDSMI_STATUS_NO_PERM function requires admin/sudo privileges @retval ::AMDSMI_STATUS_INVAL the provided arguments are not valid @retval ::AMDSMI_STATUS_FILE_ERROR problem accessing the sysfs file @retval ::AMDSMI_STATUS_NOT_SUPPORTED installed software or hardware does not support this function

Args:
processor_handle (Pointer/object) – IN:

Device which to modify

mode (amdsmi_accelerator_partition_mem_alloc_mode_t) – IN:

using enum ::amdsmi_accelerator_partition_mem_alloc_mode_t, define what the selected device’s memory allocation mode should be updated to.

Returns:

A tuple of size 1 that contains (in that order):

C signature

amdsmi_status_t amdsmi_set_gpu_accelerator_partition_mem_alloc_mode(amdsmi_processor_handle processor_handle, amdsmi_accelerator_partition_mem_alloc_mode_t mode)
rocm.bindings.amdsmi.amdsmi_get_gpu_memory_partition(processor_handle, memory_partition, len)#

Retrieves the current memory partition for a desired device

@platform{gpu_bm_linux}

Given a processor handle processor_handle and a string memory_partition, and uint32 len, this function will attempt to obtain the device’s memory partition string. Upon successful retrieval, the obtained device’s memory partition string shall be stored in the passed memory_partition char string variable.

@retval ::AMDSMI_STATUS_SUCCESS call was successful @retval ::AMDSMI_STATUS_INVAL the provided arguments are not valid @retval ::AMDSMI_STATUS_UNEXPECTED_DATA data provided to function is not valid @retval ::AMDSMI_STATUS_NOT_SUPPORTED installed software or hardware does not support this function @retval ::AMDSMI_STATUS_INSUFFICIENT_SIZE is returned if len bytes is not large enough to hold the entire memory partition value. In this case, only len bytes will be written.

Args:
processor_handle (Pointer/object) – IN:

Device which to query

memory_partition (Pointer/object) – INOUT:

a pointer to a char string variable, which the device’s memory partition will be written to.

len (int) – IN:

the length of the caller provided buffer memory_partition, suggested length is 5 or greater.

Returns:

A tuple of size 1 that contains (in that order):

C signature

amdsmi_status_t amdsmi_get_gpu_memory_partition(amdsmi_processor_handle processor_handle, char * memory_partition, uint32_t len)
rocm.bindings.amdsmi.amdsmi_set_gpu_memory_partition(processor_handle, memory_partition)#

Modifies a selected device’s current memory partition setting.

Deprecated:

This API is slated for removal in a future ROCm release; ::amdsmi_set_gpu_memory_partition_mode() should be used instead

@platform{gpu_bm_linux}

Given a processor handle processor_handle and a type of memory partition memory_partition, this function will attempt to update the selected device’s memory partition setting. This function does not allow any concurrent operations. Device must be idle and have no workloads when performing set partition operations.

On @platform{gpu_bm_linux} AMDGPU driver restart is REQUIRED to complete updating to the new memory partition setting.

@retval ::AMDSMI_STATUS_SUCCESS call was successful @retval ::AMDSMI_STATUS_NO_PERM function requires admin/sudo privileges @retval ::AMDSMI_STATUS_INVAL the provided arguments are not valid @retval ::AMDSMI_STATUS_NOT_SUPPORTED installed software or hardware does not support this function @retval ::AMDSMI_STATUS_BUSY device is busy, a resource or mutex could not be acquired

Args:
processor_handle (Pointer/object) – IN:

Device which to query

memory_partition (amdsmi_memory_partition_type_t) – IN:

using enum ::amdsmi_memory_partition_type_t, define what the selected device’s current mode setting should be updated to.

Returns:

A tuple of size 1 that contains (in that order):

C signature

amdsmi_status_t amdsmi_set_gpu_memory_partition(amdsmi_processor_handle processor_handle, amdsmi_memory_partition_type_t memory_partition)
rocm.bindings.amdsmi.amdsmi_get_gpu_memory_partition_config(processor_handle)#

Returns current gpu memory partition capabilities

@platform{gpu_bm_linux} @platform{host} @platform{guest_1vf} @platform{guest_mvf}

Args:
processor_handle (Pointer/object) – IN:

a processor handle

Returns:

A tuple of size 2 that contains (in that order):

C signature

amdsmi_status_t amdsmi_get_gpu_memory_partition_config(amdsmi_processor_handle processor_handle, amdsmi_memory_partition_config_t * config)
rocm.bindings.amdsmi.amdsmi_set_gpu_memory_partition_mode(processor_handle, mode)#

Sets memory partition mode Set memory partition setting based on memory_partition mode from amdsmi_get_gpu_memory_partition_config

@platform{gpu_bm_linux} @platform{host}

Given a processor handle processor_handle and a type of memory partition mode, this function will attempt to update the selected device’s memory partition setting. This function does not allow any concurrent operations. Device must be idle and have no workloads when performing set partition operations.

On @platform{gpu_bm_linux} AMDGPU driver restart is REQUIRED to complete updating to the new memory partition setting.

On @platform{gpu_bm_linux} AMDGPU driver restart is REQUIRED to complete updating to the new memory partition setting.

Args:
processor_handle (Pointer/object) – IN:

A processor handle

mode (amdsmi_memory_partition_type_t) – IN:

Enum representing memory partitioning mode to set

Returns:

A tuple of size 1 that contains (in that order):

  • amdsmi_status_t: amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail

C signature

amdsmi_status_t amdsmi_set_gpu_memory_partition_mode(amdsmi_processor_handle processor_handle, amdsmi_memory_partition_type_t mode)
rocm.bindings.amdsmi.amdsmi_get_gpu_accelerator_partition_profile_config(processor_handle)#

Returns gpu accelerator partition caps as currently configured in the system

@platform{gpu_bm_linux} @platform{host} @platform{guest_1vf} @platform{guest_mvf}

Note:

API requires admin/sudo privileges or API will not be able to read all resources for @platform{gpu_bm_linux} or any resources for @platform{host}.

Args:
processor_handle (Pointer/object) – IN:

Device which to query

Returns:

A tuple of size 2 that contains (in that order):

C signature

amdsmi_status_t amdsmi_get_gpu_accelerator_partition_profile_config(amdsmi_processor_handle processor_handle, amdsmi_accelerator_partition_profile_config_t * profile_config)
rocm.bindings.amdsmi.amdsmi_get_gpu_accelerator_partition_profile(processor_handle, partition_id)#

Returns current gpu accelerator partition cap

Note:

API requires admin/sudo privileges or API will not be able to read all resources for @platform{gpu_bm_linux} or any resources for @platform{host}.

@platform{gpu_bm_linux} @platform{host} @platform{guest_1vf} @platform{guest_mvf}

Args:
processor_handle (Pointer/object) – IN:

Device which to query

partition_id (PointerToUnsigned/object) – IN,OUT:

array of ids for current accelerator profile. Must be allocated by user.

Returns:

A tuple of size 2 that contains (in that order):

C signature

amdsmi_status_t amdsmi_get_gpu_accelerator_partition_profile(amdsmi_processor_handle processor_handle, amdsmi_accelerator_partition_profile_t * profile, uint32_t * partition_id)
rocm.bindings.amdsmi.amdsmi_set_gpu_accelerator_partition_profile(processor_handle, profile_index)#

Set accelerator partition setting based on profile_index from amdsmi_get_gpu_accelerator_partition_profile_config

@platform{gpu_bm_linux} @platform{host}

Note:

API requires admin/sudo privileges or API will not be able to read all resources for @platform{gpu_bm_linux} or any resources for @platform{host}.

Args:
processor_handle (Pointer/object) – IN:

Device which to query

profile_index (int) – IN:

Represents index of a partition user wants to set

Returns:

A tuple of size 1 that contains (in that order):

  • amdsmi_status_t: amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail

C signature

amdsmi_status_t amdsmi_set_gpu_accelerator_partition_profile(amdsmi_processor_handle processor_handle, uint32_t profile_index)
rocm.bindings.amdsmi.amdsmi_init_gpu_event_notification(processor_handle)#

Prepare to collect event notifications for a GPU

@platform{gpu_bm_linux}

This function prepares to collect events for the GPU with device ID processor_handle, by initializing any required system parameters. This call may open files which will remain open until ::amdsmi_stop_gpu_event_notification() is called.

Args:
processor_handle (Pointer/object) – IN:

a processor handle corresponding to the device on which to listen for events

Returns:

A tuple of size 1 that contains (in that order):

  • amdsmi_status_t: amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail

C signature

amdsmi_status_t amdsmi_init_gpu_event_notification(amdsmi_processor_handle processor_handle)
rocm.bindings.amdsmi.amdsmi_set_gpu_event_notification_mask(processor_handle, mask)#

Specify which events to collect for a device

@platform{gpu_bm_linux}

Given a processor handle processor_handle and a mask consisting of elements of ::amdsmi_evt_notification_type_t OR’d together, this function will listen for the events specified in mask on the device corresponding to processor_handle.

Note:

AMDSMI_STATUS_INIT_ERROR is returned if ::amdsmi_init_gpu_event_notification() has not been called before a call to this function

Args:
processor_handle (Pointer/object) – IN:

a processor handle corresponding to the device on which to listen for events

mask (int) – IN:

Bitmask generated by OR’ing 1 or more elements of ::amdsmi_evt_notification_type_t indicating which event types to listen for, where the amdsmi_evt_notification_type_t value indicates the bit field, with bit position starting from 1. For example, if the mask field is 0x0000000000000003, which means first bit, bit 1 (bit position start from 1) and bit 2 are set, which indicate interest in receiving AMDSMI_EVT_NOTIF_VMFAULT (which has a value of 1) and AMDSMI_EVT_NOTIF_THERMAL_THROTTLE event (which has a value of 2).

Returns:

A tuple of size 1 that contains (in that order):

  • amdsmi_status_t: amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail

C signature

amdsmi_status_t amdsmi_set_gpu_event_notification_mask(amdsmi_processor_handle processor_handle, uint64_t mask)
rocm.bindings.amdsmi.amdsmi_get_gpu_event_notification(timeout_ms, num_elem, data)#

Collect event notifications, waiting a specified amount of time

@platform{gpu_bm_linux}

Given a time period timeout_ms in milliseconds and a caller- provided buffer of ::amdsmi_evt_notification_data_t’s data with a length (in ::amdsmi_evt_notification_data_t’s, also specified by the caller) in the memory location pointed to by num_elem, this function will collect ::amdsmi_evt_notification_type_t events for up to timeout_ms milliseconds, and write up to *num_elem event items to data. Upon return num_elem is updated with the number of events that were actually written. If events are already present when this function is called, it will write the events to the buffer then poll for new events if there is still caller-provided buffer available to write any new events that would be found.

This function requires prior calls to ::amdsmi_init_gpu_event_notification() and :: amdsmi_set_gpu_event_notification_mask(). This function polls for the occurrence of the events on the respective devices that were previously specified by :: amdsmi_set_gpu_event_notification_mask().

Args:
timeout_ms (int) – IN:

number of milliseconds to wait for an event to occur

num_elem (PointerToUnsigned/object) – IN,OUT:

pointer to uint32_t, provided by the caller. On input, this value tells how many ::amdsmi_evt_notification_data_t elements are being provided by the caller with data. On output, the location pointed to by num_elem will contain the number of items written to the provided buffer.

data (amdsmi_evt_notification_data_t/object) – OUT:

pointer to a caller-provided memory buffer of size num_elem ::amdsmi_evt_notification_data_t to which this function may safely write. If there are events found, up to num_elem event items will be written to data.

Returns:

A tuple of size 1 that contains (in that order):

  • amdsmi_status_t: amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail

C signature

amdsmi_status_t amdsmi_get_gpu_event_notification(int timeout_ms, uint32_t * num_elem, amdsmi_evt_notification_data_t * data)
rocm.bindings.amdsmi.amdsmi_stop_gpu_event_notification(processor_handle)#

Close any file handles and free any resources used by event notification for a GPU

@platform{gpu_bm_linux}

Any resources used by event notification for the GPU with processor handle processor_handle will be free with this function. This includes freeing any memory and closing file handles. This should be called for every call to ::amdsmi_init_gpu_event_notification()

Args:
processor_handle (Pointer/object) – IN:

The processor handle of the GPU for which event notification resources will be free

Returns:

A tuple of size 1 that contains (in that order):

  • amdsmi_status_t: amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail

C signature

amdsmi_status_t amdsmi_stop_gpu_event_notification(amdsmi_processor_handle processor_handle)
rocm.bindings.amdsmi.amdsmi_get_gpu_driver_info(processor_handle)#

Returns the driver version information

@platform{gpu_bm_linux} @platform{host} @platform{guest_1vf} @platform{guest_mvf} @platform{guest_windows}

Args:
processor_handle (Pointer/object) – IN:

Device which to query

Returns:

A tuple of size 2 that contains (in that order):

  • amdsmi_status_t: amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail

  • amdsmi_driver_info_t:

    Reference to driver information structure. Must be allocated by user.

C signature

amdsmi_status_t amdsmi_get_gpu_driver_info(amdsmi_processor_handle processor_handle, amdsmi_driver_info_t * info)
rocm.bindings.amdsmi.amdsmi_get_gpu_asic_info(processor_handle)#

Returns the ASIC information for the device

@platform{gpu_bm_linux} @platform{host} @platform{guest_1vf} @platform{guest_mvf} @platform{guest_windows}

This function returns ASIC information such as the product name, the vendor ID, the subvendor ID, the device ID, the revision ID and the serial number.

Note:

The processor_handle that contains amdsmi_asic_info_t member oam_id = 0 corresponds to the socket that contains baseboard information.

Args:
processor_handle (Pointer/object) – IN:

Device which to query

Returns:

A tuple of size 2 that contains (in that order):

  • amdsmi_status_t: amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail

  • amdsmi_asic_info_t:

    Reference to static asic information structure. Must be allocated by user.

C signature

amdsmi_status_t amdsmi_get_gpu_asic_info(amdsmi_processor_handle processor_handle, amdsmi_asic_info_t * info)
rocm.bindings.amdsmi.amdsmi_get_gpu_kfd_info(processor_handle)#

Returns the KFD (Kernel Fusion Driver) information for the device

@platform{gpu_bm_linux}

This function returns KFD information populated into the amdsmi_kfd_info_t. This contains the kfd_id and node_id which allow for the ID and index of this device in the KFD.

Args:
processor_handle (Pointer/object) – IN:

Device which to query

Returns:

A tuple of size 2 that contains (in that order):

  • amdsmi_status_t: amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail

  • amdsmi_kfd_info_t:

    Reference to kfd information structure. Must be allocated by user.

C signature

amdsmi_status_t amdsmi_get_gpu_kfd_info(amdsmi_processor_handle processor_handle, amdsmi_kfd_info_t * info)
rocm.bindings.amdsmi.amdsmi_get_gpu_vram_info(processor_handle)#

Returns vram info

@platform{gpu_bm_linux} @platform{host} @platform{guest_1vf} @platform{guest_mvf}

Args:
processor_handle (Pointer/object) – IN:

PF of a processor for which to query

Returns:

A tuple of size 2 that contains (in that order):

  • amdsmi_status_t: amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail

  • amdsmi_vram_info_t:

    Reference to vram info structure Must be allocated by user.

C signature

amdsmi_status_t amdsmi_get_gpu_vram_info(amdsmi_processor_handle processor_handle, amdsmi_vram_info_t * info)
rocm.bindings.amdsmi.amdsmi_get_gpu_board_info(processor_handle)#

Returns the board part number and board information for the requested device

@platform{gpu_bm_linux} @platform{host} @platform{guest_1vf} @platform{guest_mvf}

Args:
processor_handle (Pointer/object) – IN:

Device which to query

Returns:

A tuple of size 2 that contains (in that order):

  • amdsmi_status_t: amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail

  • amdsmi_board_info_t:

    Reference to board info structure. Must be allocated by user.

C signature

amdsmi_status_t amdsmi_get_gpu_board_info(amdsmi_processor_handle processor_handle, amdsmi_board_info_t * info)
rocm.bindings.amdsmi.amdsmi_get_power_cap_info(processor_handle, sensor_ind)#

Returns the power caps as currently configured in the system.

@platform{gpu_bm_linux} @platform{host} @platform{guest_windows}

Args:
processor_handle (Pointer/object) – IN:

Device which to query

sensor_ind (int) – IN:

A 0-based sensor index. Normally, this will be 0. If a device has more than one sensor, it could be greater than 0. Parameter sensor_ind is unused on @platform{host}.

Returns:

A tuple of size 2 that contains (in that order):

C signature

amdsmi_status_t amdsmi_get_power_cap_info(amdsmi_processor_handle processor_handle, uint32_t sensor_ind, amdsmi_power_cap_info_t * info)
rocm.bindings.amdsmi.amdsmi_get_pcie_info(processor_handle)#

Returns the PCIe info for the GPU.

@platform{gpu_bm_linux} @platform{host} @platform{guest_1vf} @platform{guest_windows}

Args:
processor_handle (Pointer/object) – IN:

Device which to query

Returns:

A tuple of size 2 that contains (in that order):

  • amdsmi_status_t: amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail

  • amdsmi_pcie_info_t:

    Reference to the PCIe information returned by the library. Must be allocated by user.

C signature

amdsmi_status_t amdsmi_get_pcie_info(amdsmi_processor_handle processor_handle, amdsmi_pcie_info_t * info)
rocm.bindings.amdsmi.amdsmi_get_gpu_xcd_counter(processor_handle, xcd_count)#

Returns the ‘xcd_counter’ from the GPU metrics associated with the device

@platform{gpu_bm_linux} @platform{guest_1vf} @platform{guest_mvf}

@retval ::AMDSMI_STATUS_SUCCESS is returned upon successful call. ::AMDSMI_STATUS_NOT_SUPPORTED is returned in case the metric unit

does not exist for the given device.

Args:
processor_handle (Pointer/object) – IN:

Device which to query

xcd_count (Pointer/object) – INOUT:

a pointer to uint16_t to which the device gpu metric unit will be stored. Must be allocated by user.

Returns:

A tuple of size 1 that contains (in that order):

C signature

amdsmi_status_t amdsmi_get_gpu_xcd_counter(amdsmi_processor_handle processor_handle, uint16_t * xcd_count)
rocm.bindings.amdsmi.amdsmi_get_npm_info(node_handle)#

Retrieves node power management (NPM) status and power limit for the specified node.

@platform{gpu_bm_linux} @platform{host}

This function queries the NPM controller for the given node and returns whether NPM is enabled, along with the current node-level power limit in Watts. The NPM status and limit are set out-of-band and reported via this API.

Args:
node_handle (Pointer/object) – IN:

Handle to the Node to query.

Returns:

A tuple of size 2 that contains (in that order):

  • amdsmi_status_t: AMDSMI_STATUS_SUCCESS on success, non-zero on failure.

  • amdsmi_npm_info_t:

    Pointer to amdsmi_npm_info_t structure to receive NPM status and limit. Must be allocated by the user.

C signature

amdsmi_status_t amdsmi_get_npm_info(amdsmi_node_handle node_handle, amdsmi_npm_info_t * info)
rocm.bindings.amdsmi.amdsmi_get_fw_info(processor_handle)#

Returns the firmware versions running on the device.

@platform{gpu_bm_linux} @platform{host} @platform{guest_1vf} @platform{guest_mvf} @platform{guest_windows}

Args:
processor_handle (Pointer/object) – IN:

Device which to query

Returns:

A tuple of size 2 that contains (in that order):

  • amdsmi_status_t: amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail

  • amdsmi_fw_info_t:

    Reference to the fw info. Must be allocated by user.

C signature

amdsmi_status_t amdsmi_get_fw_info(amdsmi_processor_handle processor_handle, amdsmi_fw_info_t * info)
rocm.bindings.amdsmi.amdsmi_get_gpu_vbios_info(processor_handle)#

Returns the static information for the vBIOS on the device.

@platform{gpu_bm_linux} @platform{host} @platform{guest_1vf} @platform{guest_mvf} @platform{guest_windows}

Args:
processor_handle (Pointer/object) – IN:

Device which to query

Returns:

A tuple of size 2 that contains (in that order):

  • amdsmi_status_t: amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail

  • amdsmi_vbios_info_t:

    Reference to static vBIOS information. Must be allocated by user.

C signature

amdsmi_status_t amdsmi_get_gpu_vbios_info(amdsmi_processor_handle processor_handle, amdsmi_vbios_info_t * info)
rocm.bindings.amdsmi.amdsmi_get_temp_metric(processor_handle, sensor_type, metric, temperature)#

Get the temperature metric value for the specified metric, from the specified temperature sensor on the specified device. It is not supported on virtual machine guest

@platform{gpu_bm_linux} @platform{host} @platform{guest_windows}

Given a processor handle processor_handle, a sensor type sensor_type, a ::amdsmi_temperature_metric_t metric and a pointer to an int64_t temperature, this function will write the value of the metric indicated by metric and sensor_type to the memory location temperature.

Args:
processor_handle (Pointer/object) – IN:

a processor handle

sensor_type (amdsmi_temperature_type_t) – IN:

part of device from which temperature should be obtained. This should come from the enum ::amdsmi_temperature_type_t

metric (amdsmi_temperature_metric_t) – IN:

enum indicated which temperature value should be retrieved

temperature (PointerToInt64/object) – IN,OUT:

a pointer to int64_t to which the temperature is in Celsius. If this parameter is nullptr, this function will return ::AMDSMI_STATUS_INVAL if the function is supported with the provided, arguments and ::AMDSMI_STATUS_NOT_SUPPORTED if it is not supported with the provided arguments.

Returns:

A tuple of size 1 that contains (in that order):

  • amdsmi_status_t: amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail

C signature

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)
rocm.bindings.amdsmi.amdsmi_get_gpu_activity(processor_handle)#

Returns the current usage of the GPU engines (GFX, MM and MEM). Each usage is reported as a percentage from 0-100%.

@platform{gpu_bm_linux} @platform{host} @platform{guest_windows}

Args:
processor_handle (Pointer/object) – IN:

Device which to query

Returns:

A tuple of size 2 that contains (in that order):

  • amdsmi_status_t: amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail

  • amdsmi_engine_usage_t:

    Reference to the gpu engine usage structure. Must be allocated by user. When gfx_activity is unavailable it is reported as N/A using the sentinel 0x0000FFFF (a uint16_t max value carried in the uint32_t field), not 0xFFFFFFFF.

C signature

amdsmi_status_t amdsmi_get_gpu_activity(amdsmi_processor_handle processor_handle, amdsmi_engine_usage_t * info)
rocm.bindings.amdsmi.amdsmi_get_power_info(processor_handle)#

Returns the current power and voltage of the GPU.

@platform{gpu_bm_linux} @platform{host} @platform{guest_windows}

Note:

amdsmi_power_info_t::socket_power metric can rarely spike above the socket power limit in some cases

Note:

unsupported struct members are set to UINT32_MAX

Args:
processor_handle (Pointer/object) – IN:

PF of a processor for which to query

Returns:

A tuple of size 2 that contains (in that order):

  • amdsmi_status_t: amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail

  • amdsmi_power_info_t:

    Reference to the gpu power structure. Must be allocated by user.

C signature

amdsmi_status_t amdsmi_get_power_info(amdsmi_processor_handle processor_handle, amdsmi_power_info_t * info)
rocm.bindings.amdsmi.amdsmi_is_gpu_power_management_enabled(processor_handle)#

Returns is power management enabled

@platform{gpu_bm_linux} @platform{host}

Args:
processor_handle (Pointer/object) – IN:

PF of a processor for which to query

Returns:

A tuple of size 2 that contains (in that order):

  • amdsmi_status_t: amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail

  • bool:

    Reference to bool. Must be allocated by user.

C signature

amdsmi_status_t amdsmi_is_gpu_power_management_enabled(amdsmi_processor_handle processor_handle, _Bool * enabled)
rocm.bindings.amdsmi.amdsmi_get_clock_info(processor_handle, clk_type)#
Returns the measurements of the clocks in the GPU

for the GFX and multimedia engines and Memory. This call reports the averages over 1s in MHz. It is not supported on virtual machine guest

@platform{gpu_bm_linux} @platform{host} @platform{guest_windows}

Args:
processor_handle (Pointer/object) – IN:

Device which to query

clk_type (amdsmi_clk_type_t) – IN:

Enum representing the clock type to query.

Returns:

A tuple of size 2 that contains (in that order):

  • amdsmi_status_t: amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail

  • amdsmi_clk_info_t:

    Reference to the gpu clock structure. Must be allocated by user.

C signature

amdsmi_status_t amdsmi_get_clock_info(amdsmi_processor_handle processor_handle, amdsmi_clk_type_t clk_type, amdsmi_clk_info_t * info)
rocm.bindings.amdsmi.amdsmi_get_gpu_vram_usage(processor_handle)#

Returns the VRAM usage (both total and used memory) in MegaBytes.

@platform{gpu_bm_linux} @platform{guest_windows}

Args:
processor_handle (Pointer/object) – IN:

Device which to query

Returns:

A tuple of size 2 that contains (in that order):

C signature

amdsmi_status_t amdsmi_get_gpu_vram_usage(amdsmi_processor_handle processor_handle, amdsmi_vram_usage_t * info)
rocm.bindings.amdsmi.amdsmi_get_violation_status(processor_handle)#

Returns the violations for a processor

Warning: API will be slow due to polling driver for 2 samples. Require a minimum wait of 100ms between the 2 samples in order to calculate. Otherwise users would need to use amdsmi_get_gpu_metrics_info for BM. See that API’s struct for calculations.

@platform{gpu_bm_linux}

Args:
processor_handle (Pointer/object) – IN:

Device which to query

Returns:

A tuple of size 2 that contains (in that order):

C signature

amdsmi_status_t amdsmi_get_violation_status(amdsmi_processor_handle processor_handle, amdsmi_violation_status_t * info)
rocm.bindings.amdsmi.amdsmi_get_gpu_process_list(processor_handle, max_processes, list)#
Returns the list of process information running on a given GPU.

If pdh.dll is not present on the system, this API returns AMDSMI_STATUS_NOT_SUPPORTED. Sum of the process memory is not expected to be the total memory

usage.

@platform{gpu_bm_linux} @platform{guest_windows}

Warning:

IMPORTANT: To get valid return values, at least 1 second needs to pass from starting the program to the first call of this function, and before every following call of this function after that, to get correct values

Note:

The user provides a buffer to store the list and the maximum number of processes that can be returned. If the user sets max_processes to 0, the current total number of processes will replace max_processes param. After that, the function needs to be called again, with updated max_processes, to successfully fill the process list, which was previously allocated with max_processes

Note:

If the reserved size for processes is smaller than the number of actual processes running. The AMDSMI_STATUS_OUT_OF_RESOURCES is an indication the caller should handle the situation (resize). The max_processes is always changed to reflect the actual size of list of processes running, so the caller knows where it is at.

For cases where max_process is not zero (0), it specifies the list’s size limit.

That is, the maximum size this list will be able to hold. After the list is

built internally, as a return status, we will have AMDSMI_STATUS_OUT_OF_RESOURCES when the original size limit is smaller than the actual list of processes running. Hence, the caller is aware the list size needs to be resized, or AMDSMI_STATUS_SUCCESS otherwise. Holding a copy of max_process before it is passed in will be helpful for monitoring the allocations done upon each call since the max_process will permanently be changed to reflect the actual number of processes running.

Args:
processor_handle (Pointer/object) – IN:

Device which to query

max_processes (PointerToUnsigned/object) – IN,OUT:

Reference to the size of the list buffer in number of elements. Returns the return number of elements in list or the number of running processes if equal to 0, and if given value in param max_processes is less than number of processes currently running, AMDSMI_STATUS_OUT_OF_RESOURCES will be returned.

list (amdsmi_proc_info_t/object) – OUT:

Reference to a user-provided buffer where the process list will be returned. This buffer must contain at least max_processes entries of type amd_proc_info_list_t. Must be allocated by user.

Returns:

A tuple of size 1 that contains (in that order):

  • amdsmi_status_t: amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success,
    ::AMDSMI_STATUS_OUT_OF_RESOURCES, filled list buffer with data, but

    number of actual running processes is larger than the size provided.

C signature

amdsmi_status_t amdsmi_get_gpu_process_list(amdsmi_processor_handle processor_handle, uint32_t * max_processes, amdsmi_proc_info_t * list)
rocm.bindings.amdsmi.amdsmi_get_gpu_process_list_by_pid(processor_handles, num_processors, max_processes)#

Get the list of processes running on one or more GPUs, grouped by PID.

Aggregates per-GPU process lists across all provided processor handles and returns one entry per unique PID. Each entry contains the per-GPU breakdown for every GPU that PID is active on. Results are sorted ascending by PID.

@platform{gpu_bm_linux}

Args:
processor_handles (ListOfPointer/object) – IN:

Array of processor handles to query

num_processors (int) – IN:

Number of handles in processor_handles

max_processes (PointerToUnsigned/object) – IN,OUT:

On input: capacity of procs. On output: number of unique PIDs written (or required if procs is NULL).

Returns:

A tuple of size 2 that contains (in that order):

  • amdsmi_status_t: amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success,
    ::AMDSMI_STATUS_OUT_OF_RESOURCES if max_processes was too small,
    ::AMDSMI_STATUS_INVAL if processor_handles is NULL or num_processors

    is 0

  • amdsmi_proc_info_by_pid_t:

    Caller-allocated buffer of amdsmi_proc_info_by_pid_t. Pass NULL to query the required size via max_processes.

C signature

amdsmi_status_t amdsmi_get_gpu_process_list_by_pid(amdsmi_processor_handle * processor_handles, uint32_t num_processors, amdsmi_proc_info_by_pid_t * procs, uint32_t * max_processes)
rocm.bindings.amdsmi.amdsmi_get_gpu_ptl_state(processor_handle)#

Get PTL enable/disable state

@platform{gpu_bm_linux} @platform{host}

This function retrieves whether PTL (Peak Tops Limiter) is currently enabled or disabled for the specified processor. This is a simple state query that returns the current PTL operational state without detailed configuration.

Args:
processor_handle (Pointer/object) – IN:

Device which to query

Returns:

A tuple of size 2 that contains (in that order):

  • amdsmi_status_t: amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success,

    ::AMDSMI_STATUS_NOT_SUPPORTED if PTL is not supported on this device, non-zero on other failures

  • bool:

    Pointer to boolean that will be set to true if PTL is enabled, false if PTL is disabled

C signature

amdsmi_status_t amdsmi_get_gpu_ptl_state(amdsmi_processor_handle processor_handle, _Bool * enabled)
rocm.bindings.amdsmi.amdsmi_set_gpu_ptl_state(processor_handle, enable)#

Set PTL enable/disable state

@platform{gpu_bm_linux} @platform{host}

This function enables or disables PTL (Peak Tops Limiter) operation. Use amdsmi_set_gpu_ptl_enable_with_formats() for more control over the preferred data formats when enabling.

Args:
processor_handle (Pointer/object) – IN:

Device to configure

enable (bint) – IN:

Boolean flag: true to enable PTL with default formats, false to disable PTL

Returns:

A tuple of size 1 that contains (in that order):

  • amdsmi_status_t: amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail

C signature

amdsmi_status_t amdsmi_set_gpu_ptl_state(amdsmi_processor_handle processor_handle, _Bool enable)
rocm.bindings.amdsmi.amdsmi_get_gpu_ptl_formats(processor_handle)#

Get PTL (Peak Tops Limiter) formats for the processor

@platform{gpu_bm_linux} @platform{host}

This function retrieves the current PTL formats for the specified processor. PTL prevents the product to never deliver more than a specified TOPS/second. If function returns 0 for both formats, PTL was never enabled before on that system

Args:
processor_handle (Pointer/object) – IN:

Device which to query

Returns:

A tuple of size 3 that contains (in that order):

  • amdsmi_status_t: amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success,

    ::AMDSMI_STATUS_NOT_SUPPORTED if PTL is not supported on this device, non-zero on other failures

  • amdsmi_ptl_data_format_t:

    Pointer to first preferred data format that receives peak performance

  • amdsmi_ptl_data_format_t:

    Pointer to second preferred data format that receives peak performance

C signature

amdsmi_status_t amdsmi_get_gpu_ptl_formats(amdsmi_processor_handle processor_handle, amdsmi_ptl_data_format_t * data_format1, amdsmi_ptl_data_format_t * data_format2)
rocm.bindings.amdsmi.amdsmi_set_gpu_ptl_formats(processor_handle, data_format1, data_format2)#

Set PTL with specified preferred data formats

@platform{gpu_bm_linux} @platform{host}

This function sets PTL with the specified preferred data format pair. PTL must be enabled first before calling this function using amdsmi_set_gpu_ptl_state. The two specified formats will receive accurate performance monitoring and peak performance. F8 and XF32 formats always receive peak performance regardless of this setting.

Args:
processor_handle (Pointer/object) – IN:

Device to configure

data_format1 (amdsmi_ptl_data_format_t) – IN:

First preferred data format (must be from the limited set: I8, F16, BF16, F32, F64)

data_format2 (amdsmi_ptl_data_format_t) – IN:

Second preferred data format (must be from the limited set: I8, F16, BF16, F32, F64, and different from data_format1)

Returns:

A tuple of size 1 that contains (in that order):

  • amdsmi_status_t: amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success,

    ::AMDSMI_STATUS_NOT_SUPPORTED if PTL is not supported on this device, non-zero on other failures

C signature

amdsmi_status_t amdsmi_set_gpu_ptl_formats(amdsmi_processor_handle processor_handle, amdsmi_ptl_data_format_t data_format1, amdsmi_ptl_data_format_t data_format2)
rocm.bindings.amdsmi.amdsmi_get_cpu_handles(cpu_count, processor_handles)#

Get the list of cpu handles in the system.

@platform{cpu_bm}

Depends on AMDSMI_INIT_AMD_CPUS flag passed to ::amdsmi_init. The processor handles can be used in other APIs to get processor detail information.

Args:
cpu_count (PointerToUnsigned/object) – IN,OUT:

As input, the value passed through this parameter is the number of ::amdsmi_processor_handle that may be safely written to the memory pointed to by processor_handles. This is the limit on how many processor handles will be written to processor_handles. On return, socket_count will contain the number of processor handles written to processor_handles, or the number of processor handles that could have been written if enough memory had been provided. If processor_handles is NULL, as output, cpu_count will contain how many processors are available to read in the system.

processor_handles (ListOfPointer/object) – IN,OUT:

A pointer to a block of memory to which the ::amdsmi_processor_handle values will be written. This value may be NULL. In this case, this function can be used to query how many processors are available to read in the system.

Returns:

A tuple of size 1 that contains (in that order):

  • amdsmi_status_t: amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail

C signature

amdsmi_status_t amdsmi_get_cpu_handles(uint32_t * cpu_count, amdsmi_processor_handle * processor_handles)
rocm.bindings.amdsmi.amdsmi_get_cpucore_handles(cores_count, processor_handles)#

Get the list of the cpu core handles in a system.

@platform{cpu_bm}

This function retrieves the cpu core handles of a system.

Args:
cores_count (PointerToUnsigned/object) – IN,OUT:

As input, the value passed through this parameter is the number of ::amdsmi_processor_handle’s that may be safely written to the memory pointed to by processor_handles. This is the limit on how many core handles will be written to processor_handles. On return, cores_count will contain the number of core processor handles written to processor_handles, or the number of core processor handles that could have been written if enough memory had been provided. If processor_handles is NULL, as output, processor_count will contain how many cpu cores are available to read in the system.

processor_handles (ListOfPointer/object) – IN,OUT:

A pointer to a block of memory to which the ::amdsmi_processor_handle values will be written. This value may be NULL. In this case, this function can be used to query how many processors are available to read.

Returns:

A tuple of size 1 that contains (in that order):

  • amdsmi_status_t: amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail

C signature

amdsmi_status_t amdsmi_get_cpucore_handles(uint32_t * cores_count, amdsmi_processor_handle * processor_handles)
rocm.bindings.amdsmi.amdsmi_get_cpu_core_energy(processor_handle, penergy)#

Get the core energy for a given core.

@platform{cpu_bm}

Args:
processor_handle (Pointer/object) – IN:

Cpu core which to query

penergy (PointerToUInt64/object) – IN,OUT:
  • Input buffer to return the core energy

Returns:

A tuple of size 1 that contains (in that order):

  • amdsmi_status_t: amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail

C signature

amdsmi_status_t amdsmi_get_cpu_core_energy(amdsmi_processor_handle processor_handle, uint64_t * penergy)
rocm.bindings.amdsmi.amdsmi_get_cpu_socket_energy(processor_handle, penergy)#

Get the socket energy for a given socket.

@platform{cpu_bm}

Args:
processor_handle (Pointer/object) – IN:

Cpu socket which to query

penergy (PointerToUInt64/object) – IN,OUT:
  • Input buffer to return the socket energy

Returns:

A tuple of size 1 that contains (in that order):

  • amdsmi_status_t: amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail

C signature

amdsmi_status_t amdsmi_get_cpu_socket_energy(amdsmi_processor_handle processor_handle, uint64_t * penergy)
rocm.bindings.amdsmi.amdsmi_get_threads_per_core(threads_per_core)#

Get Number of threads Per Core.

@platform{cpu_bm}

Args:
threads_per_core (PointerToUnsigned/object) – IN,OUT:
  • Input buffer to return the Number of threads Per Core

Returns:

A tuple of size 1 that contains (in that order):

  • amdsmi_status_t: amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail

C signature

amdsmi_status_t amdsmi_get_threads_per_core(uint32_t * threads_per_core)
rocm.bindings.amdsmi.amdsmi_get_cpu_hsmp_driver_version(processor_handle, amdsmi_hsmp_driver_ver)#

Get HSMP Driver Version.

@platform{cpu_bm}

Args:
processor_handle (Pointer/object) – IN:

Cpu socket which to query

amdsmi_hsmp_driver_ver (amdsmi_hsmp_driver_version_t/object) – IN,OUT:
  • Input buffer to return the HSMP Driver version

Returns:

A tuple of size 1 that contains (in that order):

  • amdsmi_status_t: amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail

C signature

amdsmi_status_t amdsmi_get_cpu_hsmp_driver_version(amdsmi_processor_handle processor_handle, amdsmi_hsmp_driver_version_t * amdsmi_hsmp_driver_ver)
rocm.bindings.amdsmi.amdsmi_get_cpu_smu_fw_version(processor_handle, amdsmi_smu_fw)#

Get SMU Firmware Version.

@platform{cpu_bm}

Args:
processor_handle (Pointer/object) – IN:

Cpu socket which to query

amdsmi_smu_fw (amdsmi_smu_fw_version_t/object) – IN,OUT:
  • Input buffer to return the firmware version

Returns:

A tuple of size 1 that contains (in that order):

  • amdsmi_status_t: amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail

C signature

amdsmi_status_t amdsmi_get_cpu_smu_fw_version(amdsmi_processor_handle processor_handle, amdsmi_smu_fw_version_t * amdsmi_smu_fw)
rocm.bindings.amdsmi.amdsmi_get_cpu_hsmp_proto_ver(processor_handle, proto_ver)#

Get HSMP protocol Version.

@platform{cpu_bm}

Args:
processor_handle (Pointer/object) – IN:

Cpu socket which to query

proto_ver (PointerToUnsigned/object) – IN,OUT:
  • Input buffer to return the protocol version

Returns:

A tuple of size 1 that contains (in that order):

  • amdsmi_status_t: amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail

C signature

amdsmi_status_t amdsmi_get_cpu_hsmp_proto_ver(amdsmi_processor_handle processor_handle, uint32_t * proto_ver)
rocm.bindings.amdsmi.amdsmi_get_cpu_prochot_status(processor_handle, prochot)#

Get normalized status of the processor’s PROCHOT status.

@platform{cpu_bm}

Args:
processor_handle (Pointer/object) – IN:

Cpu socket which to query

prochot (PointerToUnsigned/object) – IN,OUT:
  • Input buffer to return the procohot status.

Returns:

A tuple of size 1 that contains (in that order):

  • amdsmi_status_t: amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail

C signature

amdsmi_status_t amdsmi_get_cpu_prochot_status(amdsmi_processor_handle processor_handle, uint32_t * prochot)
rocm.bindings.amdsmi.amdsmi_get_cpu_fclk_mclk(processor_handle, fclk, mclk)#

Get Data fabric clock and Memory clock in MHz.

@platform{cpu_bm}

Args:
processor_handle (Pointer/object) – IN:

Cpu socket which to query

fclk (PointerToUnsigned/object) – IN,OUT:
  • Input buffer to return fclk

mclk (PointerToUnsigned/object) – IN,OUT:
  • Input buffer to return mclk

Returns:

A tuple of size 1 that contains (in that order):

  • amdsmi_status_t: amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail

C signature

amdsmi_status_t amdsmi_get_cpu_fclk_mclk(amdsmi_processor_handle processor_handle, uint32_t * fclk, uint32_t * mclk)
rocm.bindings.amdsmi.amdsmi_get_cpu_cclk_limit(processor_handle, cclk)#

Get core clock in MHz.

@platform{cpu_bm}

Args:
processor_handle (Pointer/object) – IN:

Cpu socket which to query

cclk (PointerToUnsigned/object) – IN,OUT:
  • Input buffer to return core clock

Returns:

A tuple of size 1 that contains (in that order):

  • amdsmi_status_t: amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail

C signature

amdsmi_status_t amdsmi_get_cpu_cclk_limit(amdsmi_processor_handle processor_handle, uint32_t * cclk)
rocm.bindings.amdsmi.amdsmi_get_cpu_socket_current_active_freq_limit(processor_handle, freq, src_type)#

Get current active frequency limit of the socket.

@platform{cpu_bm}

Args:
processor_handle (Pointer/object) – IN:

Cpu socket which to query

freq (Pointer/object) – IN,OUT:
  • Input buffer to return frequency value in MHz

src_type (Pointer/object) – IN,OUT:
  • Input buffer to return frequency source name

Returns:

A tuple of size 1 that contains (in that order):

  • amdsmi_status_t: amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail

C signature

amdsmi_status_t amdsmi_get_cpu_socket_current_active_freq_limit(amdsmi_processor_handle processor_handle, uint16_t * freq, char ** src_type)
rocm.bindings.amdsmi.amdsmi_get_cpu_socket_freq_range(processor_handle, fmax, fmin)#

Get socket frequency range.

@platform{cpu_bm}

Args:
processor_handle (Pointer/object) – IN:

Cpu socket which to query

fmax (Pointer/object) – IN,OUT:
  • Input buffer to return maximum frequency

fmin (Pointer/object) – IN,OUT:
  • Input buffer to return minimum frequency

Returns:

A tuple of size 1 that contains (in that order):

  • amdsmi_status_t: amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail

C signature

amdsmi_status_t amdsmi_get_cpu_socket_freq_range(amdsmi_processor_handle processor_handle, uint16_t * fmax, uint16_t * fmin)
rocm.bindings.amdsmi.amdsmi_get_cpu_core_current_freq_limit(processor_handle, freq)#

Get socket frequency limit of the core.

@platform{cpu_bm}

Args:
processor_handle (Pointer/object) – IN:

Cpu core which to query

freq (PointerToUnsigned/object) – IN,OUT:
  • Input buffer to return frequency.

Returns:

A tuple of size 1 that contains (in that order):

  • amdsmi_status_t: amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail

C signature

amdsmi_status_t amdsmi_get_cpu_core_current_freq_limit(amdsmi_processor_handle processor_handle, uint32_t * freq)
rocm.bindings.amdsmi.amdsmi_set_cpu_rail_isofreq_policy(processor_handle, rail_isofreq_policy)#

Set CPU rail isolated frequency policy for independent core clock control per power rail

This API configures the frequency policy for CPU power rails.
  • If a socket-wide limit (e.g., PPT) is setting the core clock frequency, this setting has no

effect.
  • For other limiters specific to CPU power rails (e.g., TDC), this policy enables or disables independent core clocks per rail (VDDCR_CPU0 or VDDCR_CPU1).

Policy values: - 0: Disable independent control (all cores on both rails have the same frequency limit) - 1: Enable independent control (each rail has an independent frequency limit)

@platform{cpu_bm}

par

t

Args:
processor_handle (Pointer/object) – IN:

socket which to query

@

rail_isofreq_policy (Pointer/object) – IN,OUT:
put buffer to store policy value, indicating the CPU

rail ISO frequency Policy setting:

  • 0: Disable independent control - each rail has its own independent

    frequency limit.

  • 1: Enable independent control - all cores on both rails share the same

    frequency limit.

@re

Returns:

A tuple of size 1 that contains (in that order):

  • amdsmi_status_t: mdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail

C signature

amdsmi_status_t amdsmi_set_cpu_rail_isofreq_policy(amdsmi_processor_handle processor_handle, _Bool * rail_isofreq_policy)
rocm.bindings.amdsmi.amdsmi_get_cpu_rail_isofreq_policy(processor_handle, rail_isofreq_policy)#

Get CPU rail isolated frequency policy status for independent core clock control per power rail.

This API retrieves the current frequency policy configuration for CPU power rails.
  • If a socket-wide limit (e.g., PPT) is setting the core clock frequency, the effective policy

may be overridden.
  • For other limiters specific to CPU power rails (e.g., TDC), this policy indicates whether independent core clocks per rail (VDDCR_CPU0 or VDDCR_CPU1) are

enabled or disabled.

Policy values returned: - 0: Independent control disabled (all cores on both rails have the same frequency limit) - 1: Independent control enabled (each rail has an independent frequency limit)

@platform{cpu_bm}

Args:
processor_handle (Pointer/object) – IN:

Cpu socket which to query

rail_isofreq_policy (Pointer/object) – IN,OUT:
  • Input buffer to receive the current cpu rail isolated

frequency policy

Returns:

A tuple of size 1 that contains (in that order):

  • amdsmi_status_t: amdsmi_status_t

    ::AMDSMI_STATUS_SUCCESS on success, non-zero on failure

C signature

amdsmi_status_t amdsmi_get_cpu_rail_isofreq_policy(amdsmi_processor_handle processor_handle, uint8_t * rail_isofreq_policy)
rocm.bindings.amdsmi.amdsmi_set_cpu_dfc_ctrl(processor_handle, dfc_ctrl)#

Set the DFCState enabling control.

DFCState control values for setting: - 0: Disable DFC control - 1: Enable DFC control

@platform{cpu_bm}

par

ret

Args:
processor_handle (Pointer/object) – IN:

socket handle to query

@

dfc_ctrl (Pointer/object) – IN:

put buffer indicating whether to enable (1) or disable (0) DFCState control

@

Returns:

A tuple of size 1 that contains (in that order):

  • amdsmi_status_t: mdsmi_status_t

    ::AMDSMI_STATUS_SUCCESS on success, non-zero on failure

C signature

amdsmi_status_t amdsmi_set_cpu_dfc_ctrl(amdsmi_processor_handle processor_handle, uint8_t * dfc_ctrl)
rocm.bindings.amdsmi.amdsmi_get_cpu_dfc_ctrl(processor_handle, dfc_ctrl)#

Get the current DFCState enabling control status.

Returned DFCState control values: - 0: DFC control is disabled - 1: DFC control is enabled

@platform{cpu_bm}

Args:
processor_handle (Pointer/object) – IN:

Cpu socket handle to query

dfc_ctrl (Pointer/object) – IN,OUT:
  • Input buffer to receive the current DFCState control status

Returns:

A tuple of size 1 that contains (in that order):

  • amdsmi_status_t: amdsmi_status_t

    ::AMDSMI_STATUS_SUCCESS on success, non-zero on failure

C signature

amdsmi_status_t amdsmi_get_cpu_dfc_ctrl(amdsmi_processor_handle processor_handle, uint8_t * dfc_ctrl)
rocm.bindings.amdsmi.amdsmi_get_cpu_core_boostlimit(processor_handle, pboostlimit)#

Get the core boost limit.

@platform{cpu_bm}

Args:
processor_handle (Pointer/object) – IN:

Cpu core which to query

pboostlimit (PointerToUnsigned/object) – IN,OUT:
  • Input buffer to fill the boostlimit value

Returns:

A tuple of size 1 that contains (in that order):

  • amdsmi_status_t: amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail

C signature

amdsmi_status_t amdsmi_get_cpu_core_boostlimit(amdsmi_processor_handle processor_handle, uint32_t * pboostlimit)
rocm.bindings.amdsmi.amdsmi_get_cpu_socket_c0_residency(processor_handle, pc0_residency)#

Get the socket c0 residency.

@platform{cpu_bm}

Args:
processor_handle (Pointer/object) – IN:

Cpu socket which to query

pc0_residency (PointerToUnsigned/object) – IN,OUT:
  • Input buffer to fill the c0 residency value

Returns:

A tuple of size 1 that contains (in that order):

  • amdsmi_status_t: amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail

C signature

amdsmi_status_t amdsmi_get_cpu_socket_c0_residency(amdsmi_processor_handle processor_handle, uint32_t * pc0_residency)
rocm.bindings.amdsmi.amdsmi_set_cpu_core_boostlimit(processor_handle, boostlimit)#

Set the core boostlimit value.

@platform{cpu_bm}

Args:
processor_handle (Pointer/object) – IN:

Cpu core which to query

boostlimit (int) – IN:
  • boostlimit value to be set

Returns:

A tuple of size 1 that contains (in that order):

  • amdsmi_status_t: amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail

C signature

amdsmi_status_t amdsmi_set_cpu_core_boostlimit(amdsmi_processor_handle processor_handle, uint32_t boostlimit)
rocm.bindings.amdsmi.amdsmi_set_cpu_socket_boostlimit(processor_handle, boostlimit)#

Set the socket boostlimit value.

@platform{cpu_bm}

Args:
processor_handle (Pointer/object) – IN:

Cpu socket which to query

boostlimit (int) – IN:
  • boostlimit value to be set

Returns:

A tuple of size 1 that contains (in that order):

  • amdsmi_status_t: amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail

C signature

amdsmi_status_t amdsmi_set_cpu_socket_boostlimit(amdsmi_processor_handle processor_handle, uint32_t boostlimit)
rocm.bindings.amdsmi.amdsmi_get_cpu_core_floor_freq_limit(processor_handle, floor_freq)#

Get the CPU core floor limit frequency.

This function retrieves the floor frequency limit for the specified CPU core.

@platform{cpu_bm}

Args:
processor_handle (Pointer/object) – IN:

CPU core which to query

floor_freq (PointerToUnsigned/object) – IN,OUT:
  • Input buffer to fill the floor limit frequency in MHz

Returns:

A tuple of size 1 that contains (in that order):

  • amdsmi_status_t: amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail

C signature

amdsmi_status_t amdsmi_get_cpu_core_floor_freq_limit(amdsmi_processor_handle processor_handle, uint32_t * floor_freq)
rocm.bindings.amdsmi.amdsmi_get_cpu_floor_freq_limit(processor_handle, floor_freq)#

Get the CPU floor limit frequency.

This function retrieves the floor frequency limit for the specified CPU socket.

@platform{cpu_bm}

Args:
processor_handle (Pointer/object) – IN:

CPU socket which to query

floor_freq (PointerToUnsigned/object) – IN,OUT:
  • Input buffer to fill the floor limit frequency in MHz

Returns:

A tuple of size 1 that contains (in that order):

  • amdsmi_status_t: amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail

C signature

amdsmi_status_t amdsmi_get_cpu_floor_freq_limit(amdsmi_processor_handle processor_handle, uint32_t * floor_freq)
rocm.bindings.amdsmi.amdsmi_get_cpu_core_eff_floor_freq_limit(processor_handle, eff_floor_freq)#

Get the CPU core effective floor limit frequency.

This function returns the effective floor frequency limit for the specified CPU core.

@platform{cpu_bm}

Args:
processor_handle (Pointer/object) – IN:

CPU core which to query

eff_floor_freq (PointerToUnsigned/object) – IN,OUT:
  • Input buffer to fill the effective floor limit frequency in MHz

Returns:

A tuple of size 1 that contains (in that order):

  • amdsmi_status_t: amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail

C signature

amdsmi_status_t amdsmi_get_cpu_core_eff_floor_freq_limit(amdsmi_processor_handle processor_handle, uint32_t * eff_floor_freq)
rocm.bindings.amdsmi.amdsmi_get_cpu_eff_floor_freq_limit(processor_handle, eff_floor_freq)#

Get the CPU effective floor limit frequency.

This function returns the effective floor frequency limit for the specified CPU socket.

@platform{cpu_bm}

Args:
processor_handle (Pointer/object) – IN:

CPU socket which to query

eff_floor_freq (PointerToUnsigned/object) – IN,OUT:
  • Input buffer to fill the effective floor limit frequency in MHz

Returns:

A tuple of size 1 that contains (in that order):

  • amdsmi_status_t: amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail

C signature

amdsmi_status_t amdsmi_get_cpu_eff_floor_freq_limit(amdsmi_processor_handle processor_handle, uint32_t * eff_floor_freq)
rocm.bindings.amdsmi.amdsmi_set_cpu_core_floor_freq_limit(processor_handle, floor_freq)#

Set the CPU core floor limit frequency.

This function sets the floor frequency limit for the specified CPU core.

@platform{cpu_bm}

Args:
processor_handle (Pointer/object) – IN:

CPU core which to set

floor_freq (int) – IN:
  • floor limit frequency value to be set in MHz

Returns:

A tuple of size 1 that contains (in that order):

  • amdsmi_status_t: amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail

C signature

amdsmi_status_t amdsmi_set_cpu_core_floor_freq_limit(amdsmi_processor_handle processor_handle, uint32_t floor_freq)
rocm.bindings.amdsmi.amdsmi_set_cpu_floor_freq_limit(processor_handle, floor_freq)#

Set the CPU socket floor limit frequency.

This function sets the floor frequency limit for the specified CPU socket.

@platform{cpu_bm}

Args:
processor_handle (Pointer/object) – IN:

CPU socket which to set

floor_freq (int) – IN:
  • floor limit frequency value to be set in MHz

Returns:

A tuple of size 1 that contains (in that order):

  • amdsmi_status_t: amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail

C signature

amdsmi_status_t amdsmi_set_cpu_floor_freq_limit(amdsmi_processor_handle processor_handle, uint32_t floor_freq)
rocm.bindings.amdsmi.amdsmi_set_cpu_msr_floor_freq_limit(processor_handle, msr_floor_freq)#

Set CPU floor limit frequency via MSR(Model Specific Register).

This function sets the floor frequency limit via MSR(Model Specific Register) for the specified CPU socket.

@platform{cpu_bm}

Args:
processor_handle (Pointer/object) – IN:

CPU socket which to set

msr_floor_freq (int) – IN:
  • MSR floor limit frequency value to be set in MHz

Returns:

A tuple of size 1 that contains (in that order):

  • amdsmi_status_t: amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail

C signature

amdsmi_status_t amdsmi_set_cpu_msr_floor_freq_limit(amdsmi_processor_handle processor_handle, uint32_t msr_floor_freq)
rocm.bindings.amdsmi.amdsmi_set_cpu_core_msr_floor_freq_limit(processor_handle, msr_floor_freq)#

Set CPU core MSR floor limit frequency.

This function sets the MSR floor frequency limit for the specified CPU core.

@platform{cpu_bm}

Args:
processor_handle (Pointer/object) – IN:

CPU core which to set

msr_floor_freq (int) – IN:
  • MSR floor limit frequency value to be set in MHz

Returns:

A tuple of size 1 that contains (in that order):

  • amdsmi_status_t: amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail

C signature

amdsmi_status_t amdsmi_set_cpu_core_msr_floor_freq_limit(amdsmi_processor_handle processor_handle, uint32_t msr_floor_freq)
rocm.bindings.amdsmi.amdsmi_get_cpu_freq_range()#

Get the CPU socket frequency range.

This function retrieves frequency limit range for CPU socket 0.

@platform{cpu_bm}

Returns:

A tuple of size 3 that contains (in that order):

  • amdsmi_status_t: amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail

  • int:
    • Output buffer to retrieve maximum frequency in MHz

  • int:
    • Output buffer to retrieve minimum frequency in MHz

C signature

amdsmi_status_t amdsmi_get_cpu_freq_range(uint32_t * fmax, uint32_t * fmin)
rocm.bindings.amdsmi.amdsmi_set_cpu_sdps_limit(processor_handle, sdps_limit)#

Set the SDPS(Socket DIMM Power Sloshing) limit for a given processor socket.

@platform{cpu_bm}

Args:
processor_handle (Pointer/object) – IN:

Processor handle for which to set the limit

sdps_limit (int) – IN:
  • SDPS limit value in milliwatts

Returns:

A tuple of size 1 that contains (in that order):

  • amdsmi_status_t: amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail

C signature

amdsmi_status_t amdsmi_set_cpu_sdps_limit(amdsmi_processor_handle processor_handle, uint32_t sdps_limit)
rocm.bindings.amdsmi.amdsmi_get_cpu_sdps_limit(processor_handle)#

Get the current SDPS limit for a given processor socket.

@platform{cpu_bm}

Args:
processor_handle (Pointer/object) – IN:

Processor handle for which to query the limit

Returns:

A tuple of size 2 that contains (in that order):

  • amdsmi_status_t: amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail

  • int:
    • Input buffer to receive the current SDPS limit value in

    milliwatts (mW)

C signature

amdsmi_status_t amdsmi_get_cpu_sdps_limit(amdsmi_processor_handle processor_handle, uint32_t * sdps_limit)
rocm.bindings.amdsmi.amdsmi_get_cpu_ddr_bw(processor_handle, ddr_bw)#

Get the DDR bandwidth data.

@platform{cpu_bm}

Args:
processor_handle (Pointer/object) – IN:

Cpu socket which to query

ddr_bw (amdsmi_ddr_bw_metrics_t/object) – IN,OUT:
  • Input buffer to fill ddr bandwidth data

Returns:

A tuple of size 1 that contains (in that order):

  • amdsmi_status_t: amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail

C signature

amdsmi_status_t amdsmi_get_cpu_ddr_bw(amdsmi_processor_handle processor_handle, amdsmi_ddr_bw_metrics_t * ddr_bw)
rocm.bindings.amdsmi.amdsmi_get_cpu_socket_temperature(processor_handle, ptmon)#

Get socket temperature.

@platform{cpu_bm}

Args:
processor_handle (Pointer/object) – IN:

Cpu socket which to query

ptmon (PointerToUnsigned/object) – IN,OUT:
  • Input buffer to fill temperature value

Returns:

A tuple of size 1 that contains (in that order):

  • amdsmi_status_t: amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail

C signature

amdsmi_status_t amdsmi_get_cpu_socket_temperature(amdsmi_processor_handle processor_handle, uint32_t * ptmon)
rocm.bindings.amdsmi.amdsmi_get_cpu_tdelta(processor_handle)#

Read Thermal Delta (TDELTA) Behavior

This API retrieves the thermal solution behavior value from the CPU socket

Thermal Behavior values returned: - 0: Thermal solution behavior is normal (operating within expected thermal range) - 1 or any other value: Thermal solution is out of expected range (thermal stress detected)

@platform{cpu_bm}

Args:
processor_handle (Pointer/object) – IN:

CPU socket handle to query

Returns:

A tuple of size 2 that contains (in that order):

  • amdsmi_status_t: ccessful register read, non-zero on failure

  • int:
    • input buffer to store the thermal delta behavior value:
      • 0: Normal thermal solution behavior

      • Non-zero: Thermal solution out of expected range

    @return ::amdsmi_status_t

    ::AMDSMI_STATUS_SUCCES

C signature

amdsmi_status_t amdsmi_get_cpu_tdelta(amdsmi_processor_handle processor_handle, uint8_t * tdelta)
rocm.bindings.amdsmi.amdsmi_get_cpu_svi3_vr_controller_temp(processor_handle, rail_selection, rail_index)#

Get Temperature of SVI3 VR(Voltage Rail)

This API retrieves the temperature of SVI3 voltage regulator

@platform{cpu_bm}

Args:
processor_handle (Pointer/object) – IN:

CPU socket handle to query

rail_selection (PointerToUnsigned/object) – IN,OUT:
  • Input buffer to to store rail_selection, rail_selection:

0=HottestRail, 1=IndividualRail

rail_index (PointerToUnsigned/object) – IN,OUT:
  • Input buffer to store rail_index, rail_index must be given when

rail_selection = 1 rail_index: 0->VDDCR_CPU0,1->VDDCR_CPU1,2->VDDCR_SOC,3->VDDIO,4->VDDIO_MEM_S3

Returns:

A tuple of size 2 that contains (in that order):

  • amdsmi_status_t: amdsmi_status_t

    ::AMDSMI_STATUS_SUCCESS on successful temperature read, non-zero on failure

  • int:
    • Output buffer to retrieve the temperature value

C signature

amdsmi_status_t amdsmi_get_cpu_svi3_vr_controller_temp(amdsmi_processor_handle processor_handle, uint32_t * rail_selection, uint32_t * rail_index, uint32_t * temp)
rocm.bindings.amdsmi.amdsmi_get_cpu_dimm_temp_range_and_refresh_rate(processor_handle, dimm_addr, rate)#

Get DIMM temperature range and refresh rate.

@platform{cpu_bm}

Args:
processor_handle (Pointer/object) – IN:

Cpu socket which to query

dimm_addr (int) – IN:
  • DIMM address

rate (amdsmi_temp_range_refresh_rate_t/object) – IN,OUT:
  • Input buffer to fill temperature range and refresh rate value

Returns:

A tuple of size 1 that contains (in that order):

  • amdsmi_status_t: amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail

C signature

amdsmi_status_t amdsmi_get_cpu_dimm_temp_range_and_refresh_rate(amdsmi_processor_handle processor_handle, uint8_t dimm_addr, amdsmi_temp_range_refresh_rate_t * rate)
rocm.bindings.amdsmi.amdsmi_get_cpu_dimm_power_consumption(processor_handle, dimm_addr, dimm_pow)#

Get DIMM power consumption.

@platform{cpu_bm}

Args:
processor_handle (Pointer/object) – IN:

Cpu socket which to query

dimm_addr (int) – IN:
  • DIMM address

dimm_pow (amdsmi_dimm_power_t/object) – IN,OUT:
  • Input buffer to fill power consumption value

Returns:

A tuple of size 1 that contains (in that order):

  • amdsmi_status_t: amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail

C signature

amdsmi_status_t amdsmi_get_cpu_dimm_power_consumption(amdsmi_processor_handle processor_handle, uint8_t dimm_addr, amdsmi_dimm_power_t * dimm_pow)
rocm.bindings.amdsmi.amdsmi_get_cpu_dimm_thermal_sensor(processor_handle, dimm_addr, dimm_temp)#

Get DIMM thermal sensor value.

@platform{cpu_bm}

Args:
processor_handle (Pointer/object) – IN:

Cpu socket which to query

dimm_addr (int) – IN:
  • DIMM address

dimm_temp (amdsmi_dimm_thermal_t/object) – IN,OUT:
  • Input buffer to fill temperature value

Returns:

A tuple of size 1 that contains (in that order):

  • amdsmi_status_t: amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail

C signature

amdsmi_status_t amdsmi_get_cpu_dimm_thermal_sensor(amdsmi_processor_handle processor_handle, uint8_t dimm_addr, amdsmi_dimm_thermal_t * dimm_temp)
rocm.bindings.amdsmi.amdsmi_get_cpu_dimm_sb_reg(processor_handle, dimm_addr, lid, reg_offset, reg_space, data)#

Read DIMM sideband register data

@platform{cpu_bm}

ad

ES

Args:
processor_handle (Pointer/object) – IN:

Processor handle for the target socket

dimm_addr (int) – IN:
  • DIMM address

lid (int) – IN:
  • The local identifier of the device on DIMM

reg_offset (int) – IN:
  • Register offset within the specified register space

reg_space (int) – IN:
  • Register space selector:
    • 0: Volatile register space

    • 1: Non-volatile memory (NVM) register space

@param[out] data - Input buffer to store the 4-byte re

data (ListOfUnsigned/object) – OUT:

gister

@return ::amdsmi_status_t

::AMDSMI_STATUS_SUCC

Returns:

A tuple of size 1 that contains (in that order):

C signature

amdsmi_status_t amdsmi_get_cpu_dimm_sb_reg(amdsmi_processor_handle processor_handle, uint32_t dimm_addr, uint32_t lid, uint32_t reg_offset, uint32_t reg_space, uint32_t * data)
rocm.bindings.amdsmi.amdsmi_set_cpu_dimm_sb_reg(processor_handle, dimm_addr, lid, reg_offset, reg_space, write_data)#

Write Data to DIMM Sideband Register

@platform{cpu_bm}

t

ES

Args:
processor_handle (Pointer/object) – IN:

Processor handle for the target socket

dimm_addr (int) – IN:
  • DIMM address

lid (int) – IN:
  • The local identifier of the device on DIMM

reg_offset (int) – IN:
  • Register offset within the specified register space

reg_space (int) – IN:
  • Register space selector:
    • 0: Volatile register space

    • 1: Non-volatile memory (NVM) register space

@param[in] write_data - 4-byte data value to write to

write_data (int) – IN:

turn ::amdsmi_status_t ::AMDSMI_STATUS_SUCC

Returns:

A tuple of size 1 that contains (in that order):

C signature

amdsmi_status_t amdsmi_set_cpu_dimm_sb_reg(amdsmi_processor_handle processor_handle, uint32_t dimm_addr, uint32_t lid, uint32_t reg_offset, uint32_t reg_space, uint32_t write_data)
rocm.bindings.amdsmi.amdsmi_set_cpu_xgmi_width(processor_handle, min, max)#

Set xgmi width.

@platform{cpu_bm}

Args:
processor_handle (Pointer/object) – IN:

Cpu socket which to query

min (int) – IN:
  • Minimum xgmi width to be set

max (int) – IN:
  • maximum xgmi width to be set

Returns:

A tuple of size 1 that contains (in that order):

  • amdsmi_status_t: amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail

C signature

amdsmi_status_t amdsmi_set_cpu_xgmi_width(amdsmi_processor_handle processor_handle, uint8_t min, uint8_t max)

Set gmi3 link width range.

@platform{cpu_bm}

Args:
processor_handle (Pointer/object) – IN:

Cpu socket which to query

min_link_width (int) – IN:
  • minimum link width to be set.

max_link_width (int) – IN:
  • maximum link width to be set.

Returns:

A tuple of size 1 that contains (in that order):

  • amdsmi_status_t: amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail

C signature

amdsmi_status_t amdsmi_set_cpu_gmi3_link_width_range(amdsmi_processor_handle processor_handle, uint8_t min_link_width, uint8_t max_link_width)
rocm.bindings.amdsmi.amdsmi_cpu_apb_enable(processor_handle)#

Enable APB.

@platform{cpu_bm}

Args:
processor_handle (Pointer/object) – IN:

Cpu socket which to query

Returns:

A tuple of size 1 that contains (in that order):

  • amdsmi_status_t: amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail

C signature

amdsmi_status_t amdsmi_cpu_apb_enable(amdsmi_processor_handle processor_handle)
rocm.bindings.amdsmi.amdsmi_cpu_apb_disable(processor_handle, pstate)#

Disable APB.

@platform{cpu_bm}

Args:
processor_handle (Pointer/object) – IN:

Cpu socket which to query

pstate (int) – IN:
  • pstate value to be set

Returns:

A tuple of size 1 that contains (in that order):

  • amdsmi_status_t: amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail

C signature

amdsmi_status_t amdsmi_cpu_apb_disable(amdsmi_processor_handle processor_handle, uint8_t pstate)
rocm.bindings.amdsmi.amdsmi_set_cpu_socket_lclk_dpm_level(processor_handle, nbio_id, min, max)#

Set NBIO lclk dpm level value.

@platform{cpu_bm}

Args:
processor_handle (Pointer/object) – IN:

Cpu socket which to query

nbio_id (int) – IN:
  • nbio index

min (int) – IN:
  • minimum value to be set

max (int) – IN:
  • maximum value to be set

Returns:

A tuple of size 1 that contains (in that order):

  • amdsmi_status_t: amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail

C signature

amdsmi_status_t amdsmi_set_cpu_socket_lclk_dpm_level(amdsmi_processor_handle processor_handle, uint8_t nbio_id, uint8_t min, uint8_t max)
rocm.bindings.amdsmi.amdsmi_get_cpu_socket_lclk_dpm_level(processor_handle, nbio_id, nbio)#

Get NBIO LCLK dpm level.

@platform{cpu_bm}

Args:
processor_handle (Pointer/object) – IN:

Cpu socket which to query

nbio_id (int) – IN:
  • nbio index

nbio (amdsmi_dpm_level_t/object) – IN,OUT:
  • Input buffer to fill lclk dpm level

Returns:

A tuple of size 1 that contains (in that order):

  • amdsmi_status_t: amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail

C signature

amdsmi_status_t amdsmi_get_cpu_socket_lclk_dpm_level(amdsmi_processor_handle processor_handle, uint8_t nbio_id, amdsmi_dpm_level_t * nbio)

Set pcie link rate.

@platform{cpu_bm}

Args:
processor_handle (Pointer/object) – IN:

Cpu socket which to query

rate_ctrl (int) – IN:
  • rate control value to be set.

prev_mode (Pointer/object) – IN,OUT:
  • Input buffer to fill previous rate control value.

Returns:

A tuple of size 1 that contains (in that order):

  • amdsmi_status_t: amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail

C signature

amdsmi_status_t amdsmi_set_cpu_pcie_link_rate(amdsmi_processor_handle processor_handle, uint8_t rate_ctrl, uint8_t * prev_mode)
rocm.bindings.amdsmi.amdsmi_set_cpu_df_pstate_range(processor_handle, min_pstate, max_pstate)#

Set df pstate range.

@platform{cpu_bm}

Args:
processor_handle (Pointer/object) – IN:

Cpu socket which to query

min_pstate (int) – IN:
  • minimum pstate value to be set

max_pstate (int) – IN:
  • maximum pstate value to be set

Returns:

A tuple of size 1 that contains (in that order):

  • amdsmi_status_t: amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail

C signature

amdsmi_status_t amdsmi_set_cpu_df_pstate_range(amdsmi_processor_handle processor_handle, uint8_t min_pstate, uint8_t max_pstate)
rocm.bindings.amdsmi.amdsmi_set_cpu_xgmi_pstate_range(processor_handle, min_pstate, max_pstate)#

Set the Min and Max XGMI PState Range

This API configures the XGMI P-State range for the specified processor socket.

P-State range constraints: - min_pstate: Minimum allowed XGMI P-State - max_pstate: Maximum allowed XGMI P-State - Constraint: max_pstate <= min_pstate

@platform{cpu_bm}

Args:
processor_handle (Pointer/object) – IN:

Cpu socket which to configure

min_pstate (int) – IN:
  • minimum XGMI P-State value

max_pstate (int) – IN:
  • maximum XGMI P-State value

Returns:

A tuple of size 1 that contains (in that order):

  • amdsmi_status_t: amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail

C signature

amdsmi_status_t amdsmi_set_cpu_xgmi_pstate_range(amdsmi_processor_handle processor_handle, uint8_t min_pstate, uint8_t max_pstate)
rocm.bindings.amdsmi.amdsmi_get_cpu_xgmi_pstate_range(processor_handle)#

Get the Max and Min XGMI PState Range

This API retrieves the current XGMI P-State range configuration for the specified processor socket.

P-State range values returned: - min_pstate: Current minimum XGMI P-State setting - max_pstate: Current maximum XGMI P-State setting - Relationship: max_pstate <= min_pstate

@platform{cpu_bm}

Args:
processor_handle (Pointer/object) – IN:

Cpu socket which to query

Returns:

A tuple of size 3 that contains (in that order):

  • amdsmi_status_t: amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail

  • int:
    • Input buffer to store current minimum XGMI P-State value

  • int:
    • Input buffer to store current maximum XGMI P-State value

C signature

amdsmi_status_t amdsmi_get_cpu_xgmi_pstate_range(amdsmi_processor_handle processor_handle, uint8_t * min_pstate, uint8_t * max_pstate)
rocm.bindings.amdsmi.amdsmi_get_cpu_pc6_enable(processor_handle)#

Get the PC6 Enable State

This API retrieves the current PC6 (Package C-state 6) enable state for the specified processor socket.

PC6 enable state values returned: - 0: PC6 disabled - 1: PC6 enabled

@platform{cpu_bm}

Args:
processor_handle (Pointer/object) – IN:

Cpu socket which to query

Returns:

A tuple of size 2 that contains (in that order):

  • amdsmi_status_t: amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail

  • int:
    • Input buffer to store the current PC6 enable state

C signature

amdsmi_status_t amdsmi_get_cpu_pc6_enable(amdsmi_processor_handle processor_handle, uint8_t * enabled)
rocm.bindings.amdsmi.amdsmi_set_cpu_pc6_enable(processor_handle, enable)#

Set the PC6 Enable State

This API configures the PC6 (Package C-state 6) enable state for the specified processor socket.

PC6 enable state values: - 0: PC6 disabled - 1: PC6 enabled

@platform{cpu_bm}

Args:
processor_handle (Pointer/object) – IN:

Cpu socket which to configure

enable (int) – IN:
  • PC6 enable state (0=disable, 1=enable)

Returns:

A tuple of size 1 that contains (in that order):

  • amdsmi_status_t: amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail

C signature

amdsmi_status_t amdsmi_set_cpu_pc6_enable(amdsmi_processor_handle processor_handle, uint8_t enable)
rocm.bindings.amdsmi.amdsmi_get_cpu_cc6_enable(processor_handle, enabled)#

Get the Core C6 Enable State.

This API retrieves the Core C6 (CC6) low-power state for the specified processor socket.

CC6 enable state values returned: - 0: CC6 state disabled - 1: CC6 state enabled

@platform{cpu_bm}

Args:
processor_handle (Pointer/object) – IN:

Cpu socket which to query

enabled (Pointer/object) – IN,OUT:
  • Input buffer to store the current CC6 enable state

Returns:

A tuple of size 1 that contains (in that order):

  • amdsmi_status_t: amdsmi_status_t

    ::AMDSMI_STATUS_SUCCESS on success, non-zero on failure

C signature

amdsmi_status_t amdsmi_get_cpu_cc6_enable(amdsmi_processor_handle processor_handle, uint8_t * enabled)
rocm.bindings.amdsmi.amdsmi_set_cpu_cc6_enable(processor_handle, enable)#

Set the Core C6 Enable State.

This API configures the Core C6 (CC6) low-power state for the specified processor socket.

CC6 enable state values: - 0: Disable CC6 state - 1: Enable CC6 state

@platform{cpu_bm}

TU

Args:
processor_handle (Pointer/object) – IN:

Cpu socket which to configure

enable (int) – IN:
  • CC6 enable state value:
    • 0: Disable CC6 low-power state

    • 1: Enable CC6 low-power state

@return ::amdsmi_status_t | ::AMDSMI_STA

Returns:

A tuple of size 1 that contains (in that order):

C signature

amdsmi_status_t amdsmi_set_cpu_cc6_enable(amdsmi_processor_handle processor_handle, uint8_t enable)
rocm.bindings.amdsmi.amdsmi_get_cpu_current_io_bandwidth(processor_handle, link, io_bw)#

Get current input output bandwidth.

@platform{cpu_bm}

Args:
processor_handle (Pointer/object) – IN:

Cpu socket which to query

link (amdsmi_link_id_bw_type_t) – IN:
  • link id and bw type to which io bandwidth to be obtained

io_bw (PointerToUnsigned/object) – IN,OUT:
  • Input buffer to fill bandwidth data

Returns:

A tuple of size 1 that contains (in that order):

  • amdsmi_status_t: amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail

C signature

amdsmi_status_t amdsmi_get_cpu_current_io_bandwidth(amdsmi_processor_handle processor_handle, amdsmi_link_id_bw_type_t link, uint32_t * io_bw)
rocm.bindings.amdsmi.amdsmi_get_cpu_current_xgmi_bw(processor_handle, link, xgmi_bw)#

Get current input output bandwidth.

@platform{cpu_bm}

Args:
processor_handle (Pointer/object) – IN:

Cpu socket which to query

link (amdsmi_link_id_bw_type_t) – IN:
  • link id and bw type to which xgmi bandwidth to be obtained

xgmi_bw (PointerToUnsigned/object) – IN,OUT:
  • Input buffer to fill bandwidth data

Returns:

A tuple of size 1 that contains (in that order):

  • amdsmi_status_t: amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail

C signature

amdsmi_status_t amdsmi_get_cpu_current_xgmi_bw(amdsmi_processor_handle processor_handle, amdsmi_link_id_bw_type_t link, uint32_t * xgmi_bw)
rocm.bindings.amdsmi.amdsmi_get_hsmp_metrics_table_version(processor_handle, metrics_version)#

Get HSMP metrics table version

@platform{cpu_bm}

Args:
processor_handle (Pointer/object) – IN:

Cpu socket which to query

metrics_version (PointerToUnsigned/object) – IN,OUT:

input buffer to return the HSMP metrics table version.

Returns:

A tuple of size 1 that contains (in that order):

  • amdsmi_status_t: amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail

C signature

amdsmi_status_t amdsmi_get_hsmp_metrics_table_version(amdsmi_processor_handle processor_handle, uint32_t * metrics_version)
rocm.bindings.amdsmi.amdsmi_get_hsmp_metrics_table(processor_handle, metrics_table)#

Get HSMP metrics table

@platform{cpu_bm}

Args:
processor_handle (Pointer/object) – IN:

Cpu socket which to query

metrics_table (amdsmi_hsmp_metrics_table_t/object) – IN,OUT:

input buffer to return the HSMP metrics table.

Returns:

A tuple of size 1 that contains (in that order):

  • amdsmi_status_t: amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail

C signature

amdsmi_status_t amdsmi_get_hsmp_metrics_table(amdsmi_processor_handle processor_handle, amdsmi_hsmp_metrics_table_t * metrics_table)
rocm.bindings.amdsmi.amdsmi_first_online_core_on_cpu_socket(processor_handle, pcore_ind)#

Get first online core on socket.

@platform{cpu_bm}

Args:
processor_handle (Pointer/object) – IN:

Cpu socket which to query

pcore_ind (PointerToUnsigned/object) – IN,OUT:
  • Input buffer to fill first online core on socket data

Returns:

A tuple of size 1 that contains (in that order):

  • amdsmi_status_t: amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail

C signature

amdsmi_status_t amdsmi_first_online_core_on_cpu_socket(amdsmi_processor_handle processor_handle, uint32_t * pcore_ind)
rocm.bindings.amdsmi.amdsmi_get_cpu_family(cpu_family)#

Get CPU family.

@platform{cpu_bm}

Args:
cpu_family (PointerToUnsigned/object) – IN,OUT:
  • Input buffer to return the cpu family

Returns:

A tuple of size 1 that contains (in that order):

  • amdsmi_status_t: amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail

C signature

amdsmi_status_t amdsmi_get_cpu_family(uint32_t * cpu_family)
rocm.bindings.amdsmi.amdsmi_get_cpu_model(cpu_model)#

Get CPU model.

@platform{cpu_bm}

Args:
cpu_model (PointerToUnsigned/object) – IN,OUT:
  • Input buffer to return the cpu model

Returns:

A tuple of size 1 that contains (in that order):

  • amdsmi_status_t: amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail

C signature

amdsmi_status_t amdsmi_get_cpu_model(uint32_t * cpu_model)
rocm.bindings.amdsmi.amdsmi_get_cpu_model_name(processor_handle)#

Retrieve the CPU processor model name based on the processor index.

@platform{cpu_bm}

This function obtains the CPU model name associated with the specified processor index from the list of available processor handles. Before invoking this function, ensure that the list of processor handles is properly initialized and that the processor type is specified. This function is to be utilized for RDC and is not part of ESMI library.

Args:
processor_handle (Pointer/object) – IN:

Cpu socket which to query

Returns:

A tuple of size 2 that contains (in that order):

  • amdsmi_status_t: amdsmi_status_t indicating the result of the operation.
    • ::AMDSMI_STATUS_SUCCESS on successful retrieval of the model name.

    • A non-zero error code if the operation fails.

  • amdsmi_cpu_info_t:

    A pointer to an amdsmi_cpu_info_t structure that will be populated with the CPU processor model information upon successful execution of the function.

C signature

amdsmi_status_t amdsmi_get_cpu_model_name(amdsmi_processor_handle processor_handle, amdsmi_cpu_info_t * cpu_info)
rocm.bindings.amdsmi.amdsmi_get_esmi_err_msg(status, status_string)#

Get a description of provided AMDSMI error status for esmi errors.

@platform{cpu_bm}

Set the provided pointer to a const char *, status_string, to a string containing a description of the provided error code status.

Args:
status (amdsmi_status_t) – IN:
  • The error status for which a description is desired.

status_string (Pointer/object) – IN,OUT:
  • A pointer to a const char * which will be made

to point to a description of the provided error code

Returns:

A tuple of size 1 that contains (in that order):

  • amdsmi_status_t: amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail

C signature

amdsmi_status_t amdsmi_get_esmi_err_msg(amdsmi_status_t status, const char ** status_string)
rocm.bindings.amdsmi.amdsmi_get_cpu_cores_per_socket(sock_count, soc_info)#

Get cpu cores per socket from sys filesystem.

@platform{cpu_bm}

Args:
sock_count (int) – IN:
  • cpu socket count

soc_info (amdsmi_sock_info_t/object) – IN,OUT:
  • Input buffer to return the cpu cores per socket

Returns:

A tuple of size 1 that contains (in that order):

  • amdsmi_status_t: amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail

C signature

amdsmi_status_t amdsmi_get_cpu_cores_per_socket(uint32_t sock_count, amdsmi_sock_info_t * soc_info)
rocm.bindings.amdsmi.amdsmi_get_cpu_socket_count(sock_count)#

Get CPU socket count from sys filesystem.

@platform{cpu_bm}

Args:
sock_count (PointerToUnsigned/object) – IN,OUT:
  • Input buffer to return the cpu socket count

Returns:

A tuple of size 1 that contains (in that order):

  • amdsmi_status_t: amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail

C signature

amdsmi_status_t amdsmi_get_cpu_socket_count(uint32_t * sock_count)
rocm.bindings.amdsmi.amdsmi_get_cpu_enabled_commands(processor_handle, r_mask, mask0, mask1, mask2)#

Get HSMP Enabled Commands information for a given CPU socket.

This function retrieves enabled commands bit masks for both read and write commands from the HSMP interface.

@platform{cpu_bm}

Args:
processor_handle (Pointer/object) – IN:

CPU socket handle to query

r_mask (Pointer/object) – IN:
  • Input buffer to store read mask, indicating read or write enabled commands

to query

mask0 (PointerToUnsigned/object) – IN,OUT:
  • Input buffer to store read/write enabled hsmp command mask0

mask1 (PointerToUnsigned/object) – IN,OUT:
  • Input buffer to store read/write enabled hsmp command mask1

mask2 (PointerToUnsigned/object) – IN,OUT:
  • Input buffer to store read/write enabled hsmp command mask2

Returns:

A tuple of size 1 that contains (in that order):

  • amdsmi_status_t: amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail

C signature

amdsmi_status_t amdsmi_get_cpu_enabled_commands(amdsmi_processor_handle processor_handle, _Bool * r_mask, uint32_t * mask0, uint32_t * mask1, uint32_t * mask2)
rocm.bindings.amdsmi.amdsmi_get_nic_driver_info(processor_handle)#

Retrieves information about the NIC driver

@platform{host} @platform{gpu_bm_linux}

Args:
processor_handle (Pointer/object) – IN:

NIC for which to query

Returns:

A tuple of size 2 that contains (in that order):

C signature

amdsmi_status_t amdsmi_get_nic_driver_info(amdsmi_processor_handle processor_handle, amdsmi_nic_driver_info_t * info)
rocm.bindings.amdsmi.amdsmi_get_nic_asic_info(processor_handle)#

Retrieves ASIC information for the NIC

@platform{host} @platform{gpu_bm_linux}

Args:
processor_handle (Pointer/object) – IN:

NIC for which to query

Returns:

A tuple of size 2 that contains (in that order):

C signature

amdsmi_status_t amdsmi_get_nic_asic_info(amdsmi_processor_handle processor_handle, amdsmi_nic_asic_info_t * info)
rocm.bindings.amdsmi.amdsmi_get_nic_bus_info(processor_handle)#

Retrieves BUS information for the NIC

@platform{host} @platform{gpu_bm_linux}

Args:
processor_handle (Pointer/object) – IN:

NIC for which to query

Returns:

A tuple of size 2 that contains (in that order):

C signature

amdsmi_status_t amdsmi_get_nic_bus_info(amdsmi_processor_handle processor_handle, amdsmi_nic_bus_info_t * info)
rocm.bindings.amdsmi.amdsmi_get_nic_numa_info(processor_handle)#

Retrieves NUMA information for the NIC

@platform{host} @platform{gpu_bm_linux}

Args:
processor_handle (Pointer/object) – IN:

NIC for which to query

Returns:

A tuple of size 2 that contains (in that order):

C signature

amdsmi_status_t amdsmi_get_nic_numa_info(amdsmi_processor_handle processor_handle, amdsmi_nic_numa_info_t * info)
rocm.bindings.amdsmi.amdsmi_get_nic_port_info(processor_handle)#

Retrieves PORT information for the NIC

@platform{host} @platform{gpu_bm_linux}

Args:
processor_handle (Pointer/object) – IN:

NIC for which to query

Returns:

A tuple of size 2 that contains (in that order):

C signature

amdsmi_status_t amdsmi_get_nic_port_info(amdsmi_processor_handle processor_handle, amdsmi_nic_port_info_t * info)
rocm.bindings.amdsmi.amdsmi_get_nic_rdma_dev_info(processor_handle)#

Retrieves RDMA devices information for the NIC

@platform{host} @platform{gpu_bm_linux}

Args:
processor_handle (Pointer/object) – IN:

NIC for which to query

Returns:

A tuple of size 2 that contains (in that order):

C signature

amdsmi_status_t amdsmi_get_nic_rdma_dev_info(amdsmi_processor_handle processor_handle, amdsmi_nic_rdma_devices_info_t * info)
rocm.bindings.amdsmi.amdsmi_get_nic_rdma_port_statistics(processor_handle, rdma_port_index, num_stats)#

Retrieve RDMA port statistics for the NIC

@platform{host} @platform{gpu_bm_linux}

This function follows a two-call pattern: 1. First call with stats=NULL to get the count of available statistics 2. Second call with allocated array to retrieve all statistics

Args:
processor_handle (Pointer/object) – IN:

NIC for which to query

rdma_port_index (int) – IN:

index of the NIC RDMA port to query

num_stats (PointerToUnsigned/object) – IN,OUT:

pointer to the number of statistics - Input: maximum number of statistics that stats array can hold - Output: actual number of statistics available/returned

Returns:

A tuple of size 2 that contains (in that order):

  • amdsmi_status_t: amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail

  • amdsmi_nic_stat_t:

    pointer to array of amdsmi_nic_stat_t structures to be filled - If NULL, only num_stats is filled with the count of available statistics - If not NULL, must be allocated by user with at least num_stats elements

C signature

amdsmi_status_t amdsmi_get_nic_rdma_port_statistics(amdsmi_processor_handle processor_handle, uint32_t rdma_port_index, uint32_t * num_stats, amdsmi_nic_stat_t * stats)
rocm.bindings.amdsmi.amdsmi_get_nic_fw_info(processor_handle)#

Retrieves firmware version information for the NIC

@platform{host} @platform{gpu_bm_linux}

Note:

This API depends on libmnl. If libmnl is not installed on the system, this function returns ::AMDSMI_STATUS_NOT_SUPPORTED.

Args:
processor_handle (Pointer/object) – IN:

NIC for which to query

Returns:

A tuple of size 2 that contains (in that order):

  • amdsmi_status_t: amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail

  • amdsmi_nic_fw_info_t:

    reference to the nic firmware info struct. Must be allocated by user.

C signature

amdsmi_status_t amdsmi_get_nic_fw_info(amdsmi_processor_handle processor_handle, amdsmi_nic_fw_info_t * info)
rocm.bindings.amdsmi.amdsmi_get_nic_port_statistics(processor_handle, port_index, num_stats)#

Retrieve PORT statistics for the specified NIC port

@platform{host} @platform{gpu_bm_linux}

This function follows a two-call pattern: 1. First call with stats=NULL to get the count of available statistics 2. Second call with allocated array to retrieve all statistics

Args:
processor_handle (Pointer/object) – IN:

NIC for which to query

port_index (int) – IN:

index of the NIC port to query

num_stats (PointerToUnsigned/object) – IN,OUT:

pointer to the number of statistics - Input: maximum number of statistics that stats array can hold - Output: actual number of statistics available/returned

Returns:

A tuple of size 2 that contains (in that order):

  • amdsmi_status_t: amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail

  • amdsmi_nic_stat_t:

    pointer to array of amdsmi_nic_stat_t structures to be filled - If NULL, only num_stats is filled with the count of available statistics - If not NULL, must be allocated by user with at least num_stats elements

C signature

amdsmi_status_t amdsmi_get_nic_port_statistics(amdsmi_processor_handle processor_handle, uint32_t port_index, uint32_t * num_stats, amdsmi_nic_stat_t * stats)
rocm.bindings.amdsmi.amdsmi_get_nic_vendor_statistics(processor_handle, port_index, num_stats)#

Retrieve vendor specific statistics for the NIC port

@platform{host} @platform{gpu_bm_linux}

This function follows a two-call pattern: 1. First call with stats=NULL to get the count of available statistics 2. Second call with allocated array to retrieve all statistics

This API provides access to vendor/driver specific statistics that may vary between different NIC vendors and driver/fw versions. The statistic names are preserved as provided by the underlying driver implementation.

Args:
processor_handle (Pointer/object) – IN:

NIC for which to query

port_index (int) – IN:

index of the NIC port to query

num_stats (PointerToUnsigned/object) – IN,OUT:

pointer to the number of statistics - Input: maximum number of statistics that stats array can hold - Output: actual number of statistics available/returned

Returns:

A tuple of size 2 that contains (in that order):

  • amdsmi_status_t: amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail

  • amdsmi_nic_stat_t:

    pointer to array of amdsmi_nic_stat_t structures to be filled - If NULL, only num_stats is filled with the count of available statistics - If not NULL, must be allocated by user with at least num_stats elements

C signature

amdsmi_status_t amdsmi_get_nic_vendor_statistics(amdsmi_processor_handle processor_handle, uint32_t port_index, uint32_t * num_stats, amdsmi_nic_stat_t * stats)
class rocm.bindings.amdsmi.amdsmi_uma_carveout_option_t(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

UMA carveout option descriptor

index: Any#
description: Any#
static PROPERTIES() → list[str]#
static fromObj(pyobj) → Any#
static allocate(count: int = 1) → Any#
c_sizeof() → int#
as_c_void_p() → Any#
class rocm.bindings.amdsmi.amdsmi_uma_carveout_info_t(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

UMA carveout configuration information

current_index: Any#
num_options: Any#
static PROPERTIES() → list[str]#
static fromObj(pyobj) → Any#
static allocate(count: int = 1) → Any#
c_sizeof() → int#
as_c_void_p() → Any#
class rocm.bindings.amdsmi.amdsmi_ttm_info_t(*args, **kwargs)#

Bases: rocm.bindings.util.types.Pointer

TTM (Translation Table Manager) configuration information

current_pages: Any#
static PROPERTIES() → list[str]#
static fromObj(pyobj) → Any#
static allocate(count: int = 1) → Any#
c_sizeof() → int#
as_c_void_p() → Any#
rocm.bindings.amdsmi.amdsmi_get_gpu_uma_carveout_info(processor_handle)#

Get UMA carveout configuration information

This function retrieves the current UMA (Unified Memory Architecture) carveout configuration for the specified GPU. UMA carveout controls dedicated GPU memory allocation on APU systems.

Note:

This uses a kernel UAPI sysfs interface, not libdrm.

@platform{gpu_bm_linux}

Args:
processor_handle (Pointer/object) – IN:

GPU device handle

Returns:

A tuple of size 2 that contains (in that order):

  • amdsmi_status_t: amdsmi_status_t

    ::AMDSMI_STATUS_SUCCESS on success ::AMDSMI_STATUS_NOT_SUPPORTED if UMA carveout is not available on this device ::AMDSMI_STATUS_INVAL if info is nullptr

  • amdsmi_uma_carveout_info_t:

    Pointer to receive UMA carveout information

C signature

amdsmi_status_t amdsmi_get_gpu_uma_carveout_info(amdsmi_processor_handle processor_handle, amdsmi_uma_carveout_info_t * info)
rocm.bindings.amdsmi.amdsmi_set_gpu_uma_carveout(processor_handle, option_index)#

Set UMA carveout configuration

This function sets the UMA carveout configuration for the specified GPU. The system must be rebooted for changes to take effect.

Note:

This uses a kernel UAPI sysfs interface, not libdrm.

@platform{gpu_bm_linux}

Args:
processor_handle (Pointer/object) – IN:

GPU device handle

option_index (int) – IN:

Index of the carveout option to set

Returns:

A tuple of size 1 that contains (in that order):

  • amdsmi_status_t: amdsmi_status_t

    ::AMDSMI_STATUS_SUCCESS on success ::AMDSMI_STATUS_NOT_SUPPORTED if UMA carveout is not available on this device ::AMDSMI_STATUS_NO_PERM if insufficient permissions ::AMDSMI_STATUS_INVAL if option_index is out of range

C signature

amdsmi_status_t amdsmi_set_gpu_uma_carveout(amdsmi_processor_handle processor_handle, uint32_t option_index)
rocm.bindings.amdsmi.amdsmi_get_ttm_info()#

Get TTM configuration information

This function retrieves the current TTM (Translation Table Manager) pages limit. TTM controls shared GPU memory (GTT) allocation.

Note:

This uses a kernel UAPI interface (modprobe.d), not libdrm.

@platform{gpu_bm_linux}

Returns:

A tuple of size 2 that contains (in that order):

  • amdsmi_status_t: amdsmi_status_t

    ::AMDSMI_STATUS_SUCCESS on success ::AMDSMI_STATUS_NOT_SUPPORTED if TTM configuration is not available ::AMDSMI_STATUS_INVAL if info is nullptr

  • amdsmi_ttm_info_t:

    Pointer to receive TTM configuration information

C signature

amdsmi_status_t amdsmi_get_ttm_info(amdsmi_ttm_info_t * info)
rocm.bindings.amdsmi.amdsmi_set_ttm_pages_limit(pages)#

Set TTM pages limit

This function configures the TTM pages limit by creating/updating /etc/modprobe.d/ttm.conf. The system must be rebooted for changes to take effect.

Note:

This uses a kernel UAPI interface (modprobe.d), not libdrm.

@platform{gpu_bm_linux}

Args:
pages (int) – IN:

Number of pages to allocate for TTM

Returns:

A tuple of size 1 that contains (in that order):

  • amdsmi_status_t: amdsmi_status_t

    ::AMDSMI_STATUS_SUCCESS on success ::AMDSMI_STATUS_NO_PERM if insufficient permissions ::AMDSMI_STATUS_INVAL if pages is 0

C signature

amdsmi_status_t amdsmi_set_ttm_pages_limit(uint64_t pages)
rocm.bindings.amdsmi.amdsmi_reset_ttm_pages_limit()#

Reset TTM pages limit to system default

This function resets the TTM pages limit to system default by removing /etc/modprobe.d/ttm.conf. The system must be rebooted for changes to take effect.

Note:

This uses a kernel UAPI interface (modprobe.d), not libdrm.

@platform{gpu_bm_linux}

Returns:

A tuple of size 1 that contains (in that order):

  • amdsmi_status_t: amdsmi_status_t

    ::AMDSMI_STATUS_SUCCESS on success ::AMDSMI_STATUS_NO_PERM if insufficient permissions

C signature

amdsmi_status_t amdsmi_reset_ttm_pages_limit()