Files
TheRock/rocm-systems/projects/aqlprofile
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
..

Warning

This copy of aqlprofile is deprecated

The sources under projects/aqlprofile/ have been migrated into the projects/rocprofiler-sdk source tree and are no longer the source of truth.

All ongoing development now happens in the embedded copy:

projects/rocprofiler-sdk/source/lib/aqlprofile/

This standalone copy is being retired. Please direct any changes, bug fixes, and new features to the embedded copy above. Pull requests that modify projects/aqlprofile/ will be flagged and asked to move.

AQLprofile: Architected Queuing Language Profiling Library

AQLprofile is an open source library that enables advanced GPU profiling and tracing on AMD platforms. It works in conjunction with rocprofiler-sdk to support profiling methods such as performance counters (PMC) and SQ thread trace (SQTT). AQLprofile provides the foundational mechanisms for constructing AQL packets and managing profiling operations across multiple AMD GPU architecture families.

Background

AQLprofile builds on concepts from the Heterogeneous System Architecture (HSA) and Architected Queuing Language (AQL), which define the foundations for GPU command processing and profiling on AMD platforms. For further reading:

Overview

AQLprofile is a companion library to rocprofiler-sdk. It provides the low-level mechanisms required by rocprofiler-sdk to enable advanced GPU profiling and tracing capabilities on AMD platforms. The development and evolution of AQLprofile are closely aligned with the needs of rocprofiler-sdk, ensuring compatibility and feature support for new GPU architectures and profiling requirements.

AQLprofile abstracts the complexity of constructing and managing AQL (Architected Queuing Language) packets, command buffers, and register programming. These components are essential for orchestrating profiling operations such as performance counter collection and thread tracing. The library supports a range of AMD GPU architecture families such as GFX9, GFX10, GFX11, GFX12 and so on. It provides the necessary infrastructure for rocprofiler-sdk to interact with hardware-level profiling features.

Features

  • Profiling AQL packets for GPU workloads.
  • Performance counters (PMC) and SQ thread traces (SQTT).
  • Support for GFX9, GFX10, GFX11 and GFX12 architecture families.
  • Verbose tracing and error logging capabilities.
  • Thread trace binary data generated by AQLprofile can be decoded using rocprof-trace-decoder.

Supported Architectures and Counter Blocks

The AQLprofile library supports profiling and tracing GPU workloads across multiple architectures.
Below is a summary of the counter blocks supported for each architecture:

Counter Block Name GFX9 GFX908 GFX90A GFX942 GFX10 GFX11 GFX12
ATC ✅ ❌ ❌ ✅ ❌ ❌ ❌
ATC_L2 ✅ ❌ ❌ ❌ ❌ ❌ ❌
CHA ❌ ❌ ❌ ❌ ❌ ❌ ✅
CHC ❌ ❌ ❌ ❌ ❌ ❌ ✅
CPC ✅ ✅ ✅ ✅ ✅ ✅ ✅
CPF ✅ ✅ ✅ ✅ ✅ ✅ ✅
CPG ❌ ❌ ❌ ❌ ❌ ❌ ✅
GCEA ✅ ✅ ✅ ✅ ✅ ✅ ✅
GCR ❌ ❌ ❌ ❌ ✅ ✅ ✅
GDS ✅ ❌ ❌ ❌ ✅ ✅ ❌
GL1A ❌ ❌ ❌ ❌ ✅ ✅ ✅
GL1C ❌ ❌ ❌ ❌ ✅ ✅ ✅
GL2A ❌ ❌ ❌ ❌ ✅ ✅ ✅
GL2C ❌ ❌ ❌ ❌ ✅ ✅ ✅
GRBM ✅ ✅ ✅ ✅ ✅ ✅ ✅
GRBMH ❌ ❌ ❌ ❌ ❌ ❌ ✅
GRBM_SE ✅ ❌ ❌ ❌ ❌ ❌ ❌
GUS ❌ ❌ ❌ ❌ ✅ ✅ ❌
MC_VM_L2 ✅ ❌ ❌ ❌ ❌ ❌ ❌
RPB ✅ ✅ ❌ ❌ ❌ ❌ ❌
SDMA ❌ ❌ ❌ ❌ ❌ ❌ ❌
SPI ✅ ✅ ✅ ✅ ✅ ✅ ✅
SQ ✅ ✅ ✅ ✅ ✅ ✅ ✅
SQ_CS ✅ ❌ ❌ ❌ ❌ ❌ ❌
SX ✅ ❌ ❌ ❌ ✅ ✅ ❌
TA ✅ ✅ ✅ ✅ ✅ ✅ ✅
TCA ✅ ✅ ✅ ✅ ❌ ❌ ❌
TCC ✅ ✅ ✅ ✅ ❌ ❌ ❌
TCP ✅ ✅ ✅ ✅ ❌ ✅ ✅
TD ✅ ✅ ✅ ✅ ❌ ❌ ✅

Legend:

  • ✅: Supported
  • ❌: Not Supported

Build and Installation

Prerequisites

Ensure the following tools and dependencies are installed:

  • ROCm stack
  • rocm-llvm-dev (required to build tests)

Building AQLprofile

You can build AQLprofile using either the provided build script (recommended for most users) or by manually invoking CMake for custom builds.

This will configure and build the project with default settings:

./build.sh

Option 2: Custom Build with CMake

For more control over the build process, you can set CMake options manually:

# Set the CMAKE_PREFIX_PATH to point to hsa-runtime includes path and hsa-runtime library path
export CMAKE_PREFIX_PATH=<path to hsa-runtime includes>:<path to hsa-runtime library>
# For example, if ROCm is installed at /opt/rocm:
# export CMAKE_PREFIX_PATH=/opt/rocm/lib:/opt/rocm/include/hsa

export CMAKE_BUILD_TYPE=<debug|release> # release by default

cd /path/to/aqlprofile
mkdir build
cd build
cmake ..
make -j

Debug Trace Mode (optional; for debugging only)

To enable debug tracing, set the following environment variable before running CMake:

export CMAKE_DEBUG_TRACE=1

This enables verbose debug output of the command packets while this library executes

Installation

After building, install the AQLprofile libraries with:

cd build
sudo make install

Support

For issues or questions, please report them in the GitHub Issues section or contact AMD support at dl.ROCm-Profiler.support@amd.com.

License

AQLprofile is open source and distributed under the MIT License. See the LICENSE file for more details.