HIP Streams to Queues Translation (#235)
* rocprofiler_stream_id_t: opaque handle for a stream - e.g. HIP stream - the same HIP stream may map to different HSA queues at different points in the application - added to: - rocprofiler_buffer_tracing_hip_api_record_t - rocprofiler_buffer_tracing_memory_copy_record_t - rocprofiler_callback_tracing_hip_api_data_t - rocprofiler_callback_tracing_memory_copy_data_t --------- Co-authored-by: Jonathan R. Madsen <jonathanrmadsen@gmail.com> Co-authored-by: Mark Meserve <mark.meserve@amd.com> Co-authored-by: Elwazir, Ammar <Ammar.Elwazir@amd.com> Co-authored-by: Ammar ELWazir <aelwazir@amd.com> Co-authored-by: Jakaraddi, Manjunath <Manjunath.Jakaraddi@amd.com> Co-authored-by: Bhardwaj, Gopesh <Gopesh.Bhardwaj@amd.com> Co-authored-by: Nagaraj, Sriraksha <Sriraksha.Nagaraj@amd.com> Co-authored-by: U, Srihari <Srihari.U@amd.com> Co-authored-by: Madsen, Jonathan <Jonathan.Madsen@amd.com> Co-authored-by: Welton, Benjamin <Benjamin.Welton@amd.com> Co-authored-by: Benjamin Welton <ben@amd.com> Co-authored-by: Indic, Vladimir <Vladimir.Indic@amd.com> Co-authored-by: Benjamin Welton <bewelton@amd.com>
This commit is contained in:
@@ -24,6 +24,7 @@
|
||||
#include "lib/rocprofiler-sdk/context/context.hpp"
|
||||
#include "lib/rocprofiler-sdk/context/domain.hpp"
|
||||
#include "lib/rocprofiler-sdk/hip/hip.hpp"
|
||||
#include "lib/rocprofiler-sdk/hip/stream.hpp"
|
||||
#include "lib/rocprofiler-sdk/hsa/async_copy.hpp"
|
||||
#include "lib/rocprofiler-sdk/hsa/hsa.hpp"
|
||||
#include "lib/rocprofiler-sdk/hsa/memory_allocation.hpp"
|
||||
@@ -94,6 +95,7 @@ ROCPROFILER_CALLBACK_TRACING_KIND_STRING(OMPT)
|
||||
ROCPROFILER_CALLBACK_TRACING_KIND_STRING(RUNTIME_INITIALIZATION)
|
||||
ROCPROFILER_CALLBACK_TRACING_KIND_STRING(ROCDECODE_API)
|
||||
ROCPROFILER_CALLBACK_TRACING_KIND_STRING(ROCJPEG_API)
|
||||
ROCPROFILER_CALLBACK_TRACING_KIND_STRING(HIP_STREAM_API)
|
||||
|
||||
template <size_t Idx, size_t... Tail>
|
||||
std::pair<const char*, size_t>
|
||||
@@ -288,6 +290,11 @@ rocprofiler_query_callback_tracing_kind_operation_name(rocprofiler_callback_trac
|
||||
val = rocprofiler::rocjpeg::name_by_id<ROCPROFILER_ROCJPEG_TABLE_ID_CORE>(operation);
|
||||
break;
|
||||
}
|
||||
case ROCPROFILER_CALLBACK_TRACING_HIP_STREAM_API:
|
||||
{
|
||||
val = rocprofiler::hip::stream::name_by_id(operation);
|
||||
break;
|
||||
}
|
||||
};
|
||||
|
||||
if(!val)
|
||||
@@ -427,6 +434,11 @@ rocprofiler_iterate_callback_tracing_kind_operations(
|
||||
ops = rocprofiler::rocjpeg::get_ids<ROCPROFILER_ROCJPEG_TABLE_ID_CORE>();
|
||||
break;
|
||||
}
|
||||
case ROCPROFILER_CALLBACK_TRACING_HIP_STREAM_API:
|
||||
{
|
||||
ops = rocprofiler::hip::stream::get_ids();
|
||||
break;
|
||||
}
|
||||
};
|
||||
|
||||
for(const auto& itr : ops)
|
||||
@@ -571,6 +583,7 @@ rocprofiler_iterate_callback_tracing_kind_operation_args(
|
||||
case ROCPROFILER_CALLBACK_TRACING_RUNTIME_INITIALIZATION:
|
||||
case ROCPROFILER_CALLBACK_TRACING_ROCDECODE_API:
|
||||
case ROCPROFILER_CALLBACK_TRACING_ROCJPEG_API:
|
||||
case ROCPROFILER_CALLBACK_TRACING_HIP_STREAM_API:
|
||||
{
|
||||
return ROCPROFILER_STATUS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user