From 21811e45bd8bf4aca01ef014375c833d2ff08487 Mon Sep 17 00:00:00 2001 From: rkebichi <54912798+rkebichi@users.noreply.github.com> Date: Wed, 2 Oct 2019 19:26:41 -0400 Subject: [PATCH] Update MatrixTranspose.cpp [ROCm/roctracer commit: c14c073d3f1e1a867cbf1ed06a028003eac18172] --- .../test/MatrixTranspose_test/MatrixTranspose.cpp | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/projects/roctracer/test/MatrixTranspose_test/MatrixTranspose.cpp b/projects/roctracer/test/MatrixTranspose_test/MatrixTranspose.cpp index 7ca24d0f0b..f0a3d58d3b 100644 --- a/projects/roctracer/test/MatrixTranspose_test/MatrixTranspose.cpp +++ b/projects/roctracer/test/MatrixTranspose_test/MatrixTranspose.cpp @@ -31,6 +31,10 @@ THE SOFTWARE. // roctx header file #include +// kfd header file +#include +#include + #ifndef ITERATIONS # define ITERATIONS 100 #endif @@ -203,6 +207,15 @@ void api_callback( fprintf(stdout, "ROCTX: \"%s\"\n", data->args.message); return; } + if (domain == ACTIVITY_DOMAIN_KFD_API) { + const kfd_api_data_t* data = reinterpret_cast(callback_data); + fprintf(stdout, "KFD: <%s id(%u)\tcorrelation_id(%lu) %s> \n", + roctracer_op_string(ACTIVITY_DOMAIN_KFD_API, cid, 0), + cid, + data->correlation_id, + (data->phase == ACTIVITY_API_PHASE_ENTER) ? "on-enter" : "on-exit"); + return; + } const hip_api_data_t* data = reinterpret_cast(callback_data); fprintf(stdout, "<%s id(%u)\tcorrelation_id(%lu) %s> ", @@ -263,7 +276,7 @@ void activity_callback(const char* begin, const char* end, void* arg) { record->begin_ns, record->end_ns ); - if (record->domain == ACTIVITY_DOMAIN_HIP_API) { + if (record->domain == ACTIVITY_DOMAIN_HIP_API or record->domain == ACTIVITY_DOMAIN_KFD_API) { fprintf(stdout, " process_id(%u) thread_id(%u)", record->process_id, record->thread_id