Add rocDecode API support (#4)

* Add rocDecode API support

* Update CI

* CI update: Sanitizers run on ubuntu 22.04

---------

Co-authored-by: Jonathan R. Madsen <jonathanrmadsen@gmail.com>
This commit is contained in:
Trowbridge, IanochJonathan R. Madsen authored and GitHub committed 2025-01-21 21:00:43 -06:00
1 förälder 164eda5231
incheckning de3a874b1a
10 files changed
+313 -23

No files matched your search

+18 -4
Visa fil
@@ -2,6 +2,7 @@
#include <amdhip/amdhip.hpp>
#include <hsa-runtime/hsa-runtime.hpp>
#include <rccl/rccl.hpp>
#include <rocdecode/rocdecode.hpp>
#include <roctx/roctx.hpp>
#include <dlfcn.h>
@@ -37,6 +38,13 @@ ncclGetVersion(int*)
return {};
}
rocDecStatus
rocDecCreateDecoder(rocDecDecoderHandle*, RocDecoderCreateInfo*)
{
printf("[%s] %s\n", ROCP_REG_FILE_NAME, __FUNCTION__);
return {};
}
void
roctx_range_push(const char* name)
{
@@ -83,10 +91,11 @@ rocprofiler_set_api_table(const char* name,
" did not contain rocprofiler_configure symbol" };
}
using hip_table_t = hip::HipApiTable;
using hsa_table_t = hsa::HsaApiTable;
using roctx_table_t = roctx::ROCTxApiTable;
using rccl_table_t = rccl::rcclApiFuncTable;
using hip_table_t = hip::HipApiTable;
using hsa_table_t = hsa::HsaApiTable;
using roctx_table_t = roctx::ROCTxApiTable;
using rccl_table_t = rccl::rcclApiFuncTable;
using rocdecode_table_t = rocdecode::rocdecodeApiFuncTable;
auto* _wrap_v = std::getenv("ROCP_REG_TEST_WRAP");
bool _wrap = (_wrap_v != nullptr && std::stoi(_wrap_v) != 0);
@@ -121,6 +130,11 @@ rocprofiler_set_api_table(const char* name,
rccl_table_t* _table = static_cast<rccl_table_t*>(tables[0]);
_table->ncclGetVersion_fn = &rocprofiler::ncclGetVersion;
}
else if(std::string_view{ name } == "rocdecode")
{
rocdecode_table_t* _table = static_cast<rocdecode_table_t*>(tables[0]);
_table->rocDecCreateDecoder_fn = &rocprofiler::rocDecCreateDecoder;
}
}
return 0;