From 76e25cff421a2c246dde07a09ece2cc4e7121122 Mon Sep 17 00:00:00 2001 From: Giovanni LB Date: Wed, 23 Oct 2024 13:17:32 -0300 Subject: [PATCH] Output GPU index for kernel.txt files Change-Id: Ib32e051bd035c0ecd30ba79b347fd65fe289c3fb [ROCm/rocprofiler commit: 71dcc432dad673c65a8d2c0583356637e5dcd1cf] --- projects/rocprofiler/src/core/session/att/att.cpp | 2 +- projects/rocprofiler/src/core/session/att/continuous.cpp | 6 +++++- projects/rocprofiler/src/core/session/att/singlekernel.cpp | 6 +++++- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/projects/rocprofiler/src/core/session/att/att.cpp b/projects/rocprofiler/src/core/session/att/att.cpp index a19e99e449..d695c87802 100644 --- a/projects/rocprofiler/src/core/session/att/att.cpp +++ b/projects/rocprofiler/src/core/session/att/att.cpp @@ -210,7 +210,7 @@ bool AttTracer::AsyncSignalHandlerATT(hsa_signal_value_t /* signal */, void* dat { rocprofiler_record_att_tracer_t record{}; record.kernel_id = rocprofiler_kernel_id_t{pending.kernel_descriptor}; - record.gpu_id = rocprofiler_agent_id_t{(uint64_t)queue_info_session->agent.handle}; + record.gpu_id = rocprofiler_agent_id_t{(uint64_t)queue_info_session->gpu_index}; record.kernel_properties = pending.kernel_properties; record.thread_id = rocprofiler_thread_id_t{pending.thread_id}; record.queue_idx = rocprofiler_queue_index_t{pending.queue_index}; diff --git a/projects/rocprofiler/src/core/session/att/continuous.cpp b/projects/rocprofiler/src/core/session/att/continuous.cpp index 10763a916a..e2aad9a942 100644 --- a/projects/rocprofiler/src/core/session/att/continuous.cpp +++ b/projects/rocprofiler/src/core/session/att/continuous.cpp @@ -192,7 +192,11 @@ void AttTracer::InsertPacketStop( rsignal.session_id_snapshot, queue.GetQueueID(), rsignal.writer_id, - interrupt_signal + interrupt_signal, + HSASupport_Singleton::GetInstance() + .GetHSAAgentInfo(agent_handle) + .GetDeviceInfo() + .getNumaNode() }); //codeobj_record::stop_capture(rocprofiler_record_id_t{rsignal.record_id}); diff --git a/projects/rocprofiler/src/core/session/att/singlekernel.cpp b/projects/rocprofiler/src/core/session/att/singlekernel.cpp index ff7603e3a5..8e8638c495 100644 --- a/projects/rocprofiler/src/core/session/att/singlekernel.cpp +++ b/projects/rocprofiler/src/core/session/att/singlekernel.cpp @@ -217,7 +217,11 @@ bool AttTracer::ATTSingleWriteInterceptor( session_id_, queue_info.GetQueueID(), writer_id, - interrupt_signal + interrupt_signal, + HSASupport_Singleton::GetInstance() + .GetHSAAgentInfo(queue_info.GetGPUAgent().handle) + .GetDeviceInfo() + .getNumaNode() }); } /* Write the transformed packets to the hardware queue. */