rocDecode API Tracing Support (#49)

* rocDecode API Tracing support

* Test bin file added to rocdecode. Need to add validate python methods

* Added option to not make rocDecode tests

* Added rocdecode and rocprofv3 tests

* Added csv test

* Address PR comments. Changed tests to use built-in rocstreambit decoder to remove ffmpeg dependancy. Changed cmake option to disbale tests rather than not build them. Tests work locally, but will fail until rocDecode is built with tracing enabled on CI

* Add option to avoid building rocdecode tests

* Added option to avoid building rocdecode bin file

* Merge conflict error

* CMake files changed in response to review comments. Attempting to implement callbacks.

* Turned off test building for rocdecode

* Minor fixes for review comments

* Review comments

* Updated formatting

* Document changes and format.hpp reversion. Need to remove iterate args support for now for later update.

* Remove iterate args support

* Remove iterate-args

* enforce abi versioning in macro if

* Fix doc error

* removed spaces to fix indentation error

---------

Co-authored-by: Madsen, Jonathan <Jonathan.Madsen@amd.com>

[ROCm/rocprofiler-sdk commit: e307b89ca4]
This commit is contained in:
Trowbridge, Ian
2025-01-17 16:42:25 -06:00
committed by GitHub
parent 69d94c65a8
commit 3e1b8ba4ec
73 changed files with 7486 additions and 45 deletions
@@ -55,11 +55,11 @@ Here is the sample of commonly used ``rocprofv3`` command-line options. Some opt
- Output control
* - ``-r`` \| ``--runtime-trace``
- Collects HIP (runtime), memory copy, memory allocation, marker, scratch memory, and kernel dispatch traces.
- Collects HIP (runtime), memory copy, memory allocation, marker, scratch memory, rocDecode, and kernel dispatch traces.
- Application Tracing
* - ``-s`` \| ``--sys-trace``
- Collects HIP, HSA, memory copy, memory allocation, marker, scratch memory, and kernel dispatch traces.
- Collects HIP, HSA, memory copy, memory allocation, marker, scratch memory, rocDecode, and kernel dispatch traces.
- Application Tracing
* - ``--hip-trace``
@@ -86,6 +86,10 @@ Here is the sample of commonly used ``rocprofv3`` command-line options. Some opt
- Collects scratch memory operations traces.
- Application tracing
* - ``--rocdecode-trace``
- Collects rocDecode API traces.
- Application tracing
* - ``--hsa-trace``
- Collects HSA API traces.
- Application tracing
@@ -615,6 +619,28 @@ Here are the contents of ``rccl_api_trace.csv`` file:
:widths: 10,10,10,10,10,20,20
:header-rows: 1
rocDecode trace
++++++++++++++++
`rocDecode <https://github.com/ROCm/rocDecode>`_ is a high-performance video decode SDK for AMD GPUs. This option traces the rocDecode API.
.. code-block:: shell
rocprofv3 --rocdecode-trace -- <application_path>
The above command generates a ``rocdecode_api_trace`` file prefixed with the process ID.
.. code-block:: shell
$ cat 41688_rocdecode_api_trace.csv
Here are the contents of ``rocdecode_api_trace.csv`` file:
.. csv-table:: rocDecode trace
:file: /data/rocdecode_api_trace.csv
:widths: 10,10,10,10,10,20,20
:header-rows: 1
Post-processing tracing options
++++++++++++++++++++++++++++++++
@@ -1336,3 +1362,15 @@ Properties
- **`handle`** *(integer, required)*: Handle of the agent.
- **`address`** *(string, required)*: Starting address of allocation.
- **`allocation_size`** *(integer, required)*: Size of allocation.
- **`rocDecode_api`** *(array)*: rocDecode API records.
- **Items** *(object)*
- **`size`** *(integer, required)*: Size of the rocDecode API record.
- **`kind`** *(integer, required)*: Kind of the rocDecode API.
- **`operation`** *(integer, required)*: Operation of the rocDecode API.
- **`correlation_id`** *(object, required)*: Correlation ID information.
- **`internal`** *(integer, required)*: Internal correlation ID.
- **`external`** *(integer, required)*: External correlation ID.
- **`start_timestamp`** *(integer, required)*: Start timestamp.
- **`end_timestamp`** *(integer, required)*: End timestamp.
- **`thread_id`** *(integer, required)*: Thread ID.