docs: Fix links to API usage examples (#701)

* fix links to python apis
* add links to repo for example code
* fix `WARNING: Pygments lexer name is not known`

Signed-off-by: Peter Park <Peter.Park@amd.com>

[ROCm/amdsmi commit: 5d0a39fa9d]
This commit is contained in:
Park, Peter
2025-09-19 11:07:38 -04:00
committed by GitHub
parent e0995ce7a0
commit 26841f86c0
5 changed files with 19 additions and 17 deletions
+1 -1
View File
@@ -16,7 +16,7 @@ Full documentation for amd_smi_lib is available at [https://rocm.docs.amd.com/pr
values through the `-G/--gpuboard` or `-b/--baseboard` options or obtain all of them as normal using the `amd-smi metric` command without
any options. If the hardware does not support gpuboard or baseboard temperatures, then the values will be hidden from the default `metric` view.
```conosle
```console
$ amd-smi metric -b
GPU: 0
BASEBOARD:
+9 -9
View File
@@ -70,18 +70,18 @@ information](/doxygen/docBin/html/group__tagRasInfo) for available APIs.
::::{tab-item} Python
See related APIs:
- [](#amdsmi_get_gpu_ecc_count)
- [](#amdsmi_get_gpu_ecc_enabled)
- [](#amdsmi_get_gpu_ecc_status)
- [](#amdsmi_get_gpu_total_ecc_count)
- [](#amdsmi_get_gpu_cper_entries)
- [](#amdsmi_get_afids_from_cper)
- [](#amdsmi_get_gpu_ras_feature_info)
- [](#amdsmi_get_gpu_ras_block_features_enabled)
- [](/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`](#cmd-ras) for details and available options.
See [`amd-smi ras --help`](/how-to/amdsmi-cli-tool.md#amd-smi-ras) for details and available options.
```shell
amd-smi ras --help
```
@@ -811,8 +811,6 @@ Command Modifiers:
--loglevel LEVEL Set the logging level from the possible choices:
```
(cmd-ras)=
### amd-smi ras
Displays RAS information of specified devices.
@@ -1177,4 +1175,8 @@ This example code shows how to dump AFID errors in a CPER file
~$ sudo amd-smi ras --afid --cper-file /tmp/cper_dump/fatal-1.cper
```
Refer to amd_smi_cper_example.py & amd_smi_afid_example.py for API examples
Refer to
[amd_smi_cper_example.py](https://github.com/ROCm/amdsmi/blob/amd-mainline/example/amd_smi_cper_example.py)
and
[amd_smi_afid_example.py](https://github.com/ROCm/amdsmi/blob/amd-mainline/example/amd_smi_afid_example.py)
for API examples.
@@ -68,7 +68,7 @@ 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
```{note}
Sample build example:
$ g++ -I/opt/rocm/include <file_name>.cc -L/opt/rocm/lib -lamd_smi -o <filename>
@@ -158,7 +158,7 @@ driver and make sure that any resources held by AMD SMI are released.
2. A sample program that displays the power of detected CPUs.
```note
```{note}
Sample build example:
$ g++ -DENABLE_ESMI -I/opt/rocm/include <file_name>.cc -L/opt/rocm/lib -lamd_smi -o <filename>
@@ -1306,7 +1306,7 @@ Example:
print(e)
```
Refer to amd_smi_cper_example.py for a complete example
Refer to [amd_smi_cper_example.py](https://github.com/ROCm/amdsmi/blob/amd-mainline/example/amd_smi_cper_example.py) for a complete example.
### amdsmi_get_afids_from_cper
@@ -1343,7 +1343,7 @@ Example:
print(e)
```
Refer to amd_smi_afid_example.py for a complete example
Refer to [amd_smi_afid_example.py](https://github.com/ROCm/amdsmi/blob/amd-mainline/example/amd_smi_afid_example.py) for a complete example.
### amdsmi_get_gpu_ras_feature_info