CodeQL / Analyze (actions) (push) Canceled after 0s
CodeQL / Analyze (python) (push) Canceled after 0s
pre-commit / pre-commit (push) Canceled after 0s
Multi-Arch CI / setup (push) Canceled after 0s
Publish build_manylinux_x86_64 images / publish_build_manylinux_x86_64 (push) Canceled after 0s
Setup (Multi-Arch) / setup (push) Canceled after 0s
Multi-Arch CI / Linux::${{ fromJSON(needs.setup.outputs.linux_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubi10 image / publish_no_rocm_image_ubi10 (push) Canceled after 0s
Multi-Arch CI / Windows::${{ fromJSON(needs.setup.outputs.windows_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Multi-Arch CI / Manifest Diff (push) Canceled after 0s
TheRock Manifest Diff Report / Generate Manifest Diff Report (push) Canceled after 0s
Multi-Arch CI / CI Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_ocl_rt images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_rocgdb images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Unit Tests / Unit Tests :: ubuntu-24.04 (push) Canceled after 0s
Unit Tests / Unit Tests :: windows-2022 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_media (push) Canceled after 0s
Unit Tests / Unit Tests Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_openmpi (push) Canceled after 0s
103 lines
3.4 KiB
ReStructuredText
103 lines
3.4 KiB
ReStructuredText
.. meta::
|
|
:description: Learn about the environment variables used by hipDNN for logging, plugins, tests, and more.
|
|
:keywords: hipDNN, ROCm, environment, API, variables
|
|
|
|
.. _variables:
|
|
|
|
****************************
|
|
hipDNN environment variables
|
|
****************************
|
|
|
|
Learn about the environment variables used by hipDNN for logging, plugins, tests, and more.
|
|
|
|
Logging configuration
|
|
=====================
|
|
|
|
hipDNN provides two environment variables to control logging behavior:
|
|
|
|
- ``HIPDNN_LOG_LEVEL``
|
|
- ``HIPDNN_LOG_FILE``
|
|
|
|
``HIPDNN_LOG_LEVEL``
|
|
--------------------
|
|
|
|
Sets the minimum severity for which logs will be emitted. Levels are inclusive: choosing a level enables messages at that level and all higher severities.
|
|
|
|
- ``off``: Disables all logging (default)
|
|
- ``info``: General informational messages
|
|
- ``warn``: Potential issues that do not interrupt execution
|
|
- ``error``: Recoverable errors that may affect results or performance
|
|
- ``fatal``: Unrecoverable errors; the operation will not continue
|
|
|
|
Here's an example:
|
|
|
|
.. code:: bash
|
|
|
|
export HIPDNN_LOG_LEVEL=info
|
|
|
|
``HIPDNN_LOG_FILE``
|
|
-------------------
|
|
|
|
Specifies the file path where logs will be appended. If this variable isn't set, logs are written to ``stderr``.
|
|
|
|
Here's an example:
|
|
|
|
.. code:: bash
|
|
|
|
export HIPDNN_LOG_FILE=/path/to/hipdnn.log
|
|
|
|
.. tip::
|
|
|
|
When using the MIOpen legacy plugin, you can use MIOpen-specific environment variables to control the underlying library's logging behavior.
|
|
|
|
|
|
.. _plugin-loading-variables:
|
|
|
|
Plugin loading
|
|
==============
|
|
|
|
The following environment variable can be used to control which folders hipDNN will scan for plugins to load.
|
|
|
|
``HIPDNN_PLUGIN_DIR``
|
|
---------------------
|
|
|
|
By default, hipDNN loads plugins from ``./hipdnn_plugins/engines/``.
|
|
This path is relative to the hipDNN backend shared library location in the ROCm install folder, typically ``/opt/rocm/lib/`` on Linux.
|
|
|
|
Default structure example (Linux):
|
|
|
|
.. code::
|
|
|
|
/opt/rocm/lib/
|
|
└── hipdnn_plugins/
|
|
└── engines/
|
|
├── miopen_plugin.so
|
|
└── other_plugin.so
|
|
|
|
When ``HIPDNN_PLUGIN_DIR`` is set, hipDNN *only* loads plugins from the specified directory and supplementary custom paths, ignoring the default location.
|
|
This allows complete control over which plugins are loaded.
|
|
|
|
.. code:: bash
|
|
|
|
# Load plugins from a custom directory
|
|
export HIPDNN_PLUGIN_DIR=/path/to/test/plugins
|
|
|
|
Path resolution
|
|
~~~~~~~~~~~~~~~
|
|
|
|
The ``HIPDNN_PLUGIN_DIR`` paths can be:
|
|
|
|
- **Relative paths**: Resolved from the backend shared library location (typically ``/opt/rocm/lib`` on Linux, or ``C:\TheRock\bin`` on Windows if ROCm is installed to ``C:\TheROck``).
|
|
|
|
- For example, if ``HIPDNN_PLUGIN_DIR`` is set to ``./test_plugins``, then hipDNN tries to load all plugins from ``/opt/rocm/lib/./test_plugins``.
|
|
|
|
- **Absolute paths**: Used as specified.
|
|
|
|
For both relative paths and absolute paths:
|
|
|
|
- If the path specifies a folder, hipDNN tries to load all ``.so`` files (Linux) or ``.DLL`` files (Windows) from that folder as plugins.
|
|
- If the path specifies a filename ending in ``.so`` (Linux) or ``.DLL`` (Windows), then only that plugin will be loaded.
|
|
- If the path specifies a filename without an extension, hipDNN prefixes the filename with ``lib`` and adds the ``.so`` suffix (Linux), or adds the ``.DLL`` suffix (Windows) and only loads that file.
|
|
|
|
See :ref:`plugin-loading` for API functions that provide additional control over which folders plugins are loaded from.
|