rocm.bindings.amdsmi#
2026-09-24
256 min read time
Advanced Micro Devices, Inc.
Attributes#
Classes#
(No short description) |
|
Initialization flags |
|
GPU Capability info |
|
Container |
|
This structure holds HSMP Driver version information. |
|
Processor types detectable by AMD SMI |
|
Error codes returned by amdsmi functions |
|
Clock types |
|
Accelerator Partition |
|
Accelerator Partition Resource Types |
|
Compute Partition. This enum is used to identify |
|
Compute Partition Memory Allocation Mode. Controls how GPU memory |
|
Accelerator Partition Memory Allocation Mode. Controls how GPU memory |
|
Memory Partitions |
|
This enumeration is used to indicate from which part of the processor a |
|
The values of this enum are used to identify the various firmware |
|
vRam Types. This enum is used to identify various VRam types. |
|
This structure represents a range (e.g., frequencies or voltages). |
|
XGMI Information |
|
VRam Usage |
|
This structure hold violation status information. |
|
Frequency Range |
|
(No short description) |
|
(No short description) |
|
bdf types |
|
Structure holds enumeration information |
|
Card Form Factor |
|
(No short description) |
|
(No short description) |
|
pcie information |
|
Power Cap Information |
|
Power Cap Package Power Tracking (PPT) type |
|
VBios Information |
|
cache properties |
|
(No short description) |
|
GPU Cache Information |
|
(No short description) |
|
Firmware Information |
|
ASIC Information |
|
Structure holds kfd information |
|
(No short description) |
|
This union holds memory partition bitmask. |
|
(No short description) |
|
Memory Partition Configuration. |
|
Accelerator Partition Resource Profile |
|
Accelerator Partition Resources. |
|
Accelerator Partition Profile Configurations |
|
Link type |
|
This structure holds CPU utilization information. |
|
Link Status |
|
(No short description) |
|
Link Metrics |
|
VRam Information |
|
Driver Information |
|
Board Information |
|
Power Information |
|
Clock Information |
|
Engine Usage |
|
(No short description) |
|
(No short description) |
|
Process Information |
|
(No short description) |
|
(No short description) |
|
Per-GPU process entry within a PID-grouped result. |
|
Process info aggregated across all GPUs, keyed by PID. |
|
IO Link P2P Capability |
|
PowerPlay performance levels |
|
Event Groups |
|
Event types |
|
Event counter commands |
|
Counter value |
|
Event notification event types |
|
Event notification data returned from event notification API |
|
Temperature Metrics. This enum is used to identify various |
|
Voltage Metrics. This enum is used to identify various |
|
This ennumeration is used to indicate which type of |
|
Pre-set Profile Selections. These bitmasks can be AND'd with the |
|
This enum is used to identify different GPU blocks. |
|
The clk limit type |
|
Cper sev |
|
Cper notify |
|
Ras policy v4.0 |
|
(No short description) |
|
Ras policy info structure for storing version and different ras |
|
The current ECC state |
|
Types of memory |
|
The values of this enum are used as frequency identifiers. |
|
XGMI Status |
|
Reserved Memory Page States |
|
The utilization counter type |
|
The utilization counter data |
|
Reserved Memory Page Record |
|
This structure contains information about which power profiles are |
|
This structure holds information about clock frequencies. |
|
The dpm policy. |
|
DPM Policy |
|
This structure holds information about the possible PCIe |
|
This structure holds version information. |
|
This structure represents a point on the frequency-voltage plane. |
|
This structure holds 2 ::amdsmi_range_t's, one for frequency and one for |
|
OD Vold Curve |
|
This structure holds the frequency-voltage values for a device. |
|
Structure holds the gpu metrics table header for a device |
|
The following structures hold the gpu statistics for a device. |
|
APU metrics auxiliary data. |
|
Structure holds the gpu metrics values for a device |
|
XGMI Link Status Type |
|
XGMI Link Status |
|
This structure holds the name value pairs |
|
This register type for register table |
|
(No short description) |
|
This structure holds ras feature information. |
|
This structure holds error counts. |
|
This structure contains information specific to a process. |
|
Topology Nearest |
|
Variant placeholder |
|
Scope for Numa affinity or Socket affinity |
|
NPM status |
|
NPM info |
|
PTL (Peak Tops Limiter) data format types |
|
This structure holds SMU Firmware version information. |
|
DDR bandwidth metrics. |
|
temperature range and refresh rate metrics of a DIMM |
|
DIMM Power(mW), power update rate(ms) and dimm address |
|
DIMM temperature(°C) and update rate(ms) and dimm address |
|
xGMI Bandwidth Encoding types |
|
LINK name and Bandwidth type Information.It contains |
|
max and min LCLK DPM level on a given NBIO ID. |
|
HSMP Metrics table (supported only with hsmp proto version 6). |
|
cpu info data |
|
cpu socket info data |
|
Structure for NIC statistic name-value pairs |
|
NIC asic information |
|
NIC bus information |
|
NIC NUMA information |
|
NIC firmware information |
|
NIC firmware information collection |
|
NIC port information |
|
NIC port information collection |
|
NIC driver information |
|
NIC RDMA port information |
|
NIC RDMA device information |
|
NIC RDMA devices information collection |
|
Fabric telemetry categories |
|
Fabric telemetry category bitmask values |
|
Fabric telemetry item structure |
|
(No short description) |
|
Fabric telemetry instance structure |
|
Fabric telemetry dataset structure |
|
Fabric telemetry structure |
|
Fabric size constants |
|
Fabric type |
|
Fabric NPA address mode |
|
Fabric accelerator vPoD state |
|
Fabric device configuration information (version 1) |
|
(No short description) |
|
Fabric device information structure |
|
Cper |
|
(No short description) |
|
(No short description) |
|
(No short description) |
|
(No short description) |
|
UMA carveout option descriptor |
|
UMA carveout configuration information |
|
TTM (Translation Table Manager) configuration information |
Functions#
|
|
|
Initialize the AMD SMI library |
Shutdown the AMD SMI library |
|
|
Get the list of socket handles in the system. |
|
Get information about the given socket |
|
Get the list of the processor handles associated to a socket. |
|
Get the node handle associated with processor handle. |
|
Get the processor type of the processor_handle |
|
Get a string identifier for the given processor. |
Get respective processor counts from the processor handles |
|
|
Returns a list of processor handles of the specified type in the system. |
Get processor handle with the matching bdf. |
|
|
Returns BDF of the given GPU device |
|
Returns the UUID of the device |
|
Returns the Enumeration information for the device |
|
Retrieves an array of uint64_t (sized to cpu_set_size) of bitmasks with the |
|
Returns the virtualization mode for the target device. |
|
Get the list of the NIC processor handles associated to a socket. |
|
Returns BDF of the given NIC device |
|
Get the device id associated with the device with provided device |
|
Get the device revision associated with the device |
|
Get the name string for a give vendor ID |
|
Get the vram vendor string of a device. |
|
Get the subsystem device id associated with the device with |
|
Get the name string for the device subsystem |
|
Get the list of possible PCIe bandwidths that are available. It is not |
|
Get the unique PCI device identifier associated for a device |
|
Get the NUMA node associated with a device |
|
Get PCIe traffic information. It is not supported on virtual machine guest |
|
Get PCIe replay counter |
|
Control the set of allowed PCIe bandwidths that can be used. It is not |
|
Get the energy accumulator counter of the processor with provided |
|
Set the maximum gpu power cap value. It is not supported on virtual |
|
Set the power performance profile. It is not supported on virtual machine guest |
|
Query the supported power cap sensors and their types for a device. |
|
Get the socket power. |
|
Get the socket power cap. |
|
Get the maximum power cap value for a given socket. |
Get the SVI based power telemetry for all rails. |
|
|
Set the power cap value for a given socket. |
|
Set the power efficiency profile policy. |
|
Get the power efficiency profile policy |
|
Read CCD (Core Complex Die) power consumption |
|
Get the total amount of memory that exists |
|
Get the current memory usage |
|
Get the bad pages of a processor. It is not supported on virtual |
|
Get the bad pages threshold of a processor. It is not supported on virtual |
|
Verify the checksum of RAS EEPROM. It is not supported on virtual |
Returns if RAS features are enabled or disabled for given block. It is not |
|
|
Get information about reserved ("retired") memory pages. It is not supported on |
|
Get the fan speed in RPMs of the device with the specified processor |
|
Get the fan speed for the specified device as a value relative to |
|
Get the max. fan speed of the device with provided processor handle. It is |
|
Returns gpu cache info. |
|
Get the voltage metric value for the specified metric, from the |
|
Reset the fan to automatic driver control. It is not supported on virtual |
|
Set the fan speed for the specified device with the provided speed, |
|
Get GPU busy percent from gpu_busy_percent sysfs file |
|
Get VCN busy percent from vcn_busy_percent sysfs file |
|
Get coarse grain utilization counter of the specified device |
|
Get the performance level of the device. It is not supported on virtual |
|
Enter performance determinism mode with provided processor handle. It is |
|
Get the overdrive percent associated with the device with provided |
|
Get the GPU memory clock overdrive percent associated with the device with provided |
|
Get the list of possible system clock speeds of device for a |
|
Triggers a chain that resets all GPUs. |
|
This function retrieves the overdrive GFX & MCLK information. If valid |
|
Get the 'metrics_header_info' from the GPU metrics associated with the device |
|
This function retrieves the gpu metrics information. It is not supported |
This function retrieves the partition metrics information. |
|
|
Get the pm metrics table with provided device index. |
|
Get the register metrics table with provided device index and register type. |
|
This function sets the clock sets the clock min/max level |
|
This function sets the clock frequency information. It is not supported on |
|
This function sets 1 of the 3 voltage curve points. It is not supported |
|
This function will retrieve the current valid regions in the |
|
Get the list of available preset power profiles and an indication of |
|
Set the PowerPlay performance level associated with the device with |
|
Set the overdrive percent associated with the device with provided |
|
Control the set of allowed frequencies that can be used for the |
|
Get the soc pstate policy for the processor |
|
Set the soc pstate policy for the processor |
|
Get the xgmi per-link power down policy parameter for the processor |
|
Set the xgmi per-link power down policy parameter for the processor |
|
Get the status of the Process Isolation |
|
Enable/disable the system Process Isolation |
|
Run the cleaner shader to clean up data in LDS/GPRs |
|
Allocate storage for Fabric telemetry data |
|
Get Fabric telemetry data |
|
Get string name for a telemetry item ID |
|
Free Fabric telemetry storage |
|
Get Fabric device information |
Get the build version information for the currently running build of AMDSMI |
|
|
Retrieve the error counts for a GPU block. It is not supported on virtual |
|
Retrieve the enabled ECC bit-mask. It is not supported on virtual machine guest |
|
Returns the total number of ECC errors (correctable, |
|
Get the AFIDs from CPER buffer |
|
Returns RAS features info. |
|
Retrieve CPER entries cached in the driver. |
|
Retrieve the ECC status for a GPU block. It is not supported on virtual machine |
|
Get a description of a provided AMDSMI error status |
|
Tell if an event group is supported by a given device. It is not supported |
|
Create a performance counter object |
|
Deallocate a performance counter object |
|
Issue performance counter control commands. It is not supported on |
|
Read the current value of a performance counter |
|
Get the number of currently available counters. It is not supported on |
|
Get process information about processes currently using GPU |
|
Get process information about a specific process |
|
Get the device indices currently being used by a process |
|
Retrieve the XGMI error status for a device. It is not supported on |
|
Reset the XGMI error status for a device. It is not supported on virtual |
|
Returns XGMI information for the GPU. |
|
Get the XGMI link status |
|
Return link metric information |
|
Retrieve the NUMA CPU node number for a device |
|
Retrieve the weight for a connection between 2 GPUs |
Retrieve minimal and maximal io link bandwidth between 2 GPUs |
|
|
Retrieve the hops and the connection type between 2 GPUs |
|
Retrieve the set of GPUs that are nearest to a given device |
|
Return P2P availability status between 2 GPUs |
|
Retrieve connection type and P2P capabilities between 2 GPUs |
|
Retrieves the current compute partitioning for a desired device |
|
Modifies a selected device's compute partition setting. |
Retrieves the current compute partition memory allocation mode |
|
Retrieves the current accelerator partition memory allocation mode |
|
Modifies a selected device's compute partition memory allocation mode. |
|
Modifies a selected device's compute partition memory allocation mode. |
|
|
Retrieves the current memory partition for a desired device |
|
Modifies a selected device's current memory partition setting. |
|
Returns current gpu memory partition capabilities |
|
Sets memory partition mode |
Returns gpu accelerator partition caps as currently configured in the system |
|
Returns current gpu accelerator partition cap |
|
Set accelerator partition setting based on profile_index |
|
|
Prepare to collect event notifications for a GPU |
Specify which events to collect for a device |
|
|
Collect event notifications, waiting a specified amount of time |
|
Close any file handles and free any resources used by event |
|
Returns the driver version information |
|
Returns the ASIC information for the device |
|
Returns the KFD (Kernel Fusion Driver) information for the device |
|
Returns vram info |
|
Returns the board part number and board information for the requested device |
|
Returns the power caps as currently configured in the system. |
|
Returns the PCIe info for the GPU. |
|
Returns the 'xcd_counter' from the GPU metrics associated with the device |
|
Retrieves node power management (NPM) status and power limit for the specified node. |
|
Returns the firmware versions running on the device. |
|
Returns the static information for the vBIOS on the device. |
|
Get the temperature metric value for the specified metric, from the |
|
Returns the current usage of the GPU engines (GFX, MM and MEM). |
|
Returns the current power and voltage of the GPU. |
|
Returns is power management enabled |
|
Returns the measurements of the clocks in the GPU |
|
Returns the VRAM usage (both total and used memory) in MegaBytes. |
|
Returns the violations for a processor |
|
Returns the list of process information running on a given GPU. |
|
Get the list of processes running on one or more GPUs, grouped by PID. |
|
Get PTL enable/disable state |
|
Set PTL enable/disable state |
|
Get PTL (Peak Tops Limiter) formats for the processor |
|
Set PTL with specified preferred data formats |
|
Get the list of cpu handles in the system. |
|
Get the list of the cpu core handles in a system. |
|
Get the core energy for a given core. |
|
Get the socket energy for a given socket. |
|
Get Number of threads Per Core. |
|
Get HSMP Driver Version. |
|
Get SMU Firmware Version. |
|
Get HSMP protocol Version. |
|
Get normalized status of the processor's PROCHOT status. |
|
Get Data fabric clock and Memory clock in MHz. |
|
Get core clock in MHz. |
Get current active frequency limit of the socket. |
|
|
Get socket frequency range. |
Get socket frequency limit of the core. |
|
|
Set CPU rail isolated frequency policy for independent core clock control per power rail |
|
Get CPU rail isolated frequency policy status for independent core clock control per |
|
Set the DFCState enabling control. |
|
Get the current DFCState enabling control status. |
|
Get the core boost limit. |
|
Get the socket c0 residency. |
|
Set the core boostlimit value. |
|
Set the socket boostlimit value. |
|
Get the CPU core floor limit frequency. |
|
Get the CPU floor limit frequency. |
Get the CPU core effective floor limit frequency. |
|
|
Get the CPU effective floor limit frequency. |
|
Set the CPU core floor limit frequency. |
|
Set the CPU socket floor limit frequency. |
|
Set CPU floor limit frequency via MSR(Model Specific Register). |
Set CPU core MSR floor limit frequency. |
|
Get the CPU socket frequency range. |
|
|
Set the SDPS(Socket DIMM Power Sloshing) limit for a given processor socket. |
|
Get the current SDPS limit for a given processor socket. |
|
Get the DDR bandwidth data. |
|
Get socket temperature. |
|
Read Thermal Delta (TDELTA) Behavior |
Get Temperature of SVI3 VR(Voltage Rail) |
|
Get DIMM temperature range and refresh rate. |
|
Get DIMM power consumption. |
|
|
Get DIMM thermal sensor value. |
|
Read DIMM sideband register data |
|
Write Data to DIMM Sideband Register |
|
Set xgmi width. |
|
Set gmi3 link width range. |
|
Enable APB. |
|
Disable APB. |
|
Set NBIO lclk dpm level value. |
|
Get NBIO LCLK dpm level. |
|
Set pcie link rate. |
|
Set df pstate range. |
|
Set the Min and Max XGMI PState Range |
|
Get the Max and Min XGMI PState Range |
|
Get the PC6 Enable State |
|
Set the PC6 Enable State |
|
Get the Core C6 Enable State. |
|
Set the Core C6 Enable State. |
|
Get current input output bandwidth. |
|
Get current input output bandwidth. |
Get HSMP metrics table version |
|
|
Get HSMP metrics table |
Get first online core on socket. |
|
|
Get CPU family. |
|
Get CPU model. |
|
Retrieve the CPU processor model name based on the processor index. |
|
Get a description of provided AMDSMI error status for esmi errors. |
|
Get cpu cores per socket from sys filesystem. |
|
Get CPU socket count from sys filesystem. |
|
Get HSMP Enabled Commands information for a given CPU socket. |
|
Retrieves information about the NIC driver |
|
Retrieves ASIC information for the NIC |
|
Retrieves BUS information for the NIC |
|
Retrieves NUMA information for the NIC |
|
Retrieves PORT information for the NIC |
|
Retrieves RDMA devices information for the NIC |
|
Retrieve RDMA port statistics for the NIC |
|
Retrieves firmware version information for the NIC |
|
Retrieve PORT statistics for the specified NIC port |
|
Retrieve vendor specific statistics for the NIC port |
|
Get UMA carveout configuration information |
|
Set UMA carveout configuration |
Get TTM configuration information |
|
|
Set TTM pages limit |
Reset TTM pages limit to system default |
Module Contents#
- 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_NUM_XGMI_PHYSICAL_LINK: 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_XGMI_LINKS: 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 fromObj(pyobj) Any#
- as_c_void_p() Any#
- class rocm.bindings.amdsmi.amdsmi_init_flags_t#
Bases:
enum.IntEnumInitialization flags
Initialization flags may be OR’d together and passed to ::amdsmi_init().
- class rocm.bindings.amdsmi.amdsmi_mm_ip_t#
Bases:
enum.IntEnumGPU Capability info
- class rocm.bindings.amdsmi.amdsmi_container_types_t#
Bases:
enum.IntEnumContainer
- class rocm.bindings.amdsmi.amdsmi_hsmp_driver_version_t(*args, **kwargs)#
Bases:
rocm.bindings.util.types.PointerThis structure holds HSMP Driver version information.
- major: Any#
- minor: Any#
- static fromObj(pyobj) Any#
- as_c_void_p() Any#
- class rocm.bindings.amdsmi.amdsmi_processor_type_t#
Bases:
enum.IntEnumProcessor types detectable by AMD SMI
- rocm.bindings.amdsmi.processor_type_t#
- class rocm.bindings.amdsmi.amdsmi_status_t#
Bases:
enum.IntEnumError 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
- class rocm.bindings.amdsmi.amdsmi_clk_type_t#
Bases:
enum.IntEnumClock types
- class rocm.bindings.amdsmi.amdsmi_accelerator_partition_type_t#
Bases:
enum.IntEnumAccelerator Partition
- class rocm.bindings.amdsmi.amdsmi_accelerator_partition_resource_type_t#
Bases:
enum.IntEnumAccelerator Partition Resource Types
- class rocm.bindings.amdsmi.amdsmi_compute_partition_type_t#
Bases:
enum.IntEnumCompute 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
- class rocm.bindings.amdsmi.amdsmi_compute_partition_mem_alloc_mode_t#
Bases:
enum.IntEnumCompute 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
- class rocm.bindings.amdsmi.amdsmi_accelerator_partition_mem_alloc_mode_t#
Bases:
enum.IntEnumAccelerator Partition Memory Allocation Mode. Controls how GPU memory is allocated across XCPs within a memory partition.
- class rocm.bindings.amdsmi.amdsmi_memory_partition_type_t#
Bases:
enum.IntEnumMemory Partitions
- class rocm.bindings.amdsmi.amdsmi_temperature_type_t#
Bases:
enum.IntEnumThis enumeration is used to indicate from which part of the processor a temperature reading should be obtained.
- class rocm.bindings.amdsmi.amdsmi_fw_block_t#
Bases:
enum.IntEnumThe values of this enum are used to identify the various firmware blocks.
- class rocm.bindings.amdsmi.amdsmi_vram_type_t#
Bases:
enum.IntEnumvRam Types. This enum is used to identify various VRam types.
- class rocm.bindings.amdsmi.amdsmi_range_t(*args, **kwargs)#
Bases:
rocm.bindings.util.types.PointerThis structure represents a range (e.g., frequencies or voltages).
- lower_bound: Any#
- upper_bound: Any#
- reserved: Any#
- static fromObj(pyobj) Any#
- as_c_void_p() Any#
- class rocm.bindings.amdsmi.amdsmi_xgmi_info_t(*args, **kwargs)#
Bases:
rocm.bindings.util.types.PointerXGMI Information
- xgmi_lanes: Any#
- xgmi_hive_id: Any#
- xgmi_node_id: Any#
- index: Any#
- reserved: Any#
- static fromObj(pyobj) Any#
- as_c_void_p() Any#
- class rocm.bindings.amdsmi.amdsmi_vram_usage_t(*args, **kwargs)#
Bases:
rocm.bindings.util.types.PointerVRam Usage
- vram_total: Any#
- vram_used: Any#
- reserved: Any#
- static fromObj(pyobj) Any#
- as_c_void_p() Any#
- class rocm.bindings.amdsmi.amdsmi_violation_status_t(*args, **kwargs)#
Bases:
rocm.bindings.util.types.PointerThis 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 fromObj(pyobj) Any#
- as_c_void_p() Any#
- class rocm.bindings.amdsmi.amdsmi_frequency_range_t(*args, **kwargs)#
Bases:
rocm.bindings.util.types.PointerFrequency Range
- supported_freq_range: Any#
- current_freq_range: Any#
- reserved: Any#
- static fromObj(pyobj) Any#
- 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 fromObj(pyobj) Any#
- 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 fromObj(pyobj) Any#
- as_c_void_p() Any#
- class rocm.bindings.amdsmi.amdsmi_bdf_t(*args, **kwargs)#
Bases:
rocm.bindings.util.types.Pointerbdf types
- bdf: Any#
- as_uint: Any#
- static fromObj(pyobj) Any#
- as_c_void_p() Any#
- class rocm.bindings.amdsmi.amdsmi_enumeration_info_t(*args, **kwargs)#
Bases:
rocm.bindings.util.types.PointerStructure holds enumeration information
- drm_render: Any#
- drm_card: Any#
- hsa_id: Any#
- hip_id: Any#
- hip_uuid: Any#
- oam_id: Any#
- static fromObj(pyobj) Any#
- as_c_void_p() Any#
- class rocm.bindings.amdsmi.amdsmi_card_form_factor_t#
Bases:
enum.IntEnumCard Form Factor
- 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 fromObj(pyobj) Any#
- 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 fromObj(pyobj) Any#
- as_c_void_p() Any#
- class rocm.bindings.amdsmi.amdsmi_pcie_info_t(*args, **kwargs)#
Bases:
rocm.bindings.util.types.Pointerpcie information
- pcie_static: Any#
- pcie_metric: Any#
- reserved: Any#
- static fromObj(pyobj) Any#
- as_c_void_p() Any#
- class rocm.bindings.amdsmi.amdsmi_power_cap_info_t(*args, **kwargs)#
Bases:
rocm.bindings.util.types.PointerPower Cap Information
- power_cap: Any#
- default_power_cap: Any#
- dpm_cap: Any#
- min_power_cap: Any#
- max_power_cap: Any#
- reserved: Any#
- static fromObj(pyobj) Any#
- as_c_void_p() Any#
- class rocm.bindings.amdsmi.amdsmi_power_cap_type_t#
Bases:
enum.IntEnumPower Cap Package Power Tracking (PPT) type
- class rocm.bindings.amdsmi.amdsmi_vbios_info_t(*args, **kwargs)#
Bases:
rocm.bindings.util.types.PointerVBios Information
- name: Any#
- build_date: Any#
- part_number: Any#
- version: Any#
- boot_firmware: Any#
- reserved: Any#
- static fromObj(pyobj) Any#
- as_c_void_p() Any#
- class rocm.bindings.amdsmi.amdsmi_cache_property_type_t#
Bases:
enum.IntEnumcache properties
- 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#
- num_cache_instance: Any#
- reserved: Any#
- static fromObj(pyobj) Any#
- as_c_void_p() Any#
- class rocm.bindings.amdsmi.amdsmi_gpu_cache_info_t(*args, **kwargs)#
Bases:
rocm.bindings.util.types.PointerGPU Cache Information
- num_cache_types: Any#
- reserved: Any#
- static fromObj(pyobj) Any#
- 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 fromObj(pyobj) Any#
- as_c_void_p() Any#
- class rocm.bindings.amdsmi.amdsmi_fw_info_t(*args, **kwargs)#
Bases:
rocm.bindings.util.types.PointerFirmware Information
- num_fw_info: Any#
- reserved: Any#
- static fromObj(pyobj) Any#
- as_c_void_p() Any#
- class rocm.bindings.amdsmi.amdsmi_asic_info_t(*args, **kwargs)#
Bases:
rocm.bindings.util.types.PointerASIC 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 fromObj(pyobj) Any#
- as_c_void_p() Any#
- class rocm.bindings.amdsmi.amdsmi_kfd_info_t(*args, **kwargs)#
Bases:
rocm.bindings.util.types.PointerStructure holds kfd information
- kfd_id: Any#
- node_id: Any#
- current_partition_id: Any#
- reserved: Any#
- static fromObj(pyobj) Any#
- 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 fromObj(pyobj) Any#
- as_c_void_p() Any#
- class rocm.bindings.amdsmi.amdsmi_nps_caps_t(*args, **kwargs)#
Bases:
rocm.bindings.util.types.PointerThis union holds memory partition bitmask.
- nps_flags: Any#
- nps_cap_mask: Any#
- static fromObj(pyobj) Any#
- 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 fromObj(pyobj) Any#
- as_c_void_p() Any#
- class rocm.bindings.amdsmi.amdsmi_memory_partition_config_t(*args, **kwargs)#
Bases:
rocm.bindings.util.types.PointerMemory 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 fromObj(pyobj) Any#
- as_c_void_p() Any#
- class rocm.bindings.amdsmi.amdsmi_accelerator_partition_profile_t(*args, **kwargs)#
Bases:
rocm.bindings.util.types.PointerAccelerator Partition Resource Profile
- profile_type: Any#
- num_partitions: Any#
- memory_caps: Any#
- profile_index: Any#
- num_resources: Any#
- reserved: Any#
- static fromObj(pyobj) Any#
- as_c_void_p() Any#
- class rocm.bindings.amdsmi.amdsmi_accelerator_partition_resource_profile_t(*args, **kwargs)#
Bases:
rocm.bindings.util.types.PointerAccelerator Partition Resources. This struct is used to identify various partition resource profiles.
- profile_index: Any#
- resource_type: Any#
- partition_resource: Any#
- reserved: Any#
- static fromObj(pyobj) Any#
- as_c_void_p() Any#
- class rocm.bindings.amdsmi.amdsmi_accelerator_partition_profile_config_t(*args, **kwargs)#
Bases:
rocm.bindings.util.types.PointerAccelerator Partition Profile Configurations
- num_profiles: Any#
- num_resource_profiles: Any#
- default_profile_index: Any#
- reserved: Any#
- static fromObj(pyobj) Any#
- as_c_void_p() Any#
- class rocm.bindings.amdsmi.amdsmi_link_type_t#
Bases:
enum.IntEnumLink type
- class rocm.bindings.amdsmi.amdsmi_cpu_util_t(*args, **kwargs)#
Bases:
rocm.bindings.util.types.PointerThis 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 fromObj(pyobj) Any#
- as_c_void_p() Any#
- class rocm.bindings.amdsmi.amdsmi_link_status_t#
Bases:
enum.IntEnumLink Status
- class rocm.bindings.amdsmi.amdsmi_link_metrics_t__links(*args, **kwargs)#
Bases:
rocm.bindings.util.types.Pointer(No short description)
- bdf: Any#
- bit_rate: Any#
- max_bandwidth: Any#
- link_type: Any#
- read: Any#
- write: Any#
- link_status: Any#
- reserved: Any#
- static fromObj(pyobj) Any#
- as_c_void_p() Any#
- class rocm.bindings.amdsmi.amdsmi_link_metrics_t(*args, **kwargs)#
Bases:
rocm.bindings.util.types.PointerLink Metrics
- num_links: Any#
- reserved: Any#
- static fromObj(pyobj) Any#
- as_c_void_p() Any#
- class rocm.bindings.amdsmi.amdsmi_vram_info_t(*args, **kwargs)#
Bases:
rocm.bindings.util.types.PointerVRam Information
- vram_type: Any#
- vram_vendor: Any#
- vram_size: Any#
- vram_bit_width: Any#
- vram_max_bandwidth: Any#
- reserved: Any#
- static fromObj(pyobj) Any#
- as_c_void_p() Any#
- class rocm.bindings.amdsmi.amdsmi_driver_info_t(*args, **kwargs)#
Bases:
rocm.bindings.util.types.PointerDriver Information
- driver_version: Any#
- driver_date: Any#
- driver_name: Any#
- static fromObj(pyobj) Any#
- as_c_void_p() Any#
- class rocm.bindings.amdsmi.amdsmi_board_info_t(*args, **kwargs)#
Bases:
rocm.bindings.util.types.PointerBoard Information
- model_number: Any#
- product_serial: Any#
- fru_id: Any#
- product_name: Any#
- manufacturer_name: Any#
- reserved: Any#
- static fromObj(pyobj) Any#
- as_c_void_p() Any#
- class rocm.bindings.amdsmi.amdsmi_power_info_t(*args, **kwargs)#
Bases:
rocm.bindings.util.types.PointerPower 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 fromObj(pyobj) Any#
- as_c_void_p() Any#
- class rocm.bindings.amdsmi.amdsmi_clk_info_t(*args, **kwargs)#
Bases:
rocm.bindings.util.types.PointerClock Information
- clk: Any#
- min_clk: Any#
- max_clk: Any#
- clk_locked: Any#
- clk_deep_sleep: Any#
- reserved: Any#
- static fromObj(pyobj) Any#
- as_c_void_p() Any#
- class rocm.bindings.amdsmi.amdsmi_engine_usage_t(*args, **kwargs)#
Bases:
rocm.bindings.util.types.PointerEngine 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 fromObj(pyobj) Any#
- 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 fromObj(pyobj) Any#
- 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 fromObj(pyobj) Any#
- as_c_void_p() Any#
- class rocm.bindings.amdsmi.amdsmi_proc_info_t(*args, **kwargs)#
Bases:
rocm.bindings.util.types.PointerProcess 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 fromObj(pyobj) Any#
- 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 fromObj(pyobj) Any#
- 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 fromObj(pyobj) Any#
- as_c_void_p() Any#
- class rocm.bindings.amdsmi.amdsmi_proc_gpu_entry_t(*args, **kwargs)#
Bases:
rocm.bindings.util.types.PointerPer-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 fromObj(pyobj) Any#
- as_c_void_p() Any#
- class rocm.bindings.amdsmi.amdsmi_proc_info_by_pid_t(*args, **kwargs)#
Bases:
rocm.bindings.util.types.PointerProcess info aggregated across all GPUs, keyed by PID.
- pid: Any#
- name: Any#
- container_name: Any#
- num_gpus: Any#
- static fromObj(pyobj) Any#
- as_c_void_p() Any#
- class rocm.bindings.amdsmi.amdsmi_p2p_capability_t(*args, **kwargs)#
Bases:
rocm.bindings.util.types.PointerIO Link P2P Capability
- is_iolink_coherent: Any#
- is_iolink_atomics_32bit: Any#
- is_iolink_atomics_64bit: Any#
- is_iolink_dma: Any#
- is_iolink_bi_directional: Any#
- static fromObj(pyobj) Any#
- as_c_void_p() Any#
- class rocm.bindings.amdsmi.amdsmi_dev_perf_level_t#
Bases:
enum.IntEnumPowerPlay performance levels
- class rocm.bindings.amdsmi.amdsmi_event_group_t#
Bases:
enum.IntEnumEvent Groups Enum denoting an event group. The value of the enum is the base value for all the event enums in the group.
- class rocm.bindings.amdsmi.amdsmi_event_type_t#
Bases:
enum.IntEnumEvent 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>.
- class rocm.bindings.amdsmi.amdsmi_counter_command_t#
Bases:
enum.IntEnumEvent counter commands
- class rocm.bindings.amdsmi.amdsmi_counter_value_t(*args, **kwargs)#
Bases:
rocm.bindings.util.types.PointerCounter value
- value: Any#
- time_enabled: Any#
- time_running: Any#
- static fromObj(pyobj) Any#
- as_c_void_p() Any#
- class rocm.bindings.amdsmi.amdsmi_evt_notification_type_t#
Bases:
enum.IntEnumEvent notification event types
- class rocm.bindings.amdsmi.amdsmi_evt_notification_data_t(*args, **kwargs)#
Bases:
rocm.bindings.util.types.PointerEvent notification data returned from event notification API
- processor_handle: Any#
- event: Any#
- message: Any#
- static fromObj(pyobj) Any#
- as_c_void_p() Any#
- class rocm.bindings.amdsmi.amdsmi_temperature_metric_t#
Bases:
enum.IntEnumTemperature Metrics. This enum is used to identify various temperature metrics. Corresponding values will be in Celsius
- class rocm.bindings.amdsmi.amdsmi_voltage_metric_t#
Bases:
enum.IntEnumVoltage Metrics. This enum is used to identify various Voltage metrics. Corresponding values will be in millivolt.
- class rocm.bindings.amdsmi.amdsmi_voltage_type_t#
Bases:
enum.IntEnumThis ennumeration is used to indicate which type of voltage reading should be obtained.
- class rocm.bindings.amdsmi.amdsmi_power_profile_preset_masks_t#
Bases:
enum.IntEnumPre-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.
- class rocm.bindings.amdsmi.amdsmi_gpu_block_t#
Bases:
enum.IntEnumThis enum is used to identify different GPU blocks.
- class rocm.bindings.amdsmi.amdsmi_clk_limit_type_t#
Bases:
enum.IntEnumThe clk limit type
- class rocm.bindings.amdsmi.amdsmi_cper_sev_t#
Bases:
enum.IntEnumCper sev
- class rocm.bindings.amdsmi.amdsmi_cper_notify_type_t#
Bases:
enum.IntEnumCper notify
- class rocm.bindings.amdsmi.amdsmi_gpu_ras_policy_v4_0_t(*args, **kwargs)#
Bases:
rocm.bindings.util.types.PointerRas policy v4.0
- dram_non_critical_region_threshold: Any#
- dram_critical_region_threshold: Any#
- static fromObj(pyobj) Any#
- 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 fromObj(pyobj) Any#
- as_c_void_p() Any#
- class rocm.bindings.amdsmi.amdsmi_gpu_ras_policy_info_t(*args, **kwargs)#
Bases:
rocm.bindings.util.types.PointerRas policy info structure for storing version and different ras policy version structures
- major_version: Any#
- minor_version: Any#
- policy_data: Any#
- static fromObj(pyobj) Any#
- as_c_void_p() Any#
- class rocm.bindings.amdsmi.amdsmi_ras_err_state_t#
Bases:
enum.IntEnumThe current ECC state
- class rocm.bindings.amdsmi.amdsmi_memory_type_t#
Bases:
enum.IntEnumTypes of memory
- Note:
Sum of the process memory is not expected to be the total memory usage.
- class rocm.bindings.amdsmi.amdsmi_freq_ind_t#
Bases:
enum.IntEnumThe values of this enum are used as frequency identifiers.
- class rocm.bindings.amdsmi.amdsmi_xgmi_status_t#
Bases:
enum.IntEnumXGMI Status
- class rocm.bindings.amdsmi.amdsmi_memory_page_status_t#
Bases:
enum.IntEnumReserved Memory Page States
- class rocm.bindings.amdsmi.amdsmi_utilization_counter_type_t#
Bases:
enum.IntEnumThe utilization counter type
- class rocm.bindings.amdsmi.amdsmi_utilization_counter_t(*args, **kwargs)#
Bases:
rocm.bindings.util.types.PointerThe utilization counter data
The max number of values per counter type
- type: Any#
- value: Any#
- fine_value: Any#
- fine_value_count: Any#
- static fromObj(pyobj) Any#
- as_c_void_p() Any#
- class rocm.bindings.amdsmi.amdsmi_retired_page_record_t(*args, **kwargs)#
Bases:
rocm.bindings.util.types.PointerReserved Memory Page Record
- page_address: Any#
- page_size: Any#
- status: Any#
- static fromObj(pyobj) Any#
- as_c_void_p() Any#
- class rocm.bindings.amdsmi.amdsmi_power_profile_status_t(*args, **kwargs)#
Bases:
rocm.bindings.util.types.PointerThis 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 fromObj(pyobj) Any#
- as_c_void_p() Any#
- class rocm.bindings.amdsmi.amdsmi_frequencies_t(*args, **kwargs)#
Bases:
rocm.bindings.util.types.PointerThis structure holds information about clock frequencies.
- has_deep_sleep: Any#
- num_supported: Any#
- current: Any#
- frequency: Any#
- static fromObj(pyobj) Any#
- as_c_void_p() Any#
- class rocm.bindings.amdsmi.amdsmi_dpm_policy_entry_t(*args, **kwargs)#
Bases:
rocm.bindings.util.types.PointerThe dpm policy.
- policy_id: Any#
- policy_description: Any#
- static fromObj(pyobj) Any#
- as_c_void_p() Any#
- class rocm.bindings.amdsmi.amdsmi_dpm_policy_t(*args, **kwargs)#
Bases:
rocm.bindings.util.types.PointerDPM Policy
Only the first num_supported policies are valid.
- num_supported: Any#
- current: Any#
- static fromObj(pyobj) Any#
- as_c_void_p() Any#
- class rocm.bindings.amdsmi.amdsmi_pcie_bandwidth_t(*args, **kwargs)#
Bases:
rocm.bindings.util.types.PointerThis 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 fromObj(pyobj) Any#
- as_c_void_p() Any#
- class rocm.bindings.amdsmi.amdsmi_version_t(*args, **kwargs)#
Bases:
rocm.bindings.util.types.PointerThis structure holds version information.
- major: Any#
- minor: Any#
- release: Any#
- build: Any#
- static fromObj(pyobj) Any#
- as_c_void_p() Any#
- class rocm.bindings.amdsmi.amdsmi_od_vddc_point_t(*args, **kwargs)#
Bases:
rocm.bindings.util.types.PointerThis structure represents a point on the frequency-voltage plane.
- frequency: Any#
- voltage: Any#
- static fromObj(pyobj) Any#
- as_c_void_p() Any#
- class rocm.bindings.amdsmi.amdsmi_freq_volt_region_t(*args, **kwargs)#
Bases:
rocm.bindings.util.types.PointerThis 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 fromObj(pyobj) Any#
- as_c_void_p() Any#
- class rocm.bindings.amdsmi.amdsmi_od_volt_curve_t(*args, **kwargs)#
Bases:
rocm.bindings.util.types.PointerOD 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.PointerThis 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 fromObj(pyobj) Any#
- as_c_void_p() Any#
- class rocm.bindings.amdsmi.amd_metrics_table_header_t(*args, **kwargs)#
Bases:
rocm.bindings.util.types.PointerStructure 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 fromObj(pyobj) Any#
- as_c_void_p() Any#
- class rocm.bindings.amdsmi.amdsmi_gpu_xcp_metrics_t(*args, **kwargs)#
Bases:
rocm.bindings.util.types.PointerThe 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 fromObj(pyobj) Any#
- as_c_void_p() Any#
- class rocm.bindings.amdsmi.amdsmi_apu_metrics_t(*args, **kwargs)#
Bases:
rocm.bindings.util.types.PointerAPU 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_activityandtemperature_l3will contain 0xFFFF. Similarly, array elements beyond the version-specific count (e.g., elements 8-15 oftemperature_coreon 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 fromObj(pyobj) Any#
- as_c_void_p() Any#
- class rocm.bindings.amdsmi.amdsmi_gpu_metrics_t(*args, **kwargs)#
Bases:
rocm.bindings.util.types.PointerStructure 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#
- pcie_link_width: Any#
- pcie_link_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#
- xgmi_link_width: Any#
- xgmi_link_speed: 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#
- xgmi_link_status: Any#
- temperature_hbm_stacks: Any#
- temperature_mid: Any#
- temperature_aid: Any#
- current_uclk_aid: Any#
- current_socclks_mid: Any#
- apu_metrics: Any#
- static fromObj(pyobj) Any#
- as_c_void_p() Any#
- class rocm.bindings.amdsmi.amdsmi_xgmi_link_status_type_t#
Bases:
enum.IntEnumXGMI Link Status Type
- class rocm.bindings.amdsmi.amdsmi_xgmi_link_status_t(*args, **kwargs)#
Bases:
rocm.bindings.util.types.PointerXGMI Link Status
- total_links: Any#
- reserved: Any#
- static fromObj(pyobj) Any#
- as_c_void_p() Any#
- class rocm.bindings.amdsmi.amdsmi_name_value_t(*args, **kwargs)#
Bases:
rocm.bindings.util.types.PointerThis structure holds the name value pairs
- name: Any#
- value: Any#
- static fromObj(pyobj) Any#
- as_c_void_p() Any#
- class rocm.bindings.amdsmi.amdsmi_reg_type_t#
Bases:
enum.IntEnumThis register type for register table
- 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 fromObj(pyobj) Any#
- as_c_void_p() Any#
- class rocm.bindings.amdsmi.amdsmi_ras_feature_t(*args, **kwargs)#
Bases:
rocm.bindings.util.types.PointerThis structure holds ras feature information.
- ras_eeprom_version: Any#
- ecc_correction_schema_flag: Any#
- ras_info: Any#
- needs_reboot: Any#
- static fromObj(pyobj) Any#
- as_c_void_p() Any#
- class rocm.bindings.amdsmi.amdsmi_error_count_t(*args, **kwargs)#
Bases:
rocm.bindings.util.types.PointerThis structure holds error counts.
- correctable_count: Any#
- uncorrectable_count: Any#
- deferred_count: Any#
- reserved: Any#
- static fromObj(pyobj) Any#
- as_c_void_p() Any#
- class rocm.bindings.amdsmi.amdsmi_process_info_t(*args, **kwargs)#
Bases:
rocm.bindings.util.types.PointerThis 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 fromObj(pyobj) Any#
- as_c_void_p() Any#
- class rocm.bindings.amdsmi.amdsmi_topology_nearest_t(*args, **kwargs)#
Bases:
rocm.bindings.util.types.PointerTopology Nearest
- count: Any#
- reserved: Any#
- static fromObj(pyobj) Any#
- as_c_void_p() Any#
- class rocm.bindings.amdsmi.amdsmi_virtualization_mode_t#
Bases:
enum.IntEnumVariant placeholder
Place-holder “variant” for functions that have don’t have any variants, but do have monitors or sensors.
- class rocm.bindings.amdsmi.amdsmi_affinity_scope_t#
Bases:
enum.IntEnumScope for Numa affinity or Socket affinity
- class rocm.bindings.amdsmi.amdsmi_npm_status_t#
Bases:
enum.IntEnumNPM status
- class rocm.bindings.amdsmi.amdsmi_npm_info_t(*args, **kwargs)#
Bases:
rocm.bindings.util.types.PointerNPM info
- status: Any#
- limit: Any#
- ubb_power_threshold: Any#
- reserved: Any#
- static fromObj(pyobj) Any#
- as_c_void_p() Any#
- class rocm.bindings.amdsmi.amdsmi_ptl_data_format_t#
Bases:
enum.IntEnumPTL (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.
- class rocm.bindings.amdsmi.amdsmi_smu_fw_version_t(*args, **kwargs)#
Bases:
rocm.bindings.util.types.PointerThis structure holds SMU Firmware version information.
- debug: Any#
- minor: Any#
- major: Any#
- unused: Any#
- static fromObj(pyobj) Any#
- as_c_void_p() Any#
- class rocm.bindings.amdsmi.amdsmi_ddr_bw_metrics_t(*args, **kwargs)#
Bases:
rocm.bindings.util.types.PointerDDR bandwidth metrics.
- max_bw: Any#
- utilized_bw: Any#
- utilized_pct: Any#
- static fromObj(pyobj) Any#
- as_c_void_p() Any#
- class rocm.bindings.amdsmi.amdsmi_temp_range_refresh_rate_t(*args, **kwargs)#
Bases:
rocm.bindings.util.types.Pointertemperature range and refresh rate metrics of a DIMM
- range: Any#
- ref_rate: Any#
- static fromObj(pyobj) Any#
- as_c_void_p() Any#
- class rocm.bindings.amdsmi.amdsmi_dimm_power_t(*args, **kwargs)#
Bases:
rocm.bindings.util.types.PointerDIMM Power(mW), power update rate(ms) and dimm address
- power: Any#
- update_rate: Any#
- dimm_addr: Any#
- static fromObj(pyobj) Any#
- as_c_void_p() Any#
- class rocm.bindings.amdsmi.amdsmi_dimm_thermal_t(*args, **kwargs)#
Bases:
rocm.bindings.util.types.PointerDIMM temperature(°C) and update rate(ms) and dimm address
- sensor: Any#
- update_rate: Any#
- dimm_addr: Any#
- temp: Any#
- static fromObj(pyobj) Any#
- as_c_void_p() Any#
- class rocm.bindings.amdsmi.amdsmi_io_bw_encoding_t#
Bases:
enum.IntEnumxGMI Bandwidth Encoding types
- class rocm.bindings.amdsmi.amdsmi_link_id_bw_type_t(*args, **kwargs)#
Bases:
rocm.bindings.util.types.PointerLINK 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).
- bw_type: Any#
- link_name: Any#
- static fromObj(pyobj) Any#
- as_c_void_p() Any#
- class rocm.bindings.amdsmi.amdsmi_dpm_level_t(*args, **kwargs)#
Bases:
rocm.bindings.util.types.Pointermax 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 fromObj(pyobj) Any#
- as_c_void_p() Any#
- class rocm.bindings.amdsmi.amdsmi_hsmp_metrics_table_t(*args, **kwargs)#
Bases:
rocm.bindings.util.types.PointerHSMP 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 fromObj(pyobj) Any#
- as_c_void_p() Any#
- class rocm.bindings.amdsmi.amdsmi_cpu_info_t(*args, **kwargs)#
Bases:
rocm.bindings.util.types.Pointercpu 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 fromObj(pyobj) Any#
- as_c_void_p() Any#
- class rocm.bindings.amdsmi.amdsmi_sock_info_t(*args, **kwargs)#
Bases:
rocm.bindings.util.types.Pointercpu socket info data
- socket_id: Any#
- cores_per_socket: Any#
- static fromObj(pyobj) Any#
- as_c_void_p() Any#
- class rocm.bindings.amdsmi.amdsmi_nic_stat_t(*args, **kwargs)#
Bases:
rocm.bindings.util.types.PointerStructure for NIC statistic name-value pairs
This structure represents a single NIC statistic with its name and value.
- name: Any#
- value: Any#
- static fromObj(pyobj) Any#
- as_c_void_p() Any#
- class rocm.bindings.amdsmi.amdsmi_nic_asic_info_t(*args, **kwargs)#
Bases:
rocm.bindings.util.types.PointerNIC 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 fromObj(pyobj) Any#
- as_c_void_p() Any#
- class rocm.bindings.amdsmi.amdsmi_nic_bus_info_t(*args, **kwargs)#
Bases:
rocm.bindings.util.types.PointerNIC bus information
- bdf: Any#
- max_pcie_width: Any#
- max_pcie_speed: Any#
- pcie_interface_version: Any#
- slot_type: Any#
- static fromObj(pyobj) Any#
- as_c_void_p() Any#
- class rocm.bindings.amdsmi.amdsmi_nic_numa_info_t(*args, **kwargs)#
Bases:
rocm.bindings.util.types.PointerNIC NUMA information
- node: Any#
- affinity: Any#
- static fromObj(pyobj) Any#
- as_c_void_p() Any#
- class rocm.bindings.amdsmi.amdsmi_nic_fw_entry_t(*args, **kwargs)#
Bases:
rocm.bindings.util.types.PointerNIC firmware information
- name: Any#
- version: Any#
- static fromObj(pyobj) Any#
- as_c_void_p() Any#
- class rocm.bindings.amdsmi.amdsmi_nic_fw_info_t(*args, **kwargs)#
Bases:
rocm.bindings.util.types.PointerNIC firmware information collection
- num_fw: Any#
- static fromObj(pyobj) Any#
- as_c_void_p() Any#
- class rocm.bindings.amdsmi.amdsmi_nic_port_t(*args, **kwargs)#
Bases:
rocm.bindings.util.types.PointerNIC 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_fecparamstructure, specifically theactive_fecfield. 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#
- link_state: Any#
- link_speed: Any#
- active_fec: Any#
- autoneg: Any#
- pause_autoneg: Any#
- pause_rx: Any#
- pause_tx: Any#
- static fromObj(pyobj) Any#
- as_c_void_p() Any#
- class rocm.bindings.amdsmi.amdsmi_nic_port_info_t(*args, **kwargs)#
Bases:
rocm.bindings.util.types.PointerNIC port information collection
- num_ports: Any#
- static fromObj(pyobj) Any#
- as_c_void_p() Any#
- class rocm.bindings.amdsmi.amdsmi_nic_driver_info_t(*args, **kwargs)#
Bases:
rocm.bindings.util.types.PointerNIC driver information
- name: Any#
- version: Any#
- static fromObj(pyobj) Any#
- as_c_void_p() Any#
- class rocm.bindings.amdsmi.amdsmi_nic_rdma_port_info_t(*args, **kwargs)#
Bases:
rocm.bindings.util.types.PointerNIC RDMA port information
- netdev: Any#
- state: Any#
- rdma_port: Any#
- max_mtu: Any#
- active_mtu: Any#
- static fromObj(pyobj) Any#
- as_c_void_p() Any#
- class rocm.bindings.amdsmi.amdsmi_nic_rdma_dev_info_t(*args, **kwargs)#
Bases:
rocm.bindings.util.types.PointerNIC RDMA device information
- rdma_dev: Any#
- node_guid: Any#
- node_type: Any#
- sys_image_guid: Any#
- fw_ver: Any#
- num_rdma_ports: Any#
- static fromObj(pyobj) Any#
- as_c_void_p() Any#
- class rocm.bindings.amdsmi.amdsmi_nic_rdma_devices_info_t(*args, **kwargs)#
Bases:
rocm.bindings.util.types.PointerNIC RDMA devices information collection
- num_rdma_dev: Any#
- static fromObj(pyobj) Any#
- 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_flagsdecides 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_flagsto modify how AMDSMI initializes.
- init_flags (
- Returns:
A
tupleof 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
tupleof 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 tosocket_handles.On return,socket_countwill contain the number of socket handles written tosocket_handles,or the number of socket handles that could have been written if enough memory had been provided. Ifsocket_handlesis NULL, as output,socket_countwill 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.
- socket_count (
- Returns:
A
tupleof 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_handlemust be provided to retrieve the Socket ID.- Args:
- Returns:
A
tupleof 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_handlemust 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_countifprocessor_handlesis NULL. Then the number ofprocessor_countcan be pass as input to retrieval all processors on the socket toprocessor_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 toprocessor_handles.On return,processor_countwill contain the number of processor handles written toprocessor_handles,or the number of processor handles that could have been written if enough memory had been provided. Ifprocessor_handlesis NULL, as output,processor_countwill 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.
- socket_handle (
- Returns:
A
tupleof 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_handlemust be provided for the processor. Currently, only AMD GPUs are supported.- Args:
- Returns:
A
tupleof size 2 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_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:
- Returns:
A
tupleof size 2 that contains (in that order):amdsmi_status_t: amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on failamdsmi_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
nameas 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 validprocessor_handlemust be provided.- Args:
- Returns:
A
tupleof 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_cpusocketsandnr_cpucoreswill 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
- processor_handles (
- Returns:
A
tupleof size 4 that contains (in that order):amdsmi_status_t: amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on failint: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
listof 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.
- socket_handle (
- Returns:
A
tupleof 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.
- bdf (
- Returns:
A
tupleof size 2 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_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.
- processor_handle (
- Returns:
A
tupleof 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.
- processor_handle (
- Returns:
A
tupleof 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:
- Returns:
A
tupleof size 2 that contains (in that order):amdsmi_status_t: amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on failamdsmi_enumeration_info_t:Reference to Enumeration information structure. Must be allocated by user.
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 arraycpu_set_size, and a pointer to an array of int64_tcpu_set,andscope,this function will write the CPU affinity bitmask to the array pointed to bycpu_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.
- processor_handle (
- Returns:
A
tupleof 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:
- Returns:
A
tupleof 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_handlemust be provided for the processor.- Note:
Sockets are not supported on the @platform{host}.
The number of processor count is returned through
processor_countifprocessor_handlesis NULL. Then the number ofprocessor_countcan be pass as input to retrieval all processors on the socket toprocessor_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 toprocessor_handles.On return,processor_countwill contain the number of processor handles written toprocessor_handles,or the number of processor handles that could have been written if enough memory had been provided. Ifprocessor_handlesis NULL, as output,processor_countwill 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.
- socket_handle (
- Returns:
A
tupleof 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.
- processor_handle (
- Returns:
A
tupleof 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_handleand a pointer to a uint32_tid,this function will write the device id value to the uint64_t pointed to byid.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.
- processor_handle (
- Returns:
A
tupleof 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_handleand a pointer to a uint16_trevisionto which the revision id will be written- Args:
- Returns:
A
tupleof size 2 that contains (in that order):amdsmi_status_t: amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on failint: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 buffername,and a length of this bufferlen,this function will write the name of the vendor (up tolencharacters) buffername.Theidmay 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
lenbytes is not large enough to hold the entire name. In this case, onlylenbytes 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.
- processor_handle (
- Returns:
A
tupleof 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 bufferbrand,and a length of this bufferlen,this function will write the vram vendor of the device (up tolencharacters) to the bufferbrand.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:
- Returns:
A
tupleof 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_handleand a pointer to a uint32_tid,this function will write the subsystem device id value to the uint64_t pointed to byid.- 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.
- processor_handle (
- Returns:
A
tupleof 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 buffername,and a length of this bufferlen,this function will write the name of the device subsystem (up tolencharacters) to the buffername.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
lenbytes is not large enough to hold the entire name. In this case, onlylenbytes 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.
- processor_handle (
- Returns:
A
tupleof 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_handleand a pointer to a to an ::amdsmi_pcie_bandwidth_t structurebandwidth,this function will fill inbandwidthwith 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
- processor_handle (
- Returns:
A
tupleof 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_handleand a pointer to a uint64_tbdfid, this function will write the Bus/Device/Function PCI identifier (BDFID) associated with deviceprocessor_handleto the value pointed to bybdfid.The format of
bdfidwill 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.
- processor_handle (
- Returns:
A
tupleof 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_handleand a pointer to a int32_tnuma_node, this function will retrieve the NUMA node value associated with deviceprocessor_handleand store the value at location pointed to bynuma_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.
- processor_handle (
- Returns:
A
tupleof 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_handleand pointers to a uint64_t’s,sent,receivedandmax_pkt_sz,this function will write the number of bytes sent and received in 1 second tosentandreceived,respectively. The maximum possible packet size will be written tomax_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.
- processor_handle (
- Returns:
A
tupleof 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_handleand a pointer to a uint64_tcounter, 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 bycounter.- 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.
- processor_handle (
- Returns:
A
tupleof 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_handleand a 64 bit bitmaskbw_bitmask,this function will limit the set of allowable bandwidths. If a bit inbw_bitmaskhas 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:
- Returns:
A
tupleof 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_tenergy_accumulator,and a pointer to a uint64_ttimestamp,this function will write amount of energy consumed to the uint64_t pointed to byenergy_accumulator,and the timestamp to the uint64_t pointed to bytimestamp.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_accumulatorin micro Joules- timestamp (
PointerToUInt64/object) – IN,OUT: a pointer to uint64_t to which the timestamp will be written. Resolution: 1 ns.
- processor_handle (
- Returns:
A
tupleof 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.capmust 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
capvalue must be greater than 0.
- processor_handle (
- Returns:
A
tupleof 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_handleand aprofile.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
- processor_handle (
- Returns:
A
tupleof 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.
- processor_handle (
- Returns:
A
tupleof 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:
- Returns:
A
tupleof size 2 that contains (in that order):amdsmi_status_t: amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on failint: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:
- Returns:
A
tupleof size 2 that contains (in that order):amdsmi_status_t: amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on failint: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:
- Returns:
A
tupleof size 2 that contains (in that order):amdsmi_status_t: amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on failint: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
- processor_handle (
- Returns:
A
tupleof 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:
- Returns:
A
tupleof 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)
- processor_handle (
- Returns:
A
tupleof 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:
- Returns:
A
tupleof size 4 that contains (in that order):amdsmi_status_t: amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on failint: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:
- Returns:
A
tupleof 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 memorymem_type,and a pointer to a uint64_ttotal,this function will write the total amount ofmem_typememory that exists to the location pointed to bytotal.- 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.
- processor_handle (
- Returns:
A
tupleof 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_typememory that that is currently being used to the location pointed to byused.- 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.
- processor_handle (
- Returns:
A
tupleof 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_handlefor the number of bad pages (written tonum_pagesaddress). The results are written to address held by theinfopointer. 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:
- Returns:
A
tupleof size 3 that contains (in that order):amdsmi_status_t: amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on failint:Number of bad page records.
amdsmi_retired_page_record_t:The results will be written to the amdsmi_retired_page_record_t pointer.
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_handlefor the threshold of bad pages (written tothresholdaddress).- Note:
This function requires admin/sudo privileges
- Args:
- Returns:
A
tupleof size 2 that contains (in that order):amdsmi_status_t: amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on failint: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_handlefor the checksum of RAS EEPROM.- Note:
This function requires admin/sudo privileges
- Args:
- Returns:
A
tupleof size 1 that contains (in that order):amdsmi_status_t: amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on successAMDSMI_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 blockblock.Result will be written to address held by pointerstate.- 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.
- processor_handle (
- Returns:
A
tupleof 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 informationrecordscorresponding to the device with the provided processor handleprocessor_handle.The number of retired page records is returned throughnum_pages.recordsmay be NULL on input. In this case, the number of records available for retrieval will be returned throughnum_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 torecords.On return,num_pageswill contain the number of records written torecords,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.
- processor_handle (
- Returns:
A
tupleof 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_handleand a pointer to a uint32_tspeed,this function will write the current fan speed in RPMs to the uint32_t pointed to byspeed- 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.
- processor_handle (
- Returns:
A
tupleof 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_handleand a pointer to a uint32_tspeed,this function will write the current fan speed (a value between 0 and the maximum fan speed) to the uint32_t pointed to byspeed.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.
- processor_handle (
- Returns:
A
tupleof 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_handleand a pointer to a uint32_tmax_speed,this function will write the maximum fan speed possible to the uint32_t pointed to bymax_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.
- processor_handle (
- Returns:
A
tupleof 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:
- Returns:
A
tupleof size 2 that contains (in that order):amdsmi_status_t: amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on failamdsmi_gpu_cache_info_t:reference to the cache info struct. Must be allocated by user.
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 typesensor_type,a ::amdsmi_voltage_metric_tmetricand a pointer to an int64_tvoltage, this function will write the value of the metric indicated bymetricandsensor_typeto the memory locationvoltage.- 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.
- processor_handle (
- Returns:
A
tupleof 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:
- Returns:
A
tupleof 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_handleand a integer value indicating speedspeed,this function will attempt to set the fan speed tospeed.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:
- Returns:
A
tupleof 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
- processor_handle (
- Returns:
A
tupleof 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:
- Returns:
A
tupleof size 2 that contains (in that order):amdsmi_status_t: amdsmi_status_tint:vcn busy percentage (0-100)
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_countersarray.- timestamp (
PointerToUInt64/object) – IN,OUT: The timestamp when the counter is retrieved. Resolution: 1 ns.
- processor_handle (
- Returns:
A
tupleof 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 handleprocessor_handleand a pointer to a uint32_tperf.- 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.
- processor_handle (
- Returns:
A
tupleof 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_handleandclkvaluethis 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:
- Returns:
A
tupleof 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_handleand a pointer to a uint32_tod,this function will write the overdrive percentage to the uint32_t pointed to byod- 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.
- processor_handle (
- Returns:
A
tupleof 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_handleand a pointer to a uint32_tod,this function will write the overdrive percentage to the uint32_t pointed to byod- 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.
- processor_handle (
- Returns:
A
tupleof 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 typeclk_type,and a pointer to a to an ::amdsmi_frequencies_t structuref,this function will fill infwith 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.
- processor_handle (
- Returns:
A
tupleof 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:
- Returns:
A
tupleof 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_handleand a pointer to a ::amdsmi_od_volt_freq_data_t structureodv,this function will populateodv. 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.
- processor_handle (
- Returns:
A
tupleof 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_handleand 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
- processor_handle (
- Returns:
A
tupleof size 1 that contains (in that order):amdsmi_status_t: amdsmi_status_t
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_handleand a pointer to a ::amdsmi_gpu_metrics_t structurepgpu_metrics,this function will populatepgpu_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_metricswill 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_metricswill 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.
- processor_handle (
- Returns:
A
tupleof 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_handleand a pointer to a ::amdsmi_gpu_metrics_t structurepgpu_metrics,this function will populatepgpu_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_metricswill 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_metricswill 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.
- processor_handle (
- Returns:
A
tupleof 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_metricspointer, andnum_of_metricspointer, this function will write the pm metrics name value pair to the array atpm_metricsand the number of metrics retrieved tonum_of_metricsNote: 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.
- processor_handle (
- Returns:
A
tupleof size 1 that contains (in that order):amdsmi_status_t: amdsmi_status_t
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_metricspointer, andnum_of_metricspointer, this function will write the register metrics name value pair to the array atreg_metricsand the number of metrics retrieved tonum_of_metricsNote: 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.
- processor_handle (
- Returns:
A
tupleof size 1 that contains (in that order):amdsmi_status_t: amdsmi_status_t
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 typeclk_type,a valueclk_valueneeds to be set, and thelevelindicates 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.
- processor_handle (
- Returns:
A
tupleof 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 levellevel,a clock valueclkvalueand a clock typeclkTypethis 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
- processor_handle (
- Returns:
A
tupleof 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 pointvpointand a voltage valuevoltvaluethis 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.
- processor_handle (
- Returns:
A
tupleof 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 integernum_regionsand a buffer of ::amdsmi_freq_volt_region_t structures,buffer, this function will populatebufferwith the current frequency-volt space regions. The caller should assignbufferto 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 tobufferinnum_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.
- processor_handle (
- Returns:
A
tupleof 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_handleand a pointer to a ::amdsmi_power_profile_status_tstatus,this function will set the bits of the ::amdsmi_power_profile_status_t.available_profiles bit field ofstatusto 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.
- processor_handle (
- Returns:
A
tupleof 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_handleand an ::amdsmi_dev_perf_level_tperf_level, this function will set the PowerPlay performance level for the device to the valueperf_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
- processor_handle (
- Returns:
A
tupleof 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_handleand an overdrive levelod,this function will set the overdrive level for the device to the valueod.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:
- Returns:
A
tupleof 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 typeclk_type,and a 64 bit bitmaskfreq_bitmask,this function will limit the set of allowable frequencies. If a bit infreq_bitmaskhas 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.
- processor_handle (
- Returns:
A
tupleof 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 topolicy.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
- processor_handle (
- Returns:
A
tupleof 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_handleand a soc pstate policypolicy_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:
- Returns:
A
tupleof 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 topolicy.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
- processor_handle (
- Returns:
A
tupleof 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_handleand a dpm policypolicy_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:
- Returns:
A
tupleof 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 topisolate.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
- processor_handle (
- Returns:
A
tupleof 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_handleand a process isolationpisolate,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:
- Returns:
A
tupleof 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:
- Returns:
A
tupleof 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.IntEnumFabric telemetry categories
- class rocm.bindings.amdsmi.amdsmi_fabric_telemetry_category_mask_t#
Bases:
enum.IntEnumFabric telemetry category bitmask values
- class rocm.bindings.amdsmi.amdsmi_fabric_telemetry_item_t(*args, **kwargs)#
Bases:
rocm.bindings.util.types.PointerFabric telemetry item structure
- id: Any#
- value: Any#
- static fromObj(pyobj) Any#
- 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 fromObj(pyobj) Any#
- as_c_void_p() Any#
- class rocm.bindings.amdsmi.amdsmi_fabric_telemetry_instance_t(*args, **kwargs)#
Bases:
rocm.bindings.util.types.PointerFabric 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 fromObj(pyobj) Any#
- as_c_void_p() Any#
- class rocm.bindings.amdsmi.amdsmi_fabric_telemetry_dataset_t(*args, **kwargs)#
Bases:
rocm.bindings.util.types.PointerFabric telemetry dataset structure
Contains all telemetry for one category
- category: Any#
- generation_count: Any#
- timestamp: Any#
- instance_count: Any#
- instances: Any#
- static fromObj(pyobj) Any#
- as_c_void_p() Any#
- class rocm.bindings.amdsmi.amdsmi_fabric_telemetry_t(*args, **kwargs)#
Bases:
rocm.bindings.util.types.PointerFabric 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:
- Returns:
A
tupleof size 2 that contains (in that order):amdsmi_status_t: amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on failamdsmi_fabric_telemetry_t:Pointer to allocated telemetry structure
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
- processor_handle (
- Returns:
A
tupleof 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:
- Returns:
A
tupleof 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
- processor_handle (
- Returns:
A
tupleof 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.IntEnumFabric size constants
- class rocm.bindings.amdsmi.amdsmi_fabric_type_t#
Bases:
enum.IntEnumFabric type
- class rocm.bindings.amdsmi.amdsmi_fabric_npa_address_mode_t#
Bases:
enum.IntEnumFabric NPA address mode
- class rocm.bindings.amdsmi.amdsmi_fabric_accelerator_vpod_state_t#
Bases:
enum.IntEnumFabric accelerator vPoD state
- class rocm.bindings.amdsmi.amdsmi_fabric_info_v1_t(*args, **kwargs)#
Bases:
rocm.bindings.util.types.PointerFabric 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 fromObj(pyobj) Any#
- 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 fromObj(pyobj) Any#
- as_c_void_p() Any#
- class rocm.bindings.amdsmi.amdsmi_fabric_info_t(*args, **kwargs)#
Bases:
rocm.bindings.util.types.PointerFabric device information structure
- bdf: Any#
- fabric_version: Any#
- fabric_info: Any#
- reserved: Any#
- static fromObj(pyobj) Any#
- 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
infois 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:
- Returns:
A
tupleof 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
tupleof size 2 that contains (in that order):amdsmi_status_t: amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on failamdsmi_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_tblockand a pointer to an ::amdsmi_error_count_tec,this function will write the error count values for the GPU block indicated byblockto memory pointed to byec.- 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.
- processor_handle (
- Returns:
A
tupleof 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_tenabled_mask, this function will write bits to memory pointed to byenabled_blocks.Upon a successful call,enabled_blockscan 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.
- processor_handle (
- Returns:
A
tupleof 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:
- Returns:
A
tupleof size 2 that contains (in that order):amdsmi_status_t: amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on failamdsmi_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.PointerCper
- b: Any#
- static fromObj(pyobj) Any#
- 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 fromObj(pyobj) Any#
- 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 fromObj(pyobj) Any#
- 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 fromObj(pyobj) Any#
- 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 fromObj(pyobj) Any#
- 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 toafids.On return,num_afidswill contain the number of AF IDs written toafids,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.
- cper_buffer (
- Returns:
A
tupleof 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:
- Returns:
A
tupleof size 2 that contains (in that order):amdsmi_status_t: amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on failamdsmi_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.
- processor_handle (
- Returns:
A
tupleof 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_tblockand a pointer to an ::amdsmi_ras_err_state_tstate,this function will write the current state for the GPU block indicated byblockto memory pointed to bystate.- 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.
- processor_handle (
- Returns:
A
tupleof 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 codestatus.- 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
- status (
- Returns:
A
tupleof 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_handleand an event group specifiergroup, tell ifgrouptype events are supported by the device associated withprocessor_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
- processor_handle (
- Returns:
A
tupleof 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
typefor the device with a processor handle ofprocessor_handle,and write a handle to the object to the memory location pointed to byevnt_handle.evnt_handlecan 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.
- processor_handle (
- Returns:
A
tupleof 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
- evnt_handle (
- Returns:
A
tupleof 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
cmdon the event counter associated with the provided handleevt_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.
- evt_handle (
- Returns:
A
tupleof 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_handleand write the value to the location pointed to byvalue.- 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
- evt_handle (
- Returns:
A
tupleof 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 groupgrp,and a pointer to a uint32_tavailable,this function will write the number ofgrptype counters that are available on the device with handleprocessor_handleto the memory thatavailablepoints 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
- processor_handle (
- Returns:
A
tupleof 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
procsof ::amdsmi_process_info_t’s, of length *num_items,this function will write up to *num_itemsinstances of ::amdsmi_process_info_t to the memory pointed to byprocs.These instances contain information about each process utilizing a GPU. Ifprocsis not NULL,num_itemswill be updated with the number of processes actually written. Ifprocsis NULL,num_itemswill be updated with the number of processes for which there is current process information. Calling this function withprocsbeing NULL is a way to determine how much memory should be allocated for whenprocsis 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_itemswill 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
procsargument. On output, ifprocsis non-NULL, this will be updated with the number ::amdsmi_process_info_t structs actually written. Ifprocsis NULL, this argument will be updated with the number processes for which there is information.
- procs (
- Returns:
A
tupleof 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
procand a process idpid,this function will write the process information forpid,if available, to the memory pointed to byproc.- 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
pidwill be written if it is found.
- pid (
- Returns:
A
tupleof 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’sprocessor_handleicesof length *num_devices,this function will write up tonum_devicesdevice indices to the memory pointed to byprocessor_handleices.Ifprocessor_handleicesis not NULL,num_deviceswill be updated with the number of gpu’s currently being used by processpid.Ifprocessor_handleicesis NULL,processor_handleiceswill be updated with the number of gpus currently being used bypid.Calling this function withdv_indicesbeing NULL is a way to determine how much memory is required for whenprocessor_handleicesis 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_deviceswill 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_handleicesargument. On output, ifprocessor_handleicesis non-NULL, this will be updated with the number uint32_t’s actually written. Ifprocessor_handleicesis NULL, this argument will be updated with the number devices being used.
- pid (
- Returns:
A
tupleof 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_tstatus,this function will write the current XGMI error state ::amdsmi_xgmi_status_t for the deviceprocessor_handleto the memory pointed to bystatus.- 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.
- processor_handle (
- Returns:
A
tupleof 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 deviceprocessor_handleto amdsmi_xgmi_status_t::AMDSMI_XGMI_STATUS_NO_ERRORS- Args:
- Returns:
A
tupleof 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:
- Returns:
A
tupleof size 2 that contains (in that order):amdsmi_status_t: amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on failamdsmi_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)
- rocm.bindings.amdsmi.amdsmi_get_gpu_xgmi_link_status(processor_handle)#
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:
- Returns:
A
tupleof size 2 that contains (in that order):amdsmi_status_t: amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on failamdsmi_xgmi_link_status_t:The link status of the XGMI connect to this processor.
C signature
amdsmi_status_t amdsmi_get_gpu_xgmi_link_status(amdsmi_processor_handle processor_handle, amdsmi_xgmi_link_status_t * link_status)
- rocm.bindings.amdsmi.amdsmi_get_link_metrics(processor_handle)#
Return link metric information
@platform{gpu_bm_linux} @platform{host}
- Args:
- Returns:
A
tupleof size 2 that contains (in that order):amdsmi_status_t: amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on failamdsmi_link_metrics_t:reference to the link metrics struct. Must be allocated by user.
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_tnuma_node,this function will write the node number of NUMA CPU for the deviceprocessor_handleto the memory pointed to bynuma_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.
- processor_handle (
- Returns:
A
tupleof 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)
- rocm.bindings.amdsmi.amdsmi_topo_get_link_weight(processor_handle_src, processor_handle_dst, weight)#
Retrieve the weight for a connection between 2 GPUs
@platform{gpu_bm_linux}
Given a source processor handle
processor_handle_srcand a destination processor handleprocessor_handle_dst,and a pointer to an uint64_tweight,this function will write the weight for the connection between the deviceprocessor_handle_srcandprocessor_handle_dstto the memory pointed to byweight.The weight is a qualitative cost metric derived from the KFD io_link
weightproperty (lower values indicate closer or faster connections), similar in spirit to the NUMA distances reported bynumactl.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:
- Returns:
A
tupleof 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_srcand a destination processor handleprocessor_handle_dst,pointer to an uint64_tmin_bandwidth,and a pointer to uint64_tmax_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.
- processor_handle_src (
- Returns:
A
tupleof 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)
- rocm.bindings.amdsmi.amdsmi_topo_get_link_type(processor_handle_src, processor_handle_dst, hops, type)#
Retrieve the hops and the connection type between 2 GPUs
@platform{gpu_bm_linux}
Given a source processor handle
processor_handle_srcand a destination processor handleprocessor_handle_dst,and a pointer to an uint64_thopsand a pointer to an ::amdsmi_link_type_ttype,this function will write the number of hops and the connection type between the deviceprocessor_handle_srcandprocessor_handle_dstto the memory pointed to byhopsandtype.- Note:
The value written to
hopsis 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
amdgpudriver 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.
- processor_handle_src (
- Returns:
A
tupleof 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)
- rocm.bindings.amdsmi.amdsmi_get_link_topology_nearest(processor_handle, link_type, topology_nearest_info)#
- 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.
- processor_handle (
- Returns:
A
tupleof 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_srcand a destination processor handleprocessor_handle_dst,and a pointer to a boolaccessible,this function will write the P2P connection status between the deviceprocessor_handle_srcandprocessor_handle_dstto the memory pointed to byaccessible.- Args:
- Returns:
A
tupleof 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_srcand a destination processor handle
processor_handle_dst,a pointer to an amdsmi_link_type_ttype, and a pointer to amdsmi_p2p_capability_tcap.This function will write the connection- type, and io link capabilities between the device
processor_handle_srcandprocessor_handle_dstto the memory pointed to bycapandtype.- 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.
- processor_handle_src (
- Returns:
A
tupleof 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)
- Given a source processor handle
- 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_handleand a stringcompute_partition,and uint32len,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 passedcompute_partitionchar 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
lenbytes is not large enough to hold the entire compute partition value. In this case, onlylenbytes 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.
- processor_handle (
- Returns:
A
tupleof size 1 that contains (in that order):amdsmi_status_t: amdsmi_status_t
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 partitioncompute_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.
- processor_handle (
- Returns:
A
tupleof size 1 that contains (in that order):amdsmi_status_t: amdsmi_status_t
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_handleand a pointermode,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 cappedto 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:
- Returns:
A
tupleof size 2 that contains (in that order):amdsmi_status_t: (undocumented)amdsmi_compute_partition_mem_alloc_mode_t:a pointer to an ::amdsmi_compute_partition_mem_alloc_mode_t variable, into which the device’s current memory allocation mode will be written.
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_handleand a pointermode,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 cappedto 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:
- Returns:
A
tupleof size 2 that contains (in that order):amdsmi_status_t: (undocumented)amdsmi_accelerator_partition_mem_alloc_mode_t:a pointer to an ::amdsmi_accelerator_partition_mem_alloc_mode_t variable, into which the device’s current memory allocation mode will be written.
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_handleand a modemode,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 cappedto 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.
- processor_handle (
- Returns:
A
tupleof size 1 that contains (in that order):amdsmi_status_t: (undocumented)
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_handleand a modemode,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 cappedto 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.
- processor_handle (
- Returns:
A
tupleof size 1 that contains (in that order):amdsmi_status_t: (undocumented)
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_handleand a stringmemory_partition,and uint32len,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 passedmemory_partitionchar 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
lenbytes is not large enough to hold the entire memory partition value. In this case, onlylenbytes 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.
- processor_handle (
- Returns:
A
tupleof size 1 that contains (in that order):amdsmi_status_t: amdsmi_status_t
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_handleand a type of memory partitionmemory_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.
- processor_handle (
- Returns:
A
tupleof size 1 that contains (in that order):amdsmi_status_t: amdsmi_status_t
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:
- Returns:
A
tupleof size 2 that contains (in that order):amdsmi_status_t: amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on failamdsmi_memory_partition_config_t:reference to the memory partition config. Must be allocated by user.
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_handleand a type of memory partitionmode,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
- processor_handle (
- Returns:
A
tupleof 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:
- Returns:
A
tupleof size 2 that contains (in that order):amdsmi_status_t: amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on failamdsmi_accelerator_partition_profile_config_t:reference to the accelerator partition config. Must be allocated by user.
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.
- processor_handle (
- Returns:
A
tupleof size 2 that contains (in that order):amdsmi_status_t: amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on failamdsmi_accelerator_partition_profile_t:reference to the accelerator partition profile. Must be allocated by user.
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:
- Returns:
A
tupleof 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:
- Returns:
A
tupleof 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_handleand amaskconsisting of elements of ::amdsmi_evt_notification_type_t OR’d together, this function will listen for the events specified inmaskon the device corresponding toprocessor_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).
- processor_handle (
- Returns:
A
tupleof 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_msin milliseconds and a caller- provided buffer of ::amdsmi_evt_notification_data_t’sdatawith a length (in ::amdsmi_evt_notification_data_t’s, also specified by the caller) in the memory location pointed to bynum_elem,this function will collect ::amdsmi_evt_notification_type_t events for up totimeout_msmilliseconds, and write up to *num_elemevent items todata.Upon returnnum_elemis 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 bynum_elemwill 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 tonum_elemevent items will be written todata.
- timeout_ms (
- Returns:
A
tupleof 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_handlewill 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:
- Returns:
A
tupleof 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:
- Returns:
A
tupleof size 2 that contains (in that order):amdsmi_status_t: amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on failamdsmi_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:
- Returns:
A
tupleof size 2 that contains (in that order):amdsmi_status_t: amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on failamdsmi_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:
- Returns:
A
tupleof size 2 that contains (in that order):amdsmi_status_t: amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on failamdsmi_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:
- Returns:
A
tupleof size 2 that contains (in that order):amdsmi_status_t: amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on failamdsmi_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:
- Returns:
A
tupleof size 2 that contains (in that order):amdsmi_status_t: amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on failamdsmi_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:
- Returns:
A
tupleof size 2 that contains (in that order):amdsmi_status_t: amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on failamdsmi_power_cap_info_t:Reference to power caps information structure. Must be allocated by user.
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:
- Returns:
A
tupleof size 2 that contains (in that order):amdsmi_status_t: amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on failamdsmi_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:
- Returns:
A
tupleof size 1 that contains (in that order):amdsmi_status_t: (undocumented)
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:
- Returns:
A
tupleof 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:
- Returns:
A
tupleof size 2 that contains (in that order):amdsmi_status_t: amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on failamdsmi_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:
- Returns:
A
tupleof size 2 that contains (in that order):amdsmi_status_t: amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on failamdsmi_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 typesensor_type,a ::amdsmi_temperature_metric_tmetricand a pointer to an int64_ttemperature, this function will write the value of the metric indicated bymetricandsensor_typeto the memory locationtemperature.- 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.
- processor_handle (
- Returns:
A
tupleof 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:
- Returns:
A
tupleof size 2 that contains (in that order):amdsmi_status_t: amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on failamdsmi_engine_usage_t:Reference to the gpu engine usage structure. Must be allocated by user. When
gfx_activityis 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:
- Returns:
A
tupleof size 2 that contains (in that order):amdsmi_status_t: amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on failamdsmi_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:
- Returns:
A
tupleof size 2 that contains (in that order):amdsmi_status_t: amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on failbool: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.
- processor_handle (
- Returns:
A
tupleof size 2 that contains (in that order):amdsmi_status_t: amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on failamdsmi_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:
- Returns:
A
tupleof size 2 that contains (in that order):amdsmi_status_t: amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on failamdsmi_vram_usage_t:Reference to vram information. Must be allocated by user.
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:
- Returns:
A
tupleof size 2 that contains (in that order):amdsmi_status_t: amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on failamdsmi_violation_status_t:Reference to all violation status details available. Must be allocated by user.
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.
- processor_handle (
- Returns:
A
tupleof 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).
- processor_handles (
- Returns:
A
tupleof 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:
- Returns:
A
tupleof 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:
- Returns:
A
tupleof 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:
- Returns:
A
tupleof 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)
- processor_handle (
- Returns:
A
tupleof 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 toprocessor_handles.On return,socket_countwill contain the number of processor handles written toprocessor_handles,or the number of processor handles that could have been written if enough memory had been provided. Ifprocessor_handlesis NULL, as output,cpu_countwill 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.
- cpu_count (
- Returns:
A
tupleof 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 toprocessor_handles.On return,cores_countwill contain the number of core processor handles written toprocessor_handles,or the number of core processor handles that could have been written if enough memory had been provided. Ifprocessor_handlesis NULL, as output,processor_countwill 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.
- cores_count (
- Returns:
A
tupleof 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
- processor_handle (
- Returns:
A
tupleof 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
- processor_handle (
- Returns:
A
tupleof 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
- threads_per_core (
- Returns:
A
tupleof 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
- processor_handle (
- Returns:
A
tupleof 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
- processor_handle (
- Returns:
A
tupleof 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
- processor_handle (
- Returns:
A
tupleof 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.
- processor_handle (
- Returns:
A
tupleof 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
- processor_handle (
- Returns:
A
tupleof 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
- processor_handle (
- Returns:
A
tupleof 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:
- Returns:
A
tupleof 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:
- Returns:
A
tupleof 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.
- processor_handle (
- Returns:
A
tupleof 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
- processor_handle (
- Returns:
A
tupleof 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:
- Returns:
A
tupleof 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:
- Returns:
A
tupleof 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:
- Returns:
A
tupleof 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
- processor_handle (
- Returns:
A
tupleof 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
- processor_handle (
- Returns:
A
tupleof 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:
- Returns:
A
tupleof 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:
- Returns:
A
tupleof 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
- processor_handle (
- Returns:
A
tupleof 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
- processor_handle (
- Returns:
A
tupleof 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
- processor_handle (
- Returns:
A
tupleof 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
- processor_handle (
- Returns:
A
tupleof 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:
- Returns:
A
tupleof 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:
- Returns:
A
tupleof 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:
- Returns:
A
tupleof 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:
- Returns:
A
tupleof 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
tupleof size 3 that contains (in that order):amdsmi_status_t: amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on failint: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:
- Returns:
A
tupleof 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:
- Returns:
A
tupleof size 2 that contains (in that order):amdsmi_status_t: amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on failint: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
- processor_handle (
- Returns:
A
tupleof 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
- processor_handle (
- Returns:
A
tupleof 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:
- Returns:
A
tupleof size 2 that contains (in that order):amdsmi_status_t: ccessful register read, non-zero on failureint:- 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
- processor_handle (
- Returns:
A
tupleof 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
- processor_handle (
- Returns:
A
tupleof 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
- processor_handle (
- Returns:
A
tupleof 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
- processor_handle (
- Returns:
A
tupleof 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
- processor_handle (
- Returns:
A
tupleof size 1 that contains (in that order):amdsmi_status_t: ccessful register read, non-zero on failure
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
- processor_handle (
- Returns:
A
tupleof size 1 that contains (in that order):amdsmi_status_t: ccessful register write, non-zero on failure
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:
- Returns:
A
tupleof 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)
- rocm.bindings.amdsmi.amdsmi_set_cpu_gmi3_link_width_range(processor_handle, min_link_width, max_link_width)#
Set gmi3 link width range.
@platform{cpu_bm}
- Args:
- Returns:
A
tupleof 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:
- Returns:
A
tupleof 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:
- Returns:
A
tupleof 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:
- Returns:
A
tupleof 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
- processor_handle (
- Returns:
A
tupleof 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)
- rocm.bindings.amdsmi.amdsmi_set_cpu_pcie_link_rate(processor_handle, rate_ctrl, prev_mode)#
Set pcie link rate.
@platform{cpu_bm}
- Args:
- Returns:
A
tupleof 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:
- Returns:
A
tupleof 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:
- Returns:
A
tupleof 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:
- Returns:
A
tupleof size 3 that contains (in that order):amdsmi_status_t: amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on failint: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:
- Returns:
A
tupleof size 2 that contains (in that order):amdsmi_status_t: amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on failint: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:
- Returns:
A
tupleof 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:
- Returns:
A
tupleof 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:
- Returns:
A
tupleof size 1 that contains (in that order):amdsmi_status_t: SS on success, non-zero on fail
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
- processor_handle (
- Returns:
A
tupleof 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
- processor_handle (
- Returns:
A
tupleof 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.
- processor_handle (
- Returns:
A
tupleof 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.
- processor_handle (
- Returns:
A
tupleof 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
- processor_handle (
- Returns:
A
tupleof 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
- cpu_family (
- Returns:
A
tupleof 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
- cpu_model (
- Returns:
A
tupleof 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:
- Returns:
A
tupleof 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_tstructure 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 codestatus.- 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
- status (
- Returns:
A
tupleof 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
- sock_count (
- Returns:
A
tupleof 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
- sock_count (
- Returns:
A
tupleof 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
- processor_handle (
- Returns:
A
tupleof 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:
- Returns:
A
tupleof size 2 that contains (in that order):amdsmi_status_t: amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on failamdsmi_nic_driver_info_t:reference to the nic driver info struct. Must be allocated by user.
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:
- Returns:
A
tupleof size 2 that contains (in that order):amdsmi_status_t: amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on failamdsmi_nic_asic_info_t:reference to the nic asic info struct. Must be allocated by user.
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:
- Returns:
A
tupleof size 2 that contains (in that order):amdsmi_status_t: amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on failamdsmi_nic_bus_info_t:reference to the nic bus info struct. Must be allocated by user.
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:
- Returns:
A
tupleof size 2 that contains (in that order):amdsmi_status_t: amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on failamdsmi_nic_numa_info_t:reference to the nic numa info struct. Must be allocated by user.
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:
- Returns:
A
tupleof size 2 that contains (in that order):amdsmi_status_t: amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on failamdsmi_nic_port_info_t:reference to the nic port info struct. Must be allocated by user.
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:
- Returns:
A
tupleof size 2 that contains (in that order):amdsmi_status_t: amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on failamdsmi_nic_rdma_devices_info_t:reference to the nic rdma devices info struct. Must be allocated by user.
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
- processor_handle (
- Returns:
A
tupleof size 2 that contains (in that order):amdsmi_status_t: amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on failamdsmi_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:
- Returns:
A
tupleof size 2 that contains (in that order):amdsmi_status_t: amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on failamdsmi_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
- processor_handle (
- Returns:
A
tupleof size 2 that contains (in that order):amdsmi_status_t: amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on failamdsmi_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
- processor_handle (
- Returns:
A
tupleof size 2 that contains (in that order):amdsmi_status_t: amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on failamdsmi_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.PointerUMA carveout option descriptor
- index: Any#
- description: Any#
- static fromObj(pyobj) Any#
- as_c_void_p() Any#
- class rocm.bindings.amdsmi.amdsmi_uma_carveout_info_t(*args, **kwargs)#
Bases:
rocm.bindings.util.types.PointerUMA carveout configuration information
- current_index: Any#
- num_options: Any#
- static fromObj(pyobj) Any#
- as_c_void_p() Any#
- class rocm.bindings.amdsmi.amdsmi_ttm_info_t(*args, **kwargs)#
Bases:
rocm.bindings.util.types.PointerTTM (Translation Table Manager) configuration information
- current_pages: Any#
- static fromObj(pyobj) Any#
- 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:
- Returns:
A
tupleof 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:
- Returns:
A
tupleof 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
tupleof 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
- pages (
- Returns:
A
tupleof 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
tupleof 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()