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>
Cette révision appartient à :
Mythreya
2024-09-11 22:42:58 -07:00
révisé par GitHub
Parent 72cbcedc9e
révision 2a146259c7
43 fichiers modifiés avec 2270 ajouts et 30 suppressions
+8 -1
Voir le fichier
@@ -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