Skip to content

Commit 957699f

Browse files
adeljo-amdcharis-poag-amd
authored andcommitted
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: fc61e40]
1 parent d86308f commit 957699f

File tree

8 files changed

+52
-298
lines changed

8 files changed

+52
-298
lines changed

projects/rocm-smi-lib/docs/conf.py

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@
3535

3636
external_toc_path = "./sphinx/_toc.yml"
3737

38+
exclude_patterns = ['CHANGELOG.md']
39+
3840
docs_core = ROCmDocs(left_nav_title)
3941
docs_core.run_doxygen(doxygen_root="doxygen", doxygen_path="doxygen/xml")
4042
docs_core.enable_api_reference()
@@ -47,4 +49,12 @@
4749
for sphinx_var in ROCmDocs.SPHINX_VARS:
4850
globals()[sphinx_var] = getattr(docs_core, sphinx_var)
4951

50-
extensions += ['sphinx.ext.mathjax']
52+
extensions += ['sphinx.ext.mathjax']
53+
54+
# Necessary to remove the header comments from the rocm_smi module
55+
def remove_module_docstring(app, what, name, obj, options, lines):
56+
if what == "module":
57+
del lines[:]
58+
59+
def setup(app):
60+
app.connect("autodoc-process-docstring", remove_module_docstring)

projects/rocm-smi-lib/docs/install/install.rst

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,19 +7,19 @@
77
Installing ROCm SMI
88
*********************
99

10-
Planned deprecation notice
10+
Planned deprecation notice
1111
----------------------------
1212

1313
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.
1414

1515
Install amdgpu using ROCm
1616
--------------------------
1717
Use the following instructions to install AMDGPU using ROCm:
18-
18+
1919
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.
20-
20+
2121
.. code-block:: shell
22-
22+
2323
sudo apt update
2424
wget https://repo.radeon.com/amdgpu-install/6.0.2/ubuntu/jammy/amdgpu-install_6.0.60002-1_all.deb
2525
sudo apt install ./amdgpu-install_6.0.60002-1_all.deb
@@ -33,10 +33,8 @@ Building ROCm SMI
3333
Addtional required software
3434
============================
3535

36-
To build the ROCm SMI library, the following components are required.
37-
38-
.. Note::
39-
36+
To build the ROCm SMI library, the following components are required.
37+
4038
The following software versions are what was used in development. Earlier versions are not guaranteed to work:
4139

4240
* CMake (v3.5.0)
@@ -52,7 +50,7 @@ The source code for ROCm SMI is available on `Github <https://github.com/RadeonO
5250
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,
5351

5452
.. code-block:: shell
55-
53+
5654
mkdir -p build
5755
cd build
5856
cmake ..

projects/rocm-smi-lib/docs/reference/index.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
:orphan:
2+
13
.. meta::
24
:description: Install ROCm SMI
35
:keywords: API, SMI, AMD, ROCm

projects/rocm-smi-lib/docs/reference/python_api.rst

Lines changed: 4 additions & 260 deletions
Original file line numberDiff line numberDiff line change
@@ -4,266 +4,10 @@ Python API reference
44

55
This section describes the ROCm SMI Python module API.
66

7-
.. default-domain:: py
8-
.. py:currentmodule:: rocm_smi
9-
107
Functions
118
---------
129

13-
.. autofunction:: rocm_smi.driverInitialized
14-
15-
.. autofunction:: rocm_smi.formatJson
16-
17-
.. autofunction:: rocm_smi.formatCsv
18-
19-
.. autofunction:: rocm_smi.formatMatrixToJSON
20-
21-
.. autofunction:: rocm_smi.getBus
22-
23-
.. autofunction:: rocm_smi.getFanSpeed
24-
25-
.. autofunction:: rocm_smi.getGpuUse
26-
27-
.. autofunction:: rocm_smi.getDRMDeviceId
28-
29-
.. autofunction:: rocm_smi.getSubsystemId
30-
31-
.. autofunction:: rocm_smi.getVendor
32-
33-
.. autofunction:: rocm_smi.getGUID
34-
35-
.. autofunction:: rocm_smi.getTargetGfxVersion
36-
37-
.. autofunction:: rocm_smi.getNodeId
38-
39-
.. autofunction:: rocm_smi.getDeviceName
40-
41-
.. autofunction:: rocm_smi.getRev
42-
43-
.. autofunction:: rocm_smi.getMaxPower
44-
45-
.. autofunction:: rocm_smi.getMemInfo
46-
47-
.. autofunction:: rocm_smi.getProcessName
48-
49-
.. autofunction:: rocm_smi.getPerfLevel
50-
51-
.. autofunction:: rocm_smi.getPid
52-
53-
.. autofunction:: rocm_smi.getPidList
54-
55-
.. autofunction:: rocm_smi.getPower
56-
57-
.. autofunction:: rocm_smi.getRasEnablement
58-
59-
.. autofunction:: rocm_smi.getTemp
60-
61-
.. autofunction:: rocm_smi.findFirstAvailableTemp
62-
63-
.. autofunction:: rocm_smi.getTemperatureLabel
64-
65-
.. autofunction:: rocm_smi.getPowerLabel
66-
67-
.. autofunction:: rocm_smi.getVbiosVersion
68-
69-
.. autofunction:: rocm_smi.getVersion
70-
71-
.. autofunction:: rocm_smi.getComputePartition
72-
73-
.. autofunction:: rocm_smi.getMemoryPartition
74-
75-
.. autofunction:: rocm_smi.print2DArray
76-
77-
.. autofunction:: rocm_smi.printEmptyLine
78-
79-
.. autofunction:: rocm_smi.printErrLog
80-
81-
.. autofunction:: rocm_smi.printInfoLog
82-
83-
.. autofunction:: rocm_smi.printEventList
84-
85-
.. autofunction:: rocm_smi.printLog
86-
87-
.. autofunction:: rocm_smi.printListLog
88-
89-
.. autofunction:: rocm_smi.printLogSpacer
90-
91-
.. autofunction:: rocm_smi.printSysLog
92-
93-
.. autofunction:: rocm_smi.printTableLog
94-
95-
.. autofunction:: rocm_smi.printTableRow
96-
97-
.. autofunction:: rocm_smi.checkIfSecondaryDie
98-
99-
.. autofunction:: rocm_smi.resetClocks
100-
101-
.. autofunction:: rocm_smi.resetFans
102-
103-
.. autofunction:: rocm_smi.resetPowerOverDrive
104-
105-
.. autofunction:: rocm_smi.resetProfile
106-
107-
.. autofunction:: rocm_smi.resetXgmiErr
108-
109-
.. autofunction:: rocm_smi.resetPerfDeterminism
110-
111-
.. autofunction:: rocm_smi.resetComputePartition
112-
113-
.. autofunction:: rocm_smi.resetMemoryPartition
114-
115-
.. autofunction:: rocm_smi.setClockRange
116-
117-
.. autofunction:: rocm_smi.setClockExtremum
118-
119-
.. autofunction:: rocm_smi.setVoltageCurve
120-
121-
.. autofunction:: rocm_smi.setPowerPlayTableLevel
122-
123-
.. autofunction:: rocm_smi.setClockOverDrive
124-
125-
.. autofunction:: rocm_smi.setClocks
126-
127-
.. autofunction:: rocm_smi.setPerfDeterminism
128-
129-
.. autofunction:: rocm_smi.resetGpu
130-
131-
.. autofunction:: rocm_smi.isRasControlAvailable
132-
133-
.. autofunction:: rocm_smi.setRas
134-
135-
.. autofunction:: rocm_smi.setFanSpeed
136-
137-
.. autofunction:: rocm_smi.setPerformanceLevel
138-
139-
.. autofunction:: rocm_smi.setPowerOverDrive
140-
141-
.. autofunction:: rocm_smi.setProfile
142-
143-
.. autofunction:: rocm_smi.setComputePartition
144-
145-
.. autofunction:: rocm_smi.progressbar
146-
147-
.. autofunction:: rocm_smi.showProgressbar
148-
149-
.. autofunction:: rocm_smi.setMemoryPartition
150-
151-
.. autofunction:: rocm_smi.showVersion
152-
153-
.. autofunction:: rocm_smi.showAllConcise
154-
155-
.. autofunction:: rocm_smi.showAllConciseHw
156-
157-
.. autofunction:: rocm_smi.showBus
158-
159-
.. autofunction:: rocm_smi.showClocks
160-
161-
.. autofunction:: rocm_smi.showCurrentClocks
162-
163-
.. autofunction:: rocm_smi.showCurrentFans
164-
165-
.. autofunction:: rocm_smi.showCurrentTemps
166-
167-
.. autofunction:: rocm_smi.showFwInfo
168-
169-
.. autofunction:: rocm_smi.showGpusByPid
170-
171-
.. autofunction:: rocm_smi.getCoarseGrainUtil
172-
173-
.. autofunction:: rocm_smi.showGpuUse
174-
175-
.. autofunction:: rocm_smi.showEnergy
176-
177-
.. autofunction:: rocm_smi.showId
178-
179-
.. autofunction:: rocm_smi.showMaxPower
180-
181-
.. autofunction:: rocm_smi.showMemInfo
182-
183-
.. autofunction:: rocm_smi.showMemUse
184-
185-
.. autofunction:: rocm_smi.showMemVendor
186-
187-
.. autofunction:: rocm_smi.showOverDrive
188-
189-
.. autofunction:: rocm_smi.showPcieBw
190-
191-
.. autofunction:: rocm_smi.showPcieReplayCount
192-
193-
.. autofunction:: rocm_smi.showPerformanceLevel
194-
195-
.. autofunction:: rocm_smi.showPids
196-
197-
.. autofunction:: rocm_smi.showPower
198-
199-
.. autofunction:: rocm_smi.showPowerPlayTable
200-
201-
.. autofunction:: rocm_smi.showProduct
202-
203-
.. autofunction:: rocm_smi.showProfile
204-
205-
.. autofunction:: rocm_smi.showRange
206-
207-
.. autofunction:: rocm_smi.showRasInfo
208-
209-
.. autofunction:: rocm_smi.showRetiredPages
210-
211-
.. autofunction:: rocm_smi.showSerialNumber
212-
213-
.. autofunction:: rocm_smi.showUId
214-
215-
.. autofunction:: rocm_smi.showVbiosVersion
216-
217-
.. autofunction:: rocm_smi.showEvents
218-
219-
.. autofunction:: rocm_smi.showDriverVersion
220-
221-
.. autofunction:: rocm_smi.showVoltage
222-
223-
.. autofunction:: rocm_smi.showVoltageCurve
224-
225-
.. autofunction:: rocm_smi.showXgmiErr
226-
227-
.. autofunction:: rocm_smi.showAccessibleTopology
228-
229-
.. autofunction:: rocm_smi.showWeightTopology
230-
231-
.. autofunction:: rocm_smi.showHopsTopology
232-
233-
.. autofunction:: rocm_smi.showTypeTopology
234-
235-
.. autofunction:: rocm_smi.showNumaTopology
236-
237-
.. autofunction:: rocm_smi.showHwTopology
238-
239-
.. autofunction:: rocm_smi.showNodesBw
240-
241-
.. autofunction:: rocm_smi.showComputePartition
242-
243-
.. autofunction:: rocm_smi.showMemoryPartition
244-
245-
.. autofunction:: rocm_smi.checkAmdGpus
246-
247-
.. autofunction:: rocm_smi.component_str
248-
249-
.. autofunction:: rocm_smi.confirmOutOfSpecWarning
250-
251-
.. autofunction:: rocm_smi.doesDeviceExist
252-
253-
.. autofunction:: rocm_smi.initializeRsmi
254-
255-
.. autofunction:: rocm_smi.isAmdDevice
256-
257-
.. autofunction:: rocm_smi.listDevices
258-
259-
.. autofunction:: rocm_smi.load
260-
261-
.. autofunction:: rocm_smi.padHexValue
262-
263-
.. autofunction:: rocm_smi.profileString
264-
265-
.. autofunction:: rocm_smi.relaunchAsSudo
266-
267-
.. autofunction:: rocm_smi.rsmi_ret_ok
268-
269-
.. autofunction:: rocm_smi.save
10+
.. automodule:: rocm_smi
11+
:members:
12+
:undoc-members:
13+
:exclude-members: UIntegerTypes, validateIfMaxUint
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
rocm-docs-core[api_reference]==1.4.0
1+
rocm-docs-core[api_reference]==1.13.0

0 commit comments

Comments
 (0)