Add 'projects/amdsmi/' from commit 'b4b3539631460b986dddc86a2303cef11cd38816'

git-subtree-dir: projects/amdsmi
git-subtree-mainline: 0633d8d8ce
git-subtree-split: b4b3539631
This commit is contained in:
Ameya Keshava Mallya
2025-11-17 22:28:37 +00:00
302 changed files with 140753 additions and 0 deletions
+14
View File
@@ -0,0 +1,14 @@
!.sphinx/
!.doxygen/
/_build/
/_doxygen/
/_images/
/_static/
/_templates/
/html/
/latex/
404.md
data/AMD-404.png
# file below is overwritten by sphinx script!
./esmi_lib_readme_link.md
@@ -0,0 +1,296 @@
#
# Copyright (C) Advanced Micro Devices. All rights reserved.
#
# Permission is hereby granted, free of charge, to any person obtaining a copy of
# this software and associated documentation files (the "Software"), to deal in
# the Software without restriction, including without limitation the rights to
# use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
# the Software, and to permit persons to whom the Software is furnished to do so,
# subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in all
# copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
# FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
import re
import os
from pathlib import Path
from docutils import nodes
from docutils.parsers.rst import Directive, directives
from sphinx.application import Sphinx
from sphinx.util.typing import ExtensionMetadata
class GoApiRefDirective(Directive):
"""
Directive for generating Go API reference documentation.
Usage:
.. go-api-ref:: path/to/gofile.go
:section: gpu
"""
required_arguments = 1 # Requires one argument: the path to the Go file
optional_arguments = 0
has_content = False
option_spec = {
"section": directives.unchanged, # Optional section filter
}
def run(self):
# Get the path to the Go file
go_file_path = self.arguments[0]
env = self.state.document.settings.env
# Get the section filter if provided
section_filter = self.options.get("section", None)
# Resolve the path relative to the document
doc_dir = Path(env.doc2path(env.docname)).parent
source_path = (doc_dir / go_file_path).resolve()
# Check if the file exists
if not source_path.exists():
msg = f"Go source file not found: {source_path}"
return [nodes.warning("", nodes.paragraph("", msg))]
# Parse the Go file and generate documentation
functions = parse_go_file(str(source_path))
# Create a container for the API documentation
container = nodes.container()
container["classes"].append("go-api-reference")
# Add the API documentation to the container
content = generate_rst_content(functions, section_filter)
self.state_machine.insert_input(content, source=str(source_path))
return [container]
def parse_go_file(file_path):
"""Parse a Go file and extract function documentation."""
with open(file_path, "r") as f:
content = f.read()
# Pattern to match function documentation and definition
pattern = r"(\/\/[^\n]*(?:\n\/\/[^\n]*)*)\n\s*func\s+([A-Za-z0-9_]+)\s*\((.*?)\)\s*(\(.*?\)|\w+)\s*\{"
matches = re.findall(pattern, content, re.DOTALL)
functions = []
for match in matches:
doc_comment = match[0]
func_name = match[1]
params = match[2].strip()
return_type = match[3].strip()
# Process the comment lines
doc_lines = []
for line in doc_comment.split("\n"):
if line.strip().startswith("//"):
# Remove the comment marker and one space after it (if present)
comment_text = line.strip()[2:]
if comment_text.startswith(" "):
comment_text = comment_text[1:]
doc_lines.append(comment_text)
# Extract sections from the doc comment
description = []
input_params = []
output_params = []
example = []
current_section = "description"
for line in doc_lines:
if line.startswith("Input parameter"):
current_section = "input"
input_params.append(line)
elif line.startswith("Output:"):
current_section = "output"
output_params.append(line)
elif line.startswith("Example:"):
current_section = "example"
example.append(line)
elif current_section == "description":
description.append(line)
elif current_section == "input":
input_params.append(line)
elif current_section == "output":
output_params.append(line)
elif current_section == "example":
example.append(line)
# Combine description lines into a single line
desc_text = " ".join([line.strip() for line in description if line.strip()])
# Combine output lines into a single line
output_text = " ".join([line.strip() for line in output_params if line.strip()])
# Determine the section based on function name
parts = func_name.split("_")
section = parts[1] if len(parts) > 1 else "other"
functions.append(
{
"name": func_name,
"params": params,
"return_type": return_type,
"description": desc_text,
"input_params": "\n".join(input_params).strip(),
"output_params": output_text,
"example": "\n".join(example).strip(),
"section": section.lower(), # Store the section for filtering
}
)
return functions
def generate_rst_content(functions, section_filter=None):
"""Generate reStructuredText content from parsed functions."""
lines = []
# Filter functions by section if a filter is provided
if section_filter:
section_filter = section_filter.lower()
functions = [f for f in functions if f["section"] == section_filter]
if not functions:
lines.append(f"No functions found in section: {section_filter}")
return lines
# Group functions by prefix if no section filter is provided
if not section_filter:
# Group functions by prefix (e.g., GO_gpu_, GO_cpu_)
function_groups = {}
for func in functions:
section = func["section"]
if section not in function_groups:
function_groups[section] = []
function_groups[section].append(func)
# Define the order of sections (GPU first, then CPU, then others)
section_order = []
# Add GPU section first if it exists
if "gpu" in function_groups:
section_order.append("gpu")
# Add CPU section next if it exists
if "cpu" in function_groups:
section_order.append("cpu")
# Add all other sections in alphabetical order
for prefix in sorted(function_groups.keys()):
if prefix not in ["gpu", "cpu"]:
section_order.append(prefix)
# Write each group in the specified order
for section in section_order:
funcs = function_groups[section]
lines.append(f"{section.upper()} Functions")
lines.append("-" * len(f"{section.upper()} Functions"))
lines.append("")
for func in funcs:
add_function_documentation(lines, func)
else:
# If a section filter is provided, just document those functions without section headers
for func in functions:
add_function_documentation(lines, func)
return lines
def add_function_documentation(lines, func):
"""Add documentation for a single function to the lines list."""
lines.append(func['name'])
lines.append("~" * len(f"``{func['name']}``"))
lines.append("")
# Function signature
return_type = func["return_type"]
if return_type.startswith("(") and return_type.endswith(")"):
return_type = return_type[1:-1]
lines.append(".. code-block:: go")
lines.append("")
lines.append(f" func {func['name']}({func['params']}) {return_type}")
lines.append("")
# Description
if func["description"]:
lines.append(func["description"])
lines.append("")
# Input parameters
if func["input_params"]:
for input_line in func["input_params"].split("\n"):
lines.append(input_line)
lines.append("")
# Output parameters
if func["output_params"]:
lines.append(func["output_params"])
lines.append("")
# Example
if func["example"]:
# Process the example to properly format code blocks
example_lines = func["example"].split("\n")
in_code_block = False
for i, line in enumerate(example_lines):
stripped_line = line.strip()
# Check if this is the Example: line
if stripped_line == "Example:":
lines.append("Example:")
continue
# Check if we're entering a code block
if (
not in_code_block
and i > 0
and (
stripped_line.startswith("import")
or stripped_line.startswith("if")
or stripped_line.startswith("for")
)
):
in_code_block = True
lines.append("")
lines.append(".. code-block:: go")
lines.append("")
# Add the line to the formatted example
if in_code_block:
# For code blocks, add indentation
lines.append(f" {line}")
elif stripped_line: # Only add non-empty lines outside code blocks
lines.append(line)
lines.append("")
def setup(app):
"""
Setup function for Sphinx extension.
This will be called by Sphinx when the extension is loaded.
"""
# Register the directive
app.add_directive("go-api-ref", GoApiRefDirective)
return {
"version": "0.1.0",
"parallel_read_safe": True,
"parallel_write_safe": True,
}
+95
View File
@@ -0,0 +1,95 @@
---
myst:
html_meta:
"description lang=en": "AMD SMI for reliability, availability, serviceability."
"keywords": "system, management, interface, cper, log, error, spec, ecc, afid, fault, ras"
---
# Reliability, availability, serviceability (RAS)
RAS aims to increase the robustness of a system by detecting hardware errors, recording them, and
correcting them where possible. See [Reliability, availability, serviceability (Linux
kernel)](https://docs.kernel.org/admin-guide/RAS/main.html) for more general information.
## ECC
ECC (Error-Correcting Code) is a type of memory to automatically detect errors. Correctable 1-bit
errors are handled by the ECC logic and logged by the hardware. Uncorrectable 2-bit errors can be
detected but not reliably fixed; this is a more serious event that must be reported. See [RAS Error
Count sysfs Interface](https://docs.kernel.org/gpu/amdgpu/ras.html#ras-error-count-sysfs-interface)
to learn how AMD SMI accesses error counts.
While ECC is a mechanism to handle different errors, CPER is the standard used to report that the event
occurred.
## CPER
At its core, CPER (Common Platform Error Record) is a standard format included in the [UEFI
specification](https://uefi.org/specs/UEFI/2.10/01_Introduction.html) to report errors to the
operating system. It works as a standard error report template that different hardware components
can fill out when something goes wrong. It consists of a header, one or more section descriptors --
and for each descriptor, an associated section containing error or informational data. See [CPER
(UEFI Specification)](https://uefi.org/specs/UEFI/2.10/Apx_N_Common_Platform_Error_Record.html) for
more information.
A CPER record consists of vital information for diagnostics such as:
- Error source
- Error type
- Error severity
- 0 - Recoverable (also called non-fatal uncorrected)
- 1 - Fatal
- 2 - Corrected
- 3 - Informational
- Timestamp
- Other data
A CPER record might contain an AFID in its data to help map a complex error to a more actionable service task.
## AFID
AFIDs (AMD Field ID) are unique numerical IDs associated with specific events or errors produced by
AMD Instinct accelerators. It provides a specific identifier for a known condition, which helps
facilitate root cause analysis. Each AFID is associated with category, type, and severity fields. See
[AFID Event List](https://docs.amd.com/r/en-US/AMD_Field_ID_70122_v1.0/AFID-Event-List) for more
information.
## From concept to action
AMD SMI provides tools to programmatically monitor and manage these RAS features.
:::::{tab-set}
::::{tab-item} C/C++
The AMD SMI library provides APIs to query ECC error counts and manage CPER records
(list, decode, and clear).
See [ECC information](/doxygen/docBin/html/group__tagECCInfo) and [RAS
information](/doxygen/docBin/html/group__tagRasInfo) for available APIs.
::::
::::{tab-item} Python
See related APIs:
- [](/reference/amdsmi-py-api.md#amdsmi_get_gpu_ecc_count)
- [](/reference/amdsmi-py-api.md#amdsmi_get_gpu_ecc_enabled)
- [](/reference/amdsmi-py-api.md#amdsmi_get_gpu_ecc_status)
- [](/reference/amdsmi-py-api.md#amdsmi_get_gpu_total_ecc_count)
- [](/reference/amdsmi-py-api.md#amdsmi_get_gpu_cper_entries)
- [](/reference/amdsmi-py-api.md#amdsmi_get_afids_from_cper)
- [](/reference/amdsmi-py-api.md#amdsmi_get_gpu_ras_feature_info)
- [](/reference/amdsmi-py-api.md#amdsmi_get_gpu_ras_block_features_enabled)
::::
::::{tab-item} amd-smi CLI
See [`amd-smi ras --help`](/how-to/amdsmi-cli-tool.md#amd-smi-ras) for details and available options.
```shell
amd-smi ras --help
```
::::
:::::
## Further reading
- [AMD Field ID](https://docs.amd.com/r/en-US/AMD_Field_ID_70122_v1.0/Introduction)
- [CPER (UEFI specification)](https://uefi.org/specs/UEFI/2.10/Apx_N_Common_Platform_Error_Record.html)
- [Reliability, availability, serviceability (Linux kernel)](https://docs.kernel.org/admin-guide/RAS/main.html)
+85
View File
@@ -0,0 +1,85 @@
# Configuration file for the Sphinx documentation builder.
#
# This file only contains a selection of the most common options. For a full
# list see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html
import re
import sys
from pathlib import Path
sys.path.append(str(Path("_extension").resolve()))
# get version number to print in docs
def get_version_info(filepath):
with open(filepath, "r") as f:
content = f.read()
version_pattern = (
r"^#define\s+AMDSMI_LIB_VERSION_MAJOR\s+(\d+)\s*$|"
r"^#define\s+AMDSMI_LIB_VERSION_MINOR\s+(\d+)\s*$|"
r"^#define\s+AMDSMI_LIB_VERSION_RELEASE\s+(\d+)\s*$"
)
matches = re.findall(version_pattern, content, re.MULTILINE)
if len(matches) == 3:
version_major, version_minor, version_release = [
match for match in matches if any(match)
]
return version_major[0], version_minor[1], version_release[2]
else:
raise ValueError("Couldn't find all VERSION numbers.")
version_major, version_minor, version_release = get_version_info(
"../include/amd_smi/amdsmi.h"
)
version_number = f"{version_major}.{version_minor}.{version_release}"
# project info
project = "AMD SMI"
author = "Advanced Micro Devices, Inc."
copyright = "Copyright (c) 2025 Advanced Micro Devices, Inc. All rights reserved."
version = version_number
release = version_number
html_theme = "rocm_docs_theme"
html_theme_options = {"flavor": "rocm"}
html_title = f"AMD SMI {version_number} documentation"
suppress_warnings = ["etoc.toctree"]
external_toc_path = "./sphinx/_toc.yml"
external_projects_current_project = "amdsmi"
extensions = ["rocm_docs", "rocm_docs.doxygen", "go_api_ref"]
doxygen_root = "doxygen"
doxysphinx_enabled = True
doxygen_project = {
"name": "AMD SMI C++ API reference",
"path": "doxygen/docBin/xml",
}
def generate_doxyfile(app, _):
doxyfile_in = Path(app.confdir) / doxygen_root / "Doxyfile.in"
doxyfile_out = Path(app.confdir) / doxygen_root / "Doxyfile"
if not doxyfile_in.exists():
from sphinx.errors import ConfigError
raise ConfigError(f"Missing Doxyfile.in at {doxyfile_in}")
with open(doxyfile_in) as f:
content = f.read()
content = content.replace("@PROJECT_NUMBER@", version_number)
with open(doxyfile_out, "w") as f:
f.write(content)
def setup(app):
app.connect("config-inited", generate_doxyfile, priority=100)
return {"parallel_read_safe": True, "parallel_write_safe": True}
Binary file not shown.

After

Width:  |  Height:  |  Size: 62 KiB

+2
View File
@@ -0,0 +1,2 @@
docBin/
Doxyfile
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,233 @@
---
myst:
html_meta:
"description lang=en": "Get started with the AMD SMI C++ library. Basic usage and examples."
"keywords": "api, smi, lib, c++, system, management, interface, ROCm"
---
# AMD SMI C++ library usage and examples
This section presents a brief overview and some basic examples on the AMD SMI
library's usage. Whether you are developing applications for performance
monitoring, system diagnostics, or resource allocation, the AMD SMI C++ library
serves as a valuable tool for leveraging the full potential of AMD hardware in
your projects.
```{note}
``hipcc`` and other compilers will not automatically link in the ``libamd_smi``
dynamic library. To compile code that uses the AMD SMI library API, ensure the
``libamd_smi.so`` can be located by setting the ``LD_LIBRARY_PATH`` environment
variable to the directory containing ``librocm_smi64.so`` (usually
``/opt/rocm/lib``) or by passing the ``-lamd_smi`` flag to the compiler.
```
```{note}
The environment variable ``AMDSMI_GPU_METRICS_CACHE_MS`` may be set to
control the internal GPU metrics cache duration (ms).
Default 1, set to 0 to disable.
```
```{note}
The environment variable ``AMDSMI_ASIC_INFO_CACHE_MS`` may be set to
control the internal GPU asic info cache duration (ms).
Default 10000 ms, set to 0 to disable.
```
```{seealso}
Refer to the [C++ library API reference](../reference/amdsmi-cpp-api.md).
```
(device_socket_handle)=
## Device and socket handles
Many functions in the library take a _socket handle_ or _device handle_. A
_socket_ refers to a physical hardware socket, abstracted by the library to
represent the hardware more effectively to the user. While there is always one
unique GPU per socket, an APU may house both a GPU and CPU on the same socket.
For MI200 GPUs, multiple GCDs may reside within a single socket
To identify the sockets in a system, use the `amdsmi_get_socket_handles()`
function, which returns a list of socket handles. These handles can then be used
with `amdsmi_get_processor_handles()` to query devices within each socket. The
device handle is used to differentiate between detected devices; however, it's
important to note that a device handle may change after restarting the
application, so it should not be considered a persistent identifier across
processes.
The list of socket handles obtained from `amdsmi_get_socket_handles()` can
also be used to query the CPUs in each socket by calling
`amdsmi_get_processor_handles_by_type()`. This function can then be called again
to query the cores within each CPU.
(cpp_hello_amdsmi)=
## Hello AMD SMI
An application using AMD SMI must call `amdsmi_init()` to initialize the AMI SMI
library before all other calls. This call initializes the internal data
structures required for subsequent AMD SMI operations. In the call, a flag can
be passed to indicate if the application is interested in a specific device
type.
`amdsmi_shut_down()` must be the last call to properly close connection to
driver and make sure that any resources held by AMD SMI are released.
1. A simple "Hello World" type program that displays the temperature of detected
devices.
```{note}
Sample build example:
$ g++ -I/opt/rocm/include <file_name>.cc -L/opt/rocm/lib -lamd_smi -o <filename>
Users /opt/rocm-*/bin path may differ (depending on install), please locate the path of your libamd_smi.so.*.
For example:
$ sudo find /opt/ -iname libamd_smi.so*
/opt/rocm-6.4.1/lib/libamd_smi.so.25.0
/opt/rocm-6.4.1/lib/libamd_smi.so
```
The code is as follows:
```cpp
#include <iostream>
#include <vector>
#include "amd_smi/amdsmi.h"
int main() {
amdsmi_status_t ret;
// Init amdsmi for sockets and devices. Here we are only interested in AMD_GPUS.
ret = amdsmi_init(AMDSMI_INIT_AMD_GPUS);
// Get all sockets
uint32_t socket_count = 0;
// Get the socket count available in the system.
ret = amdsmi_get_socket_handles(&socket_count, nullptr);
// Allocate the memory for the sockets
std::vector<amdsmi_socket_handle> sockets(socket_count);
// Get the socket handles in the system
ret = amdsmi_get_socket_handles(&socket_count, &sockets[0]);
std::cout << "Total Socket: " << socket_count << std::endl;
// For each socket, get identifier and devices
for (uint32_t i=0; i < socket_count; i++) {
// Get Socket info
char socket_info[128];
ret = amdsmi_get_socket_info(sockets[i], 128, socket_info);
std::cout << "Socket " << socket_info<< std::endl;
// Get the device count for the socket.
uint32_t device_count = 0;
ret = amdsmi_get_processor_handles(sockets[i], &device_count, nullptr);
// Allocate the memory for the device handlers on the socket
std::vector<amdsmi_processor_handle> processor_handles(device_count);
// Get all devices of the socket
ret = amdsmi_get_processor_handles(sockets[i],
&device_count, &processor_handles[0]);
// For each device of the socket, get name and temperature.
for (uint32_t j=0; j < device_count; j++) {
// Get device type. Since the amdsmi is initialized with
// AMD_SMI_INIT_AMD_GPUS, the processor_type must be AMDSMI_PROCESSOR_TYPE_AMD_GPU.
processor_type_t processor_type;
ret = amdsmi_get_processor_type(processor_handles[j], &processor_type);
if (processor_type != AMDSMI_PROCESSOR_TYPE_AMD_GPU) {
std::cout << "Expect AMDSMI_PROCESSOR_TYPE_AMD_GPU device type!\n";
return 1;
}
// Get device name
amdsmi_board_info_t board_info;
ret = amdsmi_get_gpu_board_info(processor_handles[j], &board_info);
std::cout << "\tdevice "
<< j <<"\n\t\tName:" << board_info.product_name << std::endl;
// Get temperature
int64_t val_i64 = 0;
ret = amdsmi_get_temp_metric(processor_handles[j], AMDSMI_TEMPERATURE_TYPE_EDGE,
AMDSMI_TEMP_CURRENT, &val_i64);
std::cout << "\t\tTemperature: " << val_i64 << "C" << std::endl;
}
}
// Clean up resources allocated at amdsmi_init. It will invalidate sockets
// and devices pointers
ret = amdsmi_shut_down();
return 0;
}
```
2. A sample program that displays the power of detected CPUs.
```{note}
Sample build example:
$ g++ -DENABLE_ESMI -I/opt/rocm/include <file_name>.cc -L/opt/rocm/lib -lamd_smi -o <filename>
For finding available rocm include and library path, see building example on sample program 1 above.
```
The code is as follows:
```cpp
#include <iostream>
#include <vector>
#include "amd_smi/amdsmi.h"
int main(int argc, char **argv) {
amdsmi_status_t ret;
uint32_t socket_count = 0;
// Initialize amdsmi for AMD CPUs
ret = amdsmi_init(AMDSMI_INIT_AMD_CPUS);
ret = amdsmi_get_socket_handles(&socket_count, nullptr);
// Allocate the memory for the sockets
std::vector<amdsmi_socket_handle> sockets(socket_count);
// Get the sockets of the system
ret = amdsmi_get_socket_handles(&socket_count, &sockets[0]);
std::cout << "Total Socket: " << socket_count << std::endl;
// For each socket, get cpus
for (uint32_t i = 0; i < socket_count; i++) {
uint32_t cpu_count = 0;
// Set processor type as AMDSMI_PROCESSOR_TYPE_AMD_CPU
processor_type_t processor_type = AMDSMI_PROCESSOR_TYPE_AMD_CPU;
ret = amdsmi_get_processor_handles_by_type(sockets[i], processor_type, nullptr, &cpu_count);
// Allocate the memory for the cpus
std::vector<amdsmi_processor_handle> plist(cpu_count);
// Get the cpus for each socket
ret = amdsmi_get_processor_handles_by_type(sockets[i], processor_type, &plist[0], &cpu_count);
for (uint32_t index = 0; index < plist.size(); index++) {
uint32_t socket_power;
std::cout<<"CPU "<<index<<"\t"<< std::endl;
std::cout<<"Power (Watts): ";
ret = amdsmi_get_cpu_socket_power(plist[index], &socket_power);
if(ret != AMDSMI_STATUS_SUCCESS)
std::cout<<"Failed to get cpu socket power"<<"["<<index<<"] , Err["<<ret<<"] "<< std::endl;
if (!ret) {
std::cout<<static_cast<double>(socket_power)/1000<<std::endl;
}
std::cout<<std::endl;
}
}
// Clean up resources allocated at amdsmi_init
ret = amdsmi_shut_down();
return 0;
}
```
@@ -0,0 +1,87 @@
---
myst:
html_meta:
"description lang=en": "Get started with the AMD SMI Go interface."
"keywords": "api, smi, lib, go, golang, system, management, interface, ROCm"
---
# AMD SMI Go interface overview
The AMD SMI Go interface provides a convenient way to interact with AMD
hardware through a simple and accessible [API](../reference/amdsmi-go-api.md).
The API is compatible with Go 1.20 and higher and requires the AMD driver to
be loaded for initialization. Review the [prerequisites](#install_reqs).
```{seealso}
Refer to the [Go library API reference](../reference/amdsmi-go-api.md).
```
(go_prereqs)=
## Prerequisites
Before get started, make sure your environment satisfies the following prerequisites.
See the [requirements](#install_reqs) section for more information.
1. Ensure `amdgpu` drivers are installed properly for initialization.
2. Export `LD_LIBRARY_PATH` to the `amdsmi` installation directory.
```bash
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/rocm/lib:/opt/rocm/lib64:
```
3. Install Go 1.20+.
Download Go from [https://go.dev/dl/](https://go.dev/dl/) and follow the
official installation documentation at [Download and
install](https://go.dev/doc/install).
Alternatively, use a third-party utility like update-golang.
```bash
git clone https://github.com/udhos/update-golang
cd update-golang
sudo ./update-golang.sh
source /etc/profile.d/golang_path.sh
go version
```
## Get started
```{note}
``hipcc`` and other compilers will not automatically link in the ``libamd_smi``
dynamic library. To compile code that uses the AMD SMI library API, ensure the
``libamd_smi.so`` can be located by setting the ``LD_LIBRARY_PATH`` environment
variable to the directory containing ``librocm_smi64.so`` (usually
``/opt/rocm/lib``) or by passing the ``-lamd_smi`` flag to the compiler.
```
A Go application using AMD SMI must call `goamdsmi.GO_gpu_init()` to initialize
the AMI SMI library before all other calls. This call initializes the internal
data structures required for subsequent AMD SMI operations.
`goamdsmi.GO_gpu_shutdown()` must be the last call to properly close connection to
driver and make sure that any resources held by AMD SMI are released.
## Usage
For an example on using the AMD SMI Go API, refer to this implementation
[https://github.com/amd/amd_smi_exporter/tree/master](https://github.com/amd/amd_smi_exporter/tree/master).
```{seealso}
Refer to the [Go library API reference](../reference/amdsmi-go-api.md).
```
### Add AMD SMI library to your project
To include the AMD SMI Go API in your project, update your Makefile or Go module configuration
to fetch the appropriate version of the AMD SMI library.
```shell
go get github.com/ROCm/amdsmi@amd-staging
```
When using a Makefile, ensure you're fetching the latest AMD SMI repository
with Go API support. See
[https://github.com/amd/amd_smi_exporter/blob/master/src/Makefile](https://github.com/amd/amd_smi_exporter/blob/master/src/Makefile)
for an example implementation.
@@ -0,0 +1,150 @@
---
myst:
html_meta:
"description lang=en": "Get started with the AMD SMI Python interface."
"keywords": "api, smi, lib, py, system, management, interface, ROCm"
---
# AMD SMI Python interface overview
The AMD SMI Python interface provides a convenient way to interact with AMD
hardware through a simple and accessible [API](../reference/amdsmi-py-api.md).
```{seealso}
Refer to the [Python library API reference](../reference/amdsmi-py-api.md).
```
## Prerequisites
Before get started, make sure your environment satisfies the following prerequisites.
See the [requirements](#install_reqs) section for more information.
1. Ensure `amdgpu` drivers are installed properly for initialization.
2. Export `LD_LIBRARY_PATH` to the `amdsmi` installation directory.
```bash
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/rocm/lib:/opt/rocm/lib64:
```
3. Install Python 3.6.8+.
## Get started
```{note}
``hipcc`` and other compilers will not automatically link in the ``libamd_smi``
dynamic library. To compile code that uses the AMD SMI library API, ensure the
``libamd_smi.so`` can be located by setting the ``LD_LIBRARY_PATH`` environment
variable to the directory containing ``librocm_smi64.so`` (usually
``/opt/rocm/lib``) or by passing the ``-lamd_smi`` flag to the compiler.
```
```{note}
The environment variable ``AMDSMI_GPU_METRICS_CACHE_MS`` may be set to
control the internal GPU metrics cache duration (ms).
Default 1, set to 0 to disable.
The environment variable ``AMDSMI_ASIC_INFO_CACHE_MS`` may be set to
control the internal GPU asic info cache duration (ms).
Default 10000 ms, set to 0 to disable.
You can apply them in one of two ways:
1. In Python code (before the AMDSMI library loads):
```
```python
import os
os.environ["AMDSMI_GPU_METRICS_CACHE_MS"] = "200"
from amdsmi import *
```
```{note}
2. On the shell when invoking Python:
```
```shell
AMDSMI_GPU_METRICS_CACHE_MS=200 python tools/amdsmi_quick_start.py
```
To get started, the `amdsmi` folder should be copied and placed next to
the importing script. Import it as follows:
```python
from amdsmi import *
try:
amdsmi_init()
# amdsmi calls ...
except AmdSmiException as e:
print(e)
finally:
try:
amdsmi_shut_down()
except AmdSmiException as e:
print(e)
```
(py_lib_fs)=
### Folder structure
File name | Description
----------------------|-------------------------------------------------
`__init__.py` | Python package initialization file
`amdsmi_interface.py` | Amdsmi library Python interface
`amdsmi_wrapper.py` | Python wrapper around amdsmi binary
`amdsmi_exception.py` | Amdsmi [exceptions](#py_exceptions) Python file
(py_usage)=
## Usage
An application using AMD SMI must call `amdsmi_init()` to initialize the AMI SMI
library before all other calls. This call initializes the internal data
structures required for subsequent AMD SMI operations. In the call, a flag can
be passed to indicate if the application is interested in a specific device
type.
`amdsmi_shut_down()` must be the last call to properly close connection to
driver and make sure that any resources held by AMD SMI are released.
```{seealso}
Refer to the [Python library API reference](../reference/amdsmi-py-api.md).
```
(py_exceptions)=
## Exceptions
All exceptions are in `amdsmi_exception.py` file.
Exceptions that can be thrown by AMD SMI are:
* `AmdSmiException`: base amdsmi exception class
* `AmdSmiLibraryException`: derives base `AmdSmiException` class and represents errors that can occur in amdsmi-lib.
When this exception is thrown, `err_code` and `err_info` are set. `err_code` is an integer that corresponds to errors that can occur
in amdsmi-lib and `err_info` is a string that explains the error that occurred.
For example:
```python
try:
num_of_GPUs = len(amdsmi_get_processor_handles())
if num_of_GPUs == 0:
print("No GPUs on machine")
except AmdSmiException as e:
print("Error code: {}".format(e.err_code))
if e.err_code == amdsmi_wrapper.AMDSMI_STATUS_RETRY:
print("Error info: {}".format(e.err_info))
```
* `AmdSmiRetryException` : Derives `AmdSmiLibraryException` class and signals
device is busy and call should be retried.
* `AmdSmiTimeoutException` : Derives `AmdSmiLibraryException` class and
represents that call had timed out.
* `AmdSmiParameterException`: Derives base `AmdSmiException` class and
represents errors related to invaild parameters passed to functions. When this
exception is thrown, `err_msg` is set and it explains what is the actual and
expected type of the parameters.
* `AmdSmiBdfFormatException`: Derives base `AmdSmiException` class and
represents invalid bdf format.
@@ -0,0 +1,39 @@
---
myst:
html_meta:
"description lang=en": "Docker container configuration and setup procedures for AMD SMI."
"keywords": "api, smi, lib, system, management, interface, ROCm, docker, systemd, modprobe"
---
# Using AMD SMI in a Docker container
To ensure proper functionality of AMD SMI within a Docker container, the
following configuration options must be included. These settings are
particularly important for managing memory partitions, as partitioning depends
on loading and unloading drivers (with `systemd` dependencies):
* `--cap-add=SYS_MODULE`
This option adds the `SYS_MODULE` capability to the container, allowing it to
load and interact with kernel modules.
```{note}
Granting `SYS_MODULE` increases the container's privileges and reduces
isolation from the host. Use this option only with trusted containers and
images.
```
* `-v /lib/modules:/lib/modules`
By mounting the `/lib/modules/` directory into the container, the container
gains access to the host's kernel modules, allowing it to load and interact
with them. Without this access, operations requiring module loading like
memory partitioning would fail.
For example:
```{image} ../data/how-to/setup-docker-container/docker-run-example.jpg
:alt: Command line example of running a Docker container for AMD SMI
:align: center
:width: 100%
```
+65
View File
@@ -0,0 +1,65 @@
---
myst:
html_meta:
"description lang=en": "AMD SMI documentation and API reference."
"keywords": "amdsmi, lib, cli, system, management, interface, amdgpu, admin, sys"
---
# AMD SMI documentation
The AMD System Management Interface (AMD SMI) library offers a unified tool for
managing and monitoring GPUs, particularly in high-performance computing
environments. It provides a user-space interface that allows applications to
control GPU operations, monitor performance, and retrieve information about the
system's drivers and GPUs.
Find the source code at <https://github.com/ROCm/amdsmi>.
```{note}
AMD SMI is the successor to <https://github.com/ROCm/rocm_smi_lib>.
```
::::{grid} 2
:gutter: 3
:::{grid-item-card} Install
* [Library and CLI tool installation](./install/install.md)
* [Build from source](./install/build.md)
:::
:::{grid-item-card} How to
* [C++ library usage](./how-to/amdsmi-cpp-lib.md)
* [Python library usage](./how-to/amdsmi-py-lib.md)
* [Go library usage](./how-to/amdsmi-go-lib.md)
* [CLI tool usage](./how-to/amdsmi-cli-tool.md)
* [Use AMD SMI in a Docker container](./how-to/setup-docker-container.md)
:::
:::{grid-item-card} Reference
* [C++ API](./reference/amdsmi-cpp-api.md)
* [Modules](../doxygen/docBin/html/topics)
* [Files](../doxygen/docBin/html/files)
* [Globals](../doxygen/docBin/html/globals)
* [Data structures](../doxygen/docBin/html/annotated)
* [Data fields](../doxygen/docBin/html/functions_data_fields)
* [Python API](./reference/amdsmi-py-api.md)
* [Go API](./reference/amdsmi-go-api.md)
:::
:::{grid-item-card} Conceptual
* [Reliability, availability, serviceability](./conceptual/ras.md)
:::
:::{grid-item-card} Tutorials
* [AMD SMI examples (GitHub)](https://github.com/ROCm/amdsmi/tree/amd-staging/example)
* [AMD SMI CLI walkthrough](https://rocm.blogs.amd.com/software-tools-optimization/amd-smi-overview/README.html)
:::
::::
To learn about contributing to AMD SMI, see [Contibuting to AMD
SMI](https://github.com/ROCm/amdsmi/blob/amd-mainline/.github/CONTRIBUTING.md).
To contribute to the documentation, see
{doc}`Contributing to ROCm documentation <rocm:contribute/contributing>`.
Find ROCm licensing information on the
{doc}`Licensing <rocm:about/license>` page.
+109
View File
@@ -0,0 +1,109 @@
---
myst:
html_meta:
"description lang=en": "How to build AMD SMI from source."
"keywords": "system, management, interface, contribute, contributing, ROCm, develop, testing"
---
# Building AMD SMI
This section describes the prerequisites and steps to build AMD SMI from source.
(build_reqs)=
## Required software
To build the AMD SMI library, the following components are required. Note that
the software versions specified were used during development; earlier
versions are not guaranteed to work.
* CMake (v3.15.0 or later) -- `python3 -m pip install cmake`
* g++ (v5.4.0 or later)
* libdrm-dev (for Ubuntu and Debian)
* libdrm-devel (for RPM-based distributions)
In order to build the AMD SMI Python package, the following components are
required:
* Python (3.6.8 or later)
* virtualenv -- `python3 -m pip install virtualenv`
## Build steps
1. Clone the AMD SMI repository to your local Linux machine.
```shell
git clone https://github.com/ROCm/amdsmi.git
```
2. The default installation location for the library and headers is `/opt/rocm`.
Before installation, any old ROCm directories should be deleted:
* `/opt/rocm`
* `/opt/rocm-<version_number>`
3. Build the library by following the typical CMake build sequence (run as root
user or use `sudo` before `make install` command); for instance:
```bash
mkdir -p build
cd build
cmake ..
make -j $(nproc)
make install
```
The built library is located in the `build/` directory. To build the `rpm`
and `deb` packages use the following command:
```bash
make package
```
(rebuild_py_wrapper)=
## Rebuild the Python wrapper
The Python wrapper for the AMD SMI library is found in the [auto-generated
file](#py_lib_fs) `py-interface/amdsmi_wrapper.py`. It is essential to
regenerate this wrapper whenever there are changes to the C++ API. It is not
regenerated automatically.
To regenerate the wrapper, use the following command.
```shell
./update_wrapper.sh
```
After this command, the file in `py-interface/amdsmi_wrapper.py` will be updated
on compile.
```{note}
You need Docker installed on your system to regenerate the Python wrapper.
```
(build_tests)=
## Build the tests
To verify the build and capabilities of AMD SMI on your system, as well as to
see practical examples of its usage, you can build and run the available [tests
in the repository](https://github.com/ROCm/amdsmi/tree/amd-staging/tests).
Follow these steps to build the tests:
```bash
mkdir -p build
cd build
cmake -DBUILD_TESTS=ON ..
make -j $(nproc)
```
(run_tests)=
### Run the tests
Once the tests are [built](#build_tests), you can run them by executing the
`amdsmitst` program. The executable can be found at `build/tests/amd_smi_test/`.
(build_docs)=
## Build the docs
To build the documentation, follow the instructions at [Building
documentation](https://rocm.docs.amd.com/en/latest/contribute/building.html).
+171
View File
@@ -0,0 +1,171 @@
---
myst:
html_meta:
"description lang=en": "How to install AMD SMI libraries and CLI tool."
"keywords": "system, management, interface, cpu, gpu, hsmp, versions"
---
# Install the AMD SMI library and CLI tool
This section describes how to install the AMD SMI library, Python interface,
and command line tool either as part of the
{doc}`ROCm software stack <rocm:what-is-rocm>` -- or manually.
(install_reqs)=
## Requirements
The following are required to install and use the AMD SMI library through its language interfaces and CLI.
* The `amdgpu` driver must be loaded for AMD SMI initialization to work. See
[Install the amdgpu driver](#install_amdgpu_driver).
* Export `LD_LIBRARY_PATH` to the `amdsmi` installation directory.
```bash
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/rocm/lib:/opt/rocm/lib64
```
### Supported platforms
The AMD SMI library supports Linux bare metal and Linux virtual machine guest
for AMD GPUs and AMD EPYC™ CPUs via
[esmi_ib_lirary](https://github.com/amd/esmi_ib_library). To use AMD SMI for virtualization, refer to
the [AMD SMI for Virtualization documentation](https://instinct.docs.amd.com/projects/amd-smi-virt/en/latest/index.html).
AMD SMI library can run on AMD ROCm supported platforms. Refer to
{doc}`System requirements (Linux) <rocm-install-on-linux:reference/system-requirements>`
for more information.
<!--https://rocm.docs.amd.com/projects/install-on-linux/en/latest/reference/system-requirements.html-->
To run the AMD SMI library, the `amdgpu` driver and the `amd_hsmp` or `hsmp_acpi` driver need to be installed. Optionally, `libdrm` can be installed to query firmware
information and hardware IPs.
### Python interface and CLI tool prerequisites
* Python version 3.6.8 or greater (64-bit)
::::{note}
During the driver installation process on Azure Linux 3, you might encounter the `ModuleNotFoundError: No module named 'more_itertools'` warning. This warning is a result of the reintroduction of `python3-wheel` and `python3-setuptools` dependencies in the CMake of AMD SMI, which requires `more_itertools` to build these Python libraries. This issue will be fixed in a future ROCm release. As a workaround, use the following command before installation:
```
sudo python3 -m pip install more_itertools
```
::::
### Go interface prerequisites
* Go version 1.20 or greater
(install_amdgpu_driver)=
## Install the amdgpu driver
```{note}
As of ROCm 7.0.0, the `amdgpu` driver is distributed separately from the ROCm
software stack. See
{doc}`rocm-install-on-linux:reference/user-kernel-space-compat-matrix` for
driver to ROCm user space compatibility information.
```
Confirm that your Linux kernel version matches the system requirements described in
{ref}`rocm-install-on-linux:supported_distributions`.
For up-to-date installation instructions, see the [AMD GPU Driver (amdgpu)
documentation](https://instinct.docs.amd.com/projects/amdgpu-docs/en/latest/install/detailed-install/prerequisites.html).
(install_amdgpu_rocm)=
## Install AMD SMI with ROCm
AMD SMI is included as a core package in the ROCm software stack as part of the
`rocm-developer-tools` meta package. See [ROCm runtime
packages](https://rocm.docs.amd.com/projects/install-on-linux/en/latest/reference/package-manager-integration.html#id3)
for more information.
```{note}
The `amdgpu-install` script is no longer the recommended way to install ROCm.
Install using your supported Linux distribution's package manager instead.
```
For up-to-date installation instructions via package manager, see {doc}`ROCm
installation for Linux <rocm-install-on-linux:install/prerequisites>`.
After installing the `amdgpu` driver and ROCm, verify your AMD SMI installation:
```shell
amd-smi
```
(install_without_rocm)=
## Install AMD SMI without ROCm
The following are example steps to install the AMD SMI libraries and CLI tool on
Ubuntu 22.04.
1. Install the library.
```shell
sudo apt install amd-smi-lib
```
2. Add the installation directory to your PATH. If installed with ROCm, ignore
this step.
```shell
export PATH="${PATH:+${PATH}:}~/opt/rocm/bin"
```
3. Verify your installation.
```shell
amd-smi --help
```
## Optionally enable CLI autocompletion
The `amd-smi` CLI application supports autocompletion. If `argcomplete` is not
installed and enabled already, do so using the following commands.
```shell
python3 -m pip install argcomplete
activate-global-python-argcomplete --user
# restart shell to enable
```
(install-manual-py-lib)=
## Install the Python library for multiple ROCm instances
If {doc}`multiple ROCm versions are installed
<rocm-install-on-linux:install/install-methods/multi-version-install-index>` and you
are not using `pyenv`, uninstall previous versions of AMD SMI before installing
the desired version from your ROCm instance.
### Manually install the Python library
The following are example AMD SMI installation steps on Ubuntu 22.04 without
ROCm.
1. Remove previous AMD SMI installation.
```shell
python3 -m pip list | grep amd
python3 -m pip uninstall amdsmi
```
2. Install the AMD SMI Python library from your target ROCm instance.
```shell
apt install amd-smi-lib
cd /opt/rocm/share/amd_smi
python3 -m pip install --upgrade pip
python3 -m pip install --user .
```
3. You should now have the AMD SMI Python library in your Python path:
```shell-session
~$ python3
Python 3.8.10 (default, May 26 2023, 14:05:08)
[GCC 9.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import amdsmi
>>>
```
+9
View File
@@ -0,0 +1,9 @@
.. meta::
:description: Review the AMD SMI license agreement.
:keywords: amdsmi
*******
License
*******
.. include:: ../LICENSE
@@ -0,0 +1,21 @@
---
myst:
html_meta:
"description lang=en": "Explore the AMD SMI C++ API."
"keywords": "api, smi, lib, cpp, header, system, management, interface, ROCm"
---
# AMD SMI C++ API reference
This section provides comprehensive documentation for the AMD SMI C++ API.
Explore these sections to understand the full scope of available
functionalities and how to implement them in your applications.
- {doc}`Modules <../doxygen/docBin/html/topics>`
- {doc}`Files <../doxygen/docBin/html/files>`
- {doc}`Globals <../doxygen/docBin/html/globals>`
- {doc}`Data structures <../doxygen/docBin/html/annotated>`
@@ -0,0 +1,33 @@
---
myst:
html_meta:
"description lang=en": "Explore the AMD SMI Go API."
"keywords": "api, smi, lib, system, management, interface, ROCm, golang"
---
# AMD SMI Go API reference
The AMD SMI Go interface provides a convenient way to interact with AMD
hardware through a simple and accessible API. The API is compatible with Go
version 1.20 and higher and requires the AMD driver to be loaded for
initialization. Review the [prerequisites](#go_prereqs) before getting
started.
This section provides documentation for the AMD SMI Go API. Explore these
sections to understand the full scope of available functionalities and how to
implement them in your applications.
## GPU functions
```{eval-rst}
.. go-api-ref:: ../../goamdsmi.go
:section: gpu
```
## CPU functions
```{eval-rst}
.. go-api-ref:: ../../goamdsmi.go
:section: cpu
```
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,9 @@
---
myst:
html_meta:
"description lang=en": "A summary of changes to AMD SMI APIs. The changelog is listed for reference and subject to change."
"keywords": "api, smi, lib, changes, system, management, interface, ROCm"
---
```{include} ../../CHANGELOG.md
```
+68
View File
@@ -0,0 +1,68 @@
# Variables of the form ${<variable>} are substituted, currently the following
# list is supported:
# - ${branch} (or {branch}) the name of the current branch
# - ${url} (or {url}) github url of the current project
# - ${project:<project_name>} base url of the documentation of <project_name>
# based on intersphinx_mapping.
# These comments will also be removed.
defaults:
numbered: false
root: index
subtrees:
- caption: Install
entries:
- file: install/install.md
title: Library and CLI tool installation
- file: install/build.md
title: Build from source
- caption: How to
entries:
- file: how-to/amdsmi-cpp-lib.md
title: C++ library usage
- file: how-to/amdsmi-py-lib.md
title: Python library usage
- file: how-to/amdsmi-go-lib.md
title: Go library usage
- file: how-to/amdsmi-cli-tool.md
title: CLI tool usage
- file: how-to/setup-docker-container.md
title: Use AMD SMI in a Docker container
- caption: Reference
entries:
- file: reference/amdsmi-cpp-api.md
title: C++ API
entries:
- file: doxygen/docBin/html/topics
title: Modules
- file: doxygen/docBin/html/files
title: Files
- file: doxygen/docBin/html/globals
title: Globals
- file: doxygen/docBin/html/annotated
title: Data structures
- file: doxygen/docBin/html/functions_data_fields
title: Data fields
- file: reference/amdsmi-py-api.md
title: Python API
- file: reference/amdsmi-go-api.md
title: Go API
- file: reference/changelog.md
title: Changelog
- caption: Conceptual
entries:
- file: conceptual/ras.md
- caption: Tutorials
entries:
- url: https://github.com/ROCm/amdsmi/tree/${branch}/example
title: AMD SMI examples (GitHub)
- url: https://rocm.blogs.amd.com/software-tools-optimization/amd-smi-overview/README.html
title: AMD SMI CLI walkthrough
- caption: About
entries:
- file: license.md
@@ -0,0 +1 @@
rocm-docs-core[api_reference]==1.27.0
@@ -0,0 +1,313 @@
#
# This file is autogenerated by pip-compile with Python 3.12
# by the following command:
#
# pip-compile docs/sphinx/requirements.in
#
accessible-pygments==0.0.5
# via pydata-sphinx-theme
alabaster==1.0.0
# via sphinx
asttokens==3.0.0
# via stack-data
attrs==25.3.0
# via
# jsonschema
# jupyter-cache
# referencing
babel==2.17.0
# via
# pydata-sphinx-theme
# sphinx
beautifulsoup4==4.13.5
# via pydata-sphinx-theme
breathe==4.36.0
# via rocm-docs-core
certifi==2025.8.3
# via requests
cffi==2.0.0
# via
# cryptography
# pynacl
charset-normalizer==3.4.3
# via requests
click==8.3.0
# via
# click-log
# doxysphinx
# jupyter-cache
# sphinx-external-toc
click-log==0.4.0
# via doxysphinx
comm==0.2.3
# via ipykernel
contourpy==1.3.3
# via matplotlib
cryptography==46.0.1
# via pyjwt
cycler==0.12.1
# via matplotlib
debugpy==1.8.17
# via ipykernel
decorator==5.2.1
# via ipython
docutils==0.21.2
# via
# myst-parser
# pydata-sphinx-theme
# sphinx
doxysphinx==3.3.12
# via rocm-docs-core
executing==2.2.1
# via stack-data
fastjsonschema==2.21.2
# via
# nbformat
# rocm-docs-core
fonttools==4.60.0
# via matplotlib
gitdb==4.0.12
# via gitpython
gitpython==3.1.45
# via rocm-docs-core
greenlet==3.2.4
# via sqlalchemy
idna==3.10
# via requests
imagesize==1.4.1
# via sphinx
importlib-metadata==8.7.0
# via
# jupyter-cache
# myst-nb
ipykernel==6.30.1
# via myst-nb
ipython==9.5.0
# via
# ipykernel
# myst-nb
ipython-pygments-lexers==1.1.1
# via ipython
jedi==0.19.2
# via ipython
jinja2==3.1.6
# via
# myst-parser
# sphinx
jsonschema==4.25.1
# via nbformat
jsonschema-specifications==2025.9.1
# via jsonschema
jupyter-cache==1.0.1
# via myst-nb
jupyter-client==8.6.3
# via
# ipykernel
# nbclient
jupyter-core==5.8.1
# via
# ipykernel
# jupyter-client
# nbclient
# nbformat
kiwisolver==1.4.9
# via matplotlib
libsass==0.22.0
# via doxysphinx
lxml==5.2.1
# via doxysphinx
markdown-it-py==3.0.0
# via
# mdit-py-plugins
# myst-parser
markupsafe==3.0.2
# via jinja2
matplotlib==3.10.6
# via doxysphinx
matplotlib-inline==0.1.7
# via
# ipykernel
# ipython
mdit-py-plugins==0.5.0
# via myst-parser
mdurl==0.1.2
# via markdown-it-py
mpire==2.10.2
# via doxysphinx
myst-nb==1.3.0
# via rocm-docs-core
myst-parser==4.0.1
# via myst-nb
nbclient==0.10.2
# via
# jupyter-cache
# myst-nb
nbformat==5.10.4
# via
# jupyter-cache
# myst-nb
# nbclient
nest-asyncio==1.6.0
# via ipykernel
numpy==1.26.4
# via
# contourpy
# doxysphinx
# matplotlib
packaging==25.0
# via
# ipykernel
# matplotlib
# sphinx
parso==0.8.5
# via jedi
pexpect==4.9.0
# via ipython
pillow==11.3.0
# via matplotlib
platformdirs==4.4.0
# via jupyter-core
prompt-toolkit==3.0.52
# via ipython
psutil==7.1.0
# via ipykernel
ptyprocess==0.7.0
# via pexpect
pure-eval==0.2.3
# via stack-data
pycparser==2.23
# via cffi
pydata-sphinx-theme==0.16.1
# via
# rocm-docs-core
# sphinx-book-theme
pygithub==2.8.1
# via rocm-docs-core
pygments==2.19.2
# via
# accessible-pygments
# ipython
# ipython-pygments-lexers
# mpire
# pydata-sphinx-theme
# sphinx
pyjson5==1.6.9
# via doxysphinx
pyjwt[crypto]==2.10.1
# via pygithub
pynacl==1.6.0
# via pygithub
pyparsing==3.2.5
# via
# doxysphinx
# matplotlib
python-dateutil==2.9.0.post0
# via
# jupyter-client
# matplotlib
pyyaml==6.0.3
# via
# jupyter-cache
# myst-nb
# myst-parser
# rocm-docs-core
# sphinx-external-toc
pyzmq==27.1.0
# via
# ipykernel
# jupyter-client
referencing==0.36.2
# via
# jsonschema
# jsonschema-specifications
requests==2.32.5
# via
# pygithub
# sphinx
rocm-docs-core[api-reference]==1.27.0
# via -r requirements.in
roman-numerals-py==3.1.0
# via sphinx
rpds-py==0.27.1
# via
# jsonschema
# referencing
six==1.17.0
# via python-dateutil
smmap==5.0.2
# via gitdb
snowballstemmer==3.0.1
# via sphinx
soupsieve==2.8
# via beautifulsoup4
sphinx==8.2.3
# via
# breathe
# myst-nb
# myst-parser
# pydata-sphinx-theme
# rocm-docs-core
# sphinx-book-theme
# sphinx-copybutton
# sphinx-design
# sphinx-external-toc
# sphinx-notfound-page
sphinx-book-theme==1.1.3
# via rocm-docs-core
sphinx-copybutton==0.5.2
# via rocm-docs-core
sphinx-design==0.6.1
# via rocm-docs-core
sphinx-external-toc==1.0.1
# via rocm-docs-core
sphinx-notfound-page==1.1.0
# via rocm-docs-core
sphinxcontrib-applehelp==2.0.0
# via sphinx
sphinxcontrib-devhelp==2.0.0
# via sphinx
sphinxcontrib-htmlhelp==2.1.0
# via sphinx
sphinxcontrib-jsmath==1.0.1
# via sphinx
sphinxcontrib-qthelp==2.0.0
# via sphinx
sphinxcontrib-serializinghtml==2.0.0
# via sphinx
sqlalchemy==2.0.43
# via jupyter-cache
stack-data==0.6.3
# via ipython
tabulate==0.9.0
# via jupyter-cache
tornado==6.5.2
# via
# ipykernel
# jupyter-client
tqdm==4.67.1
# via mpire
traitlets==5.14.3
# via
# ipykernel
# ipython
# jupyter-client
# jupyter-core
# matplotlib-inline
# nbclient
# nbformat
typing-extensions==4.15.0
# via
# beautifulsoup4
# myst-nb
# pydata-sphinx-theme
# pygithub
# referencing
# sqlalchemy
urllib3==2.5.0
# via
# pygithub
# requests
wcwidth==0.2.14
# via prompt-toolkit
zipp==3.23.0
# via importlib-metadata