Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 7 additions & 17 deletions docs/how-to/amdsmi-cpp-lib.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,23 +14,13 @@ 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.
```

Comment thread
adeljo-amd marked this conversation as resolved.
```{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.
- ``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.
- Some behaviors can be controlled via environment variables. For more information,
see [environment variable](../reference/amdsmi-env-var.md) page.
```

```{seealso}
Expand Down
1 change: 1 addition & 0 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ AMD SMI is the successor to <https://github.com/ROCm/rocm_smi_lib>.
* [Data fields](../doxygen/docBin/html/functions_data_fields)
* [Python API](./reference/amdsmi-py-api.md)
* [Go API](./reference/amdsmi-go-api.md)
* [Environment variables](./reference/amdsmi-env-var.md)
:::

:::{grid-item-card} Conceptual
Expand Down
26 changes: 26 additions & 0 deletions docs/reference/amdsmi-env-var.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
---
myst:
html_meta:
"description lang=en": "Explore the AMD SMI environment variable references."
"keywords": "api, smi, ROCm, environment variables, environment, reference, settings, AMD SMI"
---

# AMD SMI environment variable reference

Comment thread
adeljo-amd marked this conversation as resolved.
This section describes the environment variables used to control the behavior of AMD SMI.

```{list-table}
Comment thread
adeljo-amd marked this conversation as resolved.
:header-rows: 1
:widths: 70 30

* - **Environment variable**
- **Value**
* - `AMDSMI_ASIC_INFO_CACHE_MS` \
Configures the cache duration for ASIC information retrieved by `amdsmi_get_gpu_asic_info` API calls. The cache stores ASIC info for each GPU device to improve performance by avoiding redundant hardware queries.
- Duration in milliseconds \
Default: `10000`
* - `AMDSMI_GPU_METRICS_CACHE_MS` \
Configures the cache duration for GPU metrics retrieved by GPU metrics API calls. The cache stores metrics for each GPU device to improve performance by avoiding redundant hardware queries.
- Duration in milliseconds \
Default: `1`
Comment thread
adeljo-amd marked this conversation as resolved.
```
2 changes: 2 additions & 0 deletions docs/sphinx/_toc.yml.in
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ subtrees:
title: Python API
- file: reference/amdsmi-go-api.md
title: Go API
- file: reference/amdsmi-env-var.md
title: Environment variables
- file: reference/changelog.md
title: Changelog
Comment thread
adeljo-amd marked this conversation as resolved.

Expand Down
Loading