Files
TheRock/rocm-libraries/projects/hipblaslt/docs/how-to/use-logging-heuristics.rst
T
derek.holloway 7502bf64a4
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
Flatten subprojects into a single base monorepo
2026-09-02 16:34:47 -07:00

60 lines
2.5 KiB
ReStructuredText

.. meta::
:description: How to use the hipBLASLt logging and heuristic utilities
:keywords: hipBLASLt, ROCm, library, API, logging, heuristics
.. _logging-heuristics:
=============================
Using logging and heuristics
=============================
This topic contains information about debugging and improving the application performance when using the hipBLASLt APIs.
Logging
==========
You can enable the hipBLASLt logging mechanism by setting the following environment variables before launching the target application:
* ``HIPBLASLT_LOG_LEVEL=<level>``: The ``level`` can be one of the following values:
.. csv-table::
:header: "Value","Setting","Description"
:widths: 5, 15, 80
"``0``","Off","Logging is disabled (default)"
"``1``","Error","Only errors are logged"
"``2``","Trace","API calls that launch HIP kernels log their parameters and important information"
"``3``","Hints","Hints that can potentially improve the application's performance"
"``4``","Info","Provides general information about the library execution and can contain details about the heuristic status"
"``5``","API trace","API calls log their parameters and important information"
* ``HIPBLASLT_LOG_MASK=<mask>``: The ``mask`` is a combination of the following flags:
.. csv-table::
:header: "Value","Description"
:widths: 10, 80
"``0``","Off"
"``1``","Error"
"``2``","Trace"
"``4``","Hints"
"``8``","Info"
"``16``","API trace"
"``32``","Bench"
"``64``","Profile"
"``128``","Extended profile"
* ``HIPBLASLT_LOG_FILE=<file_name>``: The ``file_name`` is a path to a logging file. The file name can contain ``%i``,
which is replaced with the process ID, for example, ``<file_name>_%i.log``.
If ``HIPBLASLT_LOG_FILE`` is not defined, the log messages are printed to stdout.
* ``HIPBLASLT_ENABLE_MARKER=1``: Setting ``HIPBLASLT_ENABLE_MARKER`` to ``1`` enables marker trace for :doc:`ROCProfiler <rocprofiler:index>` profiling.
Heuristics cache
==================
hipBLASLt uses heuristics to pick the most suitable matmul kernel for execution based on the problem sizes,
GPU configuration, and other parameters. This requires performing some computations on the host CPU, which could take tens of microseconds.
To overcome this overhead, it's recommended that you query the heuristics once using :ref:`hipblasltmatmulalgogetheuristic`,
then reuse the result for subsequent computations using :ref:`hipblasltmatmul`.