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>
This commit is contained in:
1 parent
1f01526eed
commit
e307b89ca4
73 files changed
+7486
-45
No files matched your search
@@ -46,6 +46,7 @@
|
||||
#include "lib/rocprofiler-sdk/pc_sampling/code_object.hpp"
|
||||
#include "lib/rocprofiler-sdk/pc_sampling/service.hpp"
|
||||
#include "lib/rocprofiler-sdk/rccl/rccl.hpp"
|
||||
#include "lib/rocprofiler-sdk/rocdecode/rocdecode.hpp"
|
||||
#include "lib/rocprofiler-sdk/runtime_initialization.hpp"
|
||||
|
||||
#include <rocprofiler-sdk/context.h>
|
||||
@@ -908,6 +909,30 @@ rocprofiler_set_api_table(const char* name,
|
||||
rocprofiler::intercept_table::notify_intercept_table_registration(
|
||||
ROCPROFILER_RCCL_TABLE, lib_version, lib_instance, std::make_tuple(rccl_api));
|
||||
}
|
||||
else if(std::string_view{name} == "rocdecode")
|
||||
{
|
||||
// pass to rocdecode init
|
||||
ROCP_ERROR_IF(num_tables > 1)
|
||||
<< "rocprofiler expected ROCDecode library to pass 1 API table, not " << num_tables;
|
||||
|
||||
auto* rocdecode_api = static_cast<RocDecodeDispatchTable*>(tables[0]);
|
||||
|
||||
// any internal modifications to the rocdecodeApiFuncTable need to be done before we make
|
||||
// the copy or else those modifications will be lost when ROCDecode API tracing is enabled
|
||||
// because the ROCDecode API tracing invokes the function pointers from the copy below
|
||||
rocprofiler::rocdecode::copy_table(rocdecode_api, lib_instance);
|
||||
|
||||
// install rocprofiler API wrappers
|
||||
rocprofiler::rocdecode::update_table(rocdecode_api);
|
||||
|
||||
// Tracing notifications the runtime has initialized
|
||||
rocprofiler::runtime_init::initialize(
|
||||
ROCPROFILER_RUNTIME_INITIALIZATION_ROCDECODE, lib_version, lib_instance);
|
||||
|
||||
// allow tools to install API wrappers
|
||||
rocprofiler::intercept_table::notify_intercept_table_registration(
|
||||
ROCPROFILER_ROCDECODE_TABLE, lib_version, lib_instance, std::make_tuple(rocdecode_api));
|
||||
}
|
||||
else
|
||||
{
|
||||
ROCP_ERROR << "rocprofiler does not accept API tables from " << name;
|
||||
|
||||
Reference in new issue
Block a user