This PR introduces support for the rocDecode API dispatch table, which is essential for tracing rocDecode APIs with tools like rocprofiler.
The PR includes the following changes:
CMakeLists.txt A new CMake option, ROCDECODE_ROCPROFILER_REGISTER, has been introduced. This option controls whether the rocDecode APIs are registered by the rocprofiler. By default, this option is set to OFF. We will change it to ON once the rocprofiler has the necessary updates to support rocDecode.
rocdecode_api_trace.h This file defines the RocDecodeDispatchTable struct as the rocDecode API dispatch table, which consists of function pointers for each of the rocDecode runtime APIs.
rocdecode_api_trace.cpp This file assigns function pointers for each of the rocDecode runtime APIs to their respective implementations. It also registers the rocDecode APIs with rocprofiler if the ROCDECODE_ROCPROFILER_REGISTER option is enabled.
rocdecode_api_dispatch_interface.cpp This file defines the wrappers for the rocDecode runtime APIs by utilizing the corresponding function pointers from the rocDecode dispatch table.
rocparser_api.cpp and rocdecode_api.cpp The rocDecode APIs are placed in the rocdecode namespace to prevent name collisions with the wrapper functions defined in rocdecode_api_dispatch_interface.cpp.
This PR introduces support for the rocDecode API dispatch table, which is essential for tracing rocDecode APIs with tools like rocprofiler.
The PR includes the following changes:
CMakeLists.txt
A new CMake option,ROCDECODE_ROCPROFILER_REGISTER
, has been introduced. This option controls whether the rocDecode APIs are registered by the rocprofiler. By default, this option is set toOFF
. We will change it toON
once the rocprofiler has the necessary updates to support rocDecode.rocdecode_api_trace.h
This file defines theRocDecodeDispatchTable
struct as the rocDecode API dispatch table, which consists of function pointers for each of the rocDecode runtime APIs.rocdecode_api_trace.cpp
This file assigns function pointers for each of the rocDecode runtime APIs to their respective implementations. It also registers the rocDecode APIs with rocprofiler if theROCDECODE_ROCPROFILER_REGISTER
option is enabled.rocdecode_api_dispatch_interface.cpp
This file defines the wrappers for the rocDecode runtime APIs by utilizing the corresponding function pointers from the rocDecode dispatch table.rocparser_api.cpp
androcdecode_api.cpp
The rocDecode APIs are placed in the rocdecode namespace to prevent name collisions with the wrapper functions defined inrocdecode_api_dispatch_interface.cpp
.