Docs: Fix broken links, warnings and use automodule (#11)
- Fixes the broken links in rocm_smi.h
- Uses automodule instead of autofunction in docs/reference/python_api.rst
- Fixes some warnings during docs build
- Update some of the versions in requirements.txt
[ROCm/rocm_smi_lib commit: e5c5a1d5b7]
This commit is contained in:
@@ -35,6 +35,8 @@ release = version_number
|
||||
|
||||
external_toc_path = "./sphinx/_toc.yml"
|
||||
|
||||
exclude_patterns = ['CHANGELOG.md']
|
||||
|
||||
docs_core = ROCmDocs(left_nav_title)
|
||||
docs_core.run_doxygen(doxygen_root="doxygen", doxygen_path="doxygen/xml")
|
||||
docs_core.enable_api_reference()
|
||||
@@ -47,4 +49,12 @@ suppress_warnings = ["etoc.toctree"]
|
||||
for sphinx_var in ROCmDocs.SPHINX_VARS:
|
||||
globals()[sphinx_var] = getattr(docs_core, sphinx_var)
|
||||
|
||||
extensions += ['sphinx.ext.mathjax']
|
||||
extensions += ['sphinx.ext.mathjax']
|
||||
|
||||
# Necessary to remove the header comments from the rocm_smi module
|
||||
def remove_module_docstring(app, what, name, obj, options, lines):
|
||||
if what == "module":
|
||||
del lines[:]
|
||||
|
||||
def setup(app):
|
||||
app.connect("autodoc-process-docstring", remove_module_docstring)
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
Installing ROCm SMI
|
||||
*********************
|
||||
|
||||
Planned deprecation notice
|
||||
Planned deprecation notice
|
||||
----------------------------
|
||||
|
||||
ROCm System Management Interface (ROCm SMI) Library is planned to be ***deprecated***, and the release date will be announced soon. We recommend migration to AMD SMI.
|
||||
@@ -15,11 +15,11 @@ ROCm System Management Interface (ROCm SMI) Library is planned to be ***deprecat
|
||||
Install amdgpu using ROCm
|
||||
--------------------------
|
||||
Use the following instructions to install AMDGPU using ROCm:
|
||||
|
||||
|
||||
1. Install amdgpu driver. Refer to the following example, your release and link may differ. The `amdgpu-install --usecase=rocm` triggers both an amdgpu driver update and ROCm SMI packages to be installed on your device.
|
||||
|
||||
|
||||
.. code-block:: shell
|
||||
|
||||
|
||||
sudo apt update
|
||||
wget https://repo.radeon.com/amdgpu-install/6.0.2/ubuntu/jammy/amdgpu-install_6.0.60002-1_all.deb
|
||||
sudo apt install ./amdgpu-install_6.0.60002-1_all.deb
|
||||
@@ -33,10 +33,8 @@ Building ROCm SMI
|
||||
Addtional required software
|
||||
============================
|
||||
|
||||
To build the ROCm SMI library, the following components are required.
|
||||
|
||||
.. Note::
|
||||
|
||||
To build the ROCm SMI library, the following components are required.
|
||||
|
||||
The following software versions are what was used in development. Earlier versions are not guaranteed to work:
|
||||
|
||||
* CMake (v3.5.0)
|
||||
@@ -52,7 +50,7 @@ The source code for ROCm SMI is available on `Github <https://github.com/RadeonO
|
||||
After the ROCm SMI library git repository is cloned to a local Linux machine, use the following CMake build sequence to build the library. Specifically,
|
||||
|
||||
.. code-block:: shell
|
||||
|
||||
|
||||
mkdir -p build
|
||||
cd build
|
||||
cmake ..
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
:orphan:
|
||||
|
||||
.. meta::
|
||||
:description: Install ROCm SMI
|
||||
:keywords: API, SMI, AMD, ROCm
|
||||
|
||||
@@ -4,266 +4,10 @@ Python API reference
|
||||
|
||||
This section describes the ROCm SMI Python module API.
|
||||
|
||||
.. default-domain:: py
|
||||
.. py:currentmodule:: rocm_smi
|
||||
|
||||
Functions
|
||||
---------
|
||||
|
||||
.. autofunction:: rocm_smi.driverInitialized
|
||||
|
||||
.. autofunction:: rocm_smi.formatJson
|
||||
|
||||
.. autofunction:: rocm_smi.formatCsv
|
||||
|
||||
.. autofunction:: rocm_smi.formatMatrixToJSON
|
||||
|
||||
.. autofunction:: rocm_smi.getBus
|
||||
|
||||
.. autofunction:: rocm_smi.getFanSpeed
|
||||
|
||||
.. autofunction:: rocm_smi.getGpuUse
|
||||
|
||||
.. autofunction:: rocm_smi.getDRMDeviceId
|
||||
|
||||
.. autofunction:: rocm_smi.getSubsystemId
|
||||
|
||||
.. autofunction:: rocm_smi.getVendor
|
||||
|
||||
.. autofunction:: rocm_smi.getGUID
|
||||
|
||||
.. autofunction:: rocm_smi.getTargetGfxVersion
|
||||
|
||||
.. autofunction:: rocm_smi.getNodeId
|
||||
|
||||
.. autofunction:: rocm_smi.getDeviceName
|
||||
|
||||
.. autofunction:: rocm_smi.getRev
|
||||
|
||||
.. autofunction:: rocm_smi.getMaxPower
|
||||
|
||||
.. autofunction:: rocm_smi.getMemInfo
|
||||
|
||||
.. autofunction:: rocm_smi.getProcessName
|
||||
|
||||
.. autofunction:: rocm_smi.getPerfLevel
|
||||
|
||||
.. autofunction:: rocm_smi.getPid
|
||||
|
||||
.. autofunction:: rocm_smi.getPidList
|
||||
|
||||
.. autofunction:: rocm_smi.getPower
|
||||
|
||||
.. autofunction:: rocm_smi.getRasEnablement
|
||||
|
||||
.. autofunction:: rocm_smi.getTemp
|
||||
|
||||
.. autofunction:: rocm_smi.findFirstAvailableTemp
|
||||
|
||||
.. autofunction:: rocm_smi.getTemperatureLabel
|
||||
|
||||
.. autofunction:: rocm_smi.getPowerLabel
|
||||
|
||||
.. autofunction:: rocm_smi.getVbiosVersion
|
||||
|
||||
.. autofunction:: rocm_smi.getVersion
|
||||
|
||||
.. autofunction:: rocm_smi.getComputePartition
|
||||
|
||||
.. autofunction:: rocm_smi.getMemoryPartition
|
||||
|
||||
.. autofunction:: rocm_smi.print2DArray
|
||||
|
||||
.. autofunction:: rocm_smi.printEmptyLine
|
||||
|
||||
.. autofunction:: rocm_smi.printErrLog
|
||||
|
||||
.. autofunction:: rocm_smi.printInfoLog
|
||||
|
||||
.. autofunction:: rocm_smi.printEventList
|
||||
|
||||
.. autofunction:: rocm_smi.printLog
|
||||
|
||||
.. autofunction:: rocm_smi.printListLog
|
||||
|
||||
.. autofunction:: rocm_smi.printLogSpacer
|
||||
|
||||
.. autofunction:: rocm_smi.printSysLog
|
||||
|
||||
.. autofunction:: rocm_smi.printTableLog
|
||||
|
||||
.. autofunction:: rocm_smi.printTableRow
|
||||
|
||||
.. autofunction:: rocm_smi.checkIfSecondaryDie
|
||||
|
||||
.. autofunction:: rocm_smi.resetClocks
|
||||
|
||||
.. autofunction:: rocm_smi.resetFans
|
||||
|
||||
.. autofunction:: rocm_smi.resetPowerOverDrive
|
||||
|
||||
.. autofunction:: rocm_smi.resetProfile
|
||||
|
||||
.. autofunction:: rocm_smi.resetXgmiErr
|
||||
|
||||
.. autofunction:: rocm_smi.resetPerfDeterminism
|
||||
|
||||
.. autofunction:: rocm_smi.resetComputePartition
|
||||
|
||||
.. autofunction:: rocm_smi.resetMemoryPartition
|
||||
|
||||
.. autofunction:: rocm_smi.setClockRange
|
||||
|
||||
.. autofunction:: rocm_smi.setClockExtremum
|
||||
|
||||
.. autofunction:: rocm_smi.setVoltageCurve
|
||||
|
||||
.. autofunction:: rocm_smi.setPowerPlayTableLevel
|
||||
|
||||
.. autofunction:: rocm_smi.setClockOverDrive
|
||||
|
||||
.. autofunction:: rocm_smi.setClocks
|
||||
|
||||
.. autofunction:: rocm_smi.setPerfDeterminism
|
||||
|
||||
.. autofunction:: rocm_smi.resetGpu
|
||||
|
||||
.. autofunction:: rocm_smi.isRasControlAvailable
|
||||
|
||||
.. autofunction:: rocm_smi.setRas
|
||||
|
||||
.. autofunction:: rocm_smi.setFanSpeed
|
||||
|
||||
.. autofunction:: rocm_smi.setPerformanceLevel
|
||||
|
||||
.. autofunction:: rocm_smi.setPowerOverDrive
|
||||
|
||||
.. autofunction:: rocm_smi.setProfile
|
||||
|
||||
.. autofunction:: rocm_smi.setComputePartition
|
||||
|
||||
.. autofunction:: rocm_smi.progressbar
|
||||
|
||||
.. autofunction:: rocm_smi.showProgressbar
|
||||
|
||||
.. autofunction:: rocm_smi.setMemoryPartition
|
||||
|
||||
.. autofunction:: rocm_smi.showVersion
|
||||
|
||||
.. autofunction:: rocm_smi.showAllConcise
|
||||
|
||||
.. autofunction:: rocm_smi.showAllConciseHw
|
||||
|
||||
.. autofunction:: rocm_smi.showBus
|
||||
|
||||
.. autofunction:: rocm_smi.showClocks
|
||||
|
||||
.. autofunction:: rocm_smi.showCurrentClocks
|
||||
|
||||
.. autofunction:: rocm_smi.showCurrentFans
|
||||
|
||||
.. autofunction:: rocm_smi.showCurrentTemps
|
||||
|
||||
.. autofunction:: rocm_smi.showFwInfo
|
||||
|
||||
.. autofunction:: rocm_smi.showGpusByPid
|
||||
|
||||
.. autofunction:: rocm_smi.getCoarseGrainUtil
|
||||
|
||||
.. autofunction:: rocm_smi.showGpuUse
|
||||
|
||||
.. autofunction:: rocm_smi.showEnergy
|
||||
|
||||
.. autofunction:: rocm_smi.showId
|
||||
|
||||
.. autofunction:: rocm_smi.showMaxPower
|
||||
|
||||
.. autofunction:: rocm_smi.showMemInfo
|
||||
|
||||
.. autofunction:: rocm_smi.showMemUse
|
||||
|
||||
.. autofunction:: rocm_smi.showMemVendor
|
||||
|
||||
.. autofunction:: rocm_smi.showOverDrive
|
||||
|
||||
.. autofunction:: rocm_smi.showPcieBw
|
||||
|
||||
.. autofunction:: rocm_smi.showPcieReplayCount
|
||||
|
||||
.. autofunction:: rocm_smi.showPerformanceLevel
|
||||
|
||||
.. autofunction:: rocm_smi.showPids
|
||||
|
||||
.. autofunction:: rocm_smi.showPower
|
||||
|
||||
.. autofunction:: rocm_smi.showPowerPlayTable
|
||||
|
||||
.. autofunction:: rocm_smi.showProduct
|
||||
|
||||
.. autofunction:: rocm_smi.showProfile
|
||||
|
||||
.. autofunction:: rocm_smi.showRange
|
||||
|
||||
.. autofunction:: rocm_smi.showRasInfo
|
||||
|
||||
.. autofunction:: rocm_smi.showRetiredPages
|
||||
|
||||
.. autofunction:: rocm_smi.showSerialNumber
|
||||
|
||||
.. autofunction:: rocm_smi.showUId
|
||||
|
||||
.. autofunction:: rocm_smi.showVbiosVersion
|
||||
|
||||
.. autofunction:: rocm_smi.showEvents
|
||||
|
||||
.. autofunction:: rocm_smi.showDriverVersion
|
||||
|
||||
.. autofunction:: rocm_smi.showVoltage
|
||||
|
||||
.. autofunction:: rocm_smi.showVoltageCurve
|
||||
|
||||
.. autofunction:: rocm_smi.showXgmiErr
|
||||
|
||||
.. autofunction:: rocm_smi.showAccessibleTopology
|
||||
|
||||
.. autofunction:: rocm_smi.showWeightTopology
|
||||
|
||||
.. autofunction:: rocm_smi.showHopsTopology
|
||||
|
||||
.. autofunction:: rocm_smi.showTypeTopology
|
||||
|
||||
.. autofunction:: rocm_smi.showNumaTopology
|
||||
|
||||
.. autofunction:: rocm_smi.showHwTopology
|
||||
|
||||
.. autofunction:: rocm_smi.showNodesBw
|
||||
|
||||
.. autofunction:: rocm_smi.showComputePartition
|
||||
|
||||
.. autofunction:: rocm_smi.showMemoryPartition
|
||||
|
||||
.. autofunction:: rocm_smi.checkAmdGpus
|
||||
|
||||
.. autofunction:: rocm_smi.component_str
|
||||
|
||||
.. autofunction:: rocm_smi.confirmOutOfSpecWarning
|
||||
|
||||
.. autofunction:: rocm_smi.doesDeviceExist
|
||||
|
||||
.. autofunction:: rocm_smi.initializeRsmi
|
||||
|
||||
.. autofunction:: rocm_smi.isAmdDevice
|
||||
|
||||
.. autofunction:: rocm_smi.listDevices
|
||||
|
||||
.. autofunction:: rocm_smi.load
|
||||
|
||||
.. autofunction:: rocm_smi.padHexValue
|
||||
|
||||
.. autofunction:: rocm_smi.profileString
|
||||
|
||||
.. autofunction:: rocm_smi.relaunchAsSudo
|
||||
|
||||
.. autofunction:: rocm_smi.rsmi_ret_ok
|
||||
|
||||
.. autofunction:: rocm_smi.save
|
||||
.. automodule:: rocm_smi
|
||||
:members:
|
||||
:undoc-members:
|
||||
:exclude-members: UIntegerTypes, validateIfMaxUint
|
||||
@@ -1 +1 @@
|
||||
rocm-docs-core[api_reference]==1.4.0
|
||||
rocm-docs-core[api_reference]==1.13.0
|
||||
|
||||
@@ -73,7 +73,7 @@ mdurl==0.1.2
|
||||
# via markdown-it-py
|
||||
mpire==2.10.2
|
||||
# via doxysphinx
|
||||
myst-parser==3.0.1
|
||||
myst-parser==4.0.0
|
||||
# via rocm-docs-core
|
||||
numpy==1.26.4
|
||||
# via doxysphinx
|
||||
@@ -112,7 +112,7 @@ requests==2.32.3
|
||||
# via
|
||||
# pygithub
|
||||
# sphinx
|
||||
rocm-docs-core[api-reference]==1.4.0
|
||||
rocm-docs-core[api-reference]==1.13.0
|
||||
# via -r requirements.in
|
||||
smmap==5.0.1
|
||||
# via gitdb
|
||||
@@ -120,7 +120,7 @@ snowballstemmer==2.2.0
|
||||
# via sphinx
|
||||
soupsieve==2.5
|
||||
# via beautifulsoup4
|
||||
sphinx==7.3.7
|
||||
sphinx==8.0.2
|
||||
# via
|
||||
# breathe
|
||||
# myst-parser
|
||||
@@ -135,33 +135,33 @@ sphinx-book-theme==1.1.3
|
||||
# via rocm-docs-core
|
||||
sphinx-copybutton==0.5.2
|
||||
# via rocm-docs-core
|
||||
sphinx-design==0.6.0
|
||||
sphinx-design==0.6.1
|
||||
# via rocm-docs-core
|
||||
sphinx-external-toc==1.0.1
|
||||
# via rocm-docs-core
|
||||
sphinx-notfound-page==1.0.2
|
||||
sphinx-notfound-page==1.0.4
|
||||
# via rocm-docs-core
|
||||
sphinxcontrib-applehelp==1.0.8
|
||||
sphinxcontrib-applehelp==2.0.0
|
||||
# via sphinx
|
||||
sphinxcontrib-devhelp==1.0.6
|
||||
sphinxcontrib-devhelp==2.0.0
|
||||
# via sphinx
|
||||
sphinxcontrib-htmlhelp==2.0.5
|
||||
sphinxcontrib-htmlhelp==2.1.0
|
||||
# via sphinx
|
||||
sphinxcontrib-jsmath==1.0.1
|
||||
# via sphinx
|
||||
sphinxcontrib-qthelp==1.0.7
|
||||
sphinxcontrib-qthelp==2.0.0
|
||||
# via sphinx
|
||||
sphinxcontrib-serializinghtml==1.1.10
|
||||
sphinxcontrib-serializinghtml==2.0.0
|
||||
# via sphinx
|
||||
tomli==2.0.1
|
||||
# via sphinx
|
||||
tqdm==4.66.4
|
||||
tqdm==4.66.5
|
||||
# via mpire
|
||||
typing-extensions==4.12.2
|
||||
# via
|
||||
# pydata-sphinx-theme
|
||||
# pygithub
|
||||
urllib3==2.2.1
|
||||
urllib3==2.2.2
|
||||
# via
|
||||
# pygithub
|
||||
# requests
|
||||
|
||||
@@ -1 +1 @@
|
||||
|
||||
:orphan:
|
||||
|
||||
@@ -1266,19 +1266,19 @@ typedef union id {
|
||||
uint64_t id; //!< uint64_t representation of value
|
||||
const char *name; //!< name string (applicable to functions only)
|
||||
union {
|
||||
//!< Used for ::rsmi_memory_type_t variants
|
||||
/** Used for ::rsmi_memory_type_t variants */
|
||||
rsmi_memory_type_t memory_type;
|
||||
//!< Used for ::rsmi_temperature_metric_t variants
|
||||
/** Used for ::rsmi_temperature_metric_t variants */
|
||||
rsmi_temperature_metric_t temp_metric;
|
||||
//!< Used for ::rsmi_event_type_t variants
|
||||
/** Used for ::rsmi_event_type_t variants */
|
||||
rsmi_event_type_t evnt_type;
|
||||
//!< Used for ::rsmi_event_group_t variants
|
||||
/** Used for ::rsmi_event_group_t variants */
|
||||
rsmi_event_group_t evnt_group;
|
||||
//!< Used for ::rsmi_clk_type_t variants
|
||||
/** Used for ::rsmi_clk_type_t variants */
|
||||
rsmi_clk_type_t clk_type;
|
||||
//!< Used for ::rsmi_fw_block_t variants
|
||||
/** Used for ::rsmi_fw_block_t variants */
|
||||
rsmi_fw_block_t fw_block;
|
||||
//!< Used for ::rsmi_gpu_block_t variants
|
||||
/** Used for ::rsmi_gpu_block_t variants */
|
||||
rsmi_gpu_block_t gpu_block_type;
|
||||
};
|
||||
} rsmi_func_id_value_t;
|
||||
@@ -1826,7 +1826,7 @@ rsmi_dev_pci_bandwidth_get(uint32_t dv_ind, rsmi_pcie_bandwidth_t *bandwidth);
|
||||
* BDFID = ((DOMAIN & 0xFFFFFFFF) << 32) | ((Partition & 0xF) << 28)
|
||||
* | ((BUS & 0xFF) << 8) | ((DEVICE & 0x1F) <<3 )
|
||||
* | (FUNCTION & 0x7)
|
||||
*
|
||||
*
|
||||
* \code{.unparsed}
|
||||
* | Name | Field | KFD property KFD -> PCIe ID (uint64_t)
|
||||
* -------------- | ------- | ---------------- | ---------------------------- |
|
||||
@@ -1837,15 +1837,15 @@ rsmi_dev_pci_bandwidth_get(uint32_t dv_ind, rsmi_pcie_bandwidth_t *bandwidth);
|
||||
* | Device | [ 7: 3] | "location id" | (LOCATION & 0xF8) |
|
||||
* | Function | [ 2: 0] | "location id" | (LOCATION & 0x7) |
|
||||
* \endcode
|
||||
*
|
||||
*
|
||||
* 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
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
*
|
||||
* @param[in] dv_ind a device index
|
||||
*
|
||||
* @param[inout] bdfid a pointer to uint64_t to which the device bdfid value
|
||||
|
||||
Reference in New Issue
Block a user