From 9c62afb8baa0332c2a74bb6cb0b91ef9e328577f Mon Sep 17 00:00:00 2001 From: Xianwei Zhang Date: Wed, 26 Aug 2020 15:15:19 -0400 Subject: [PATCH] concurrent: enable/fix the related settings Concurrent profiling relies on the aqlprofile read_api and tracker. This patch set those options to enable the concurrent profiling. Change-Id: Ib97d4d8facfbc11f2684d83109397cd13f117d5e [ROCm/rocprofiler commit: b445610cd17f80972550354f572fe43cf69b1030] --- projects/rocprofiler/bin/rpl_run.sh | 1 + projects/rocprofiler/src/core/rocprofiler.cpp | 1 + projects/rocprofiler/test/tool/tool.cpp | 4 ++-- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/projects/rocprofiler/bin/rpl_run.sh b/projects/rocprofiler/bin/rpl_run.sh index f11e0a22a8..504fd0603c 100755 --- a/projects/rocprofiler/bin/rpl_run.sh +++ b/projects/rocprofiler/bin/rpl_run.sh @@ -443,6 +443,7 @@ while [ 1 ] ; do elif [ "$1" = "--parallel-kernels" ] ; then ARG_VAL=0 export ROCP_K_CONCURRENT=1 + export AQLPROFILE_READ_API=1 elif [ "$1" = "--verbose" ] ; then ARG_VAL=0 export ROCP_VERBOSE_MODE=1 diff --git a/projects/rocprofiler/src/core/rocprofiler.cpp b/projects/rocprofiler/src/core/rocprofiler.cpp index 5d1cd9c7f7..729d3b0f22 100644 --- a/projects/rocprofiler/src/core/rocprofiler.cpp +++ b/projects/rocprofiler/src/core/rocprofiler.cpp @@ -219,6 +219,7 @@ uint32_t LoadTool() { if (settings.k_concurrent) { Context::k_concurrent_ = settings.k_concurrent; InterceptQueue::k_concurrent_ = settings.k_concurrent; + InterceptQueue::TrackerOn(true); } if (settings.opt_mode) InterceptQueue::opt_mode_ = true; } diff --git a/projects/rocprofiler/test/tool/tool.cpp b/projects/rocprofiler/test/tool/tool.cpp index 1ee5850612..6cb184166f 100644 --- a/projects/rocprofiler/test/tool/tool.cpp +++ b/projects/rocprofiler/test/tool/tool.cpp @@ -1478,9 +1478,9 @@ extern "C" PUBLIC_API void OnLoadToolProp(rocprofiler_settings_t* settings) } else { // Adding dispatch observer rocprofiler_queue_callbacks_t callbacks_ptrs{0}; - if (settings->k_concurrent != 0) { + if (settings->k_concurrent == 2) { // concurrent trace callbacks_ptrs.dispatch = dispatch_callback_con; - } else { + } else { // pmc callbacks_ptrs.dispatch = dispatch_callback; } callbacks_ptrs.destroy = destroy_callback;