Add support for RCCL tracing (#1047)

* [Draft]: Add support for RCCL tracing

Address comments

* [Draft]: Add support for RCCL tracing

Address PR comments, changes from RCCL upstream

* Add RCCL library table registration

Working on adding support to rocprofiler-register

* Support compilation w/o <rccl/amd_detail/api_trace.h>

- dummy api_trace.h header
- return ROCPROFILER_STATUS_ERROR_NOT_IMPLEMENTED when RCCL does not have api_trace.h header

* RCCL API tracing tool support

- add to rocprofv3
- add to json-tool

---------

Co-authored-by: Jonathan R. Madsen <jonathanrmadsen@gmail.com>
Tá an tiomantas seo le fáil i:
MythreyaagusJonathan R. Madsen údaraithe agus GitHub tiomanta 2024-09-12 00:42:58 -05:00
1 tuismitheoir 72cbcedc9e
tiomantas 2a146259c7
43 comhad athraithe
+2270 -30

Níor tháinig aon chomhaid le do chuardach

+8 -1
Féach ar an gComhad
@@ -33,6 +33,7 @@
#include <hsa/hsa_api_trace.h>
#include <hip/amd_detail/hip_api_trace.hpp>
#include "lib/rocprofiler-sdk/rccl/rccl.hpp"
#include <cstdint>
#include <mutex>
@@ -55,7 +56,8 @@ constexpr auto intercept_library_seq = library_sequence_t<ROCPROFILER_HSA_TABLE,
ROCPROFILER_HIP_COMPILER_TABLE,
ROCPROFILER_MARKER_CORE_TABLE,
ROCPROFILER_MARKER_CONTROL_TABLE,
ROCPROFILER_MARKER_NAME_TABLE>{};
ROCPROFILER_MARKER_NAME_TABLE,
ROCPROFILER_RCCL_TABLE>{};
// check that intercept_library_seq is up to date
static_assert((1 << (intercept_library_seq.size() - 1)) == ROCPROFILER_TABLE_LAST,
@@ -185,6 +187,11 @@ template void notify_intercept_table_registration(rocprofiler_intercept_table_t,
uint64_t,
uint64_t,
std::tuple<HipCompilerDispatchTable*>);
template void notify_intercept_table_registration(rocprofiler_intercept_table_t,
uint64_t,
uint64_t,
std::tuple<rcclApiFuncTable*>);
} // namespace intercept_table
} // namespace rocprofiler