SWDEV-374072 : rocprof gpu selector fix
Change-Id: I155e63a5dc1ecbacd76d80b0df76da99b645ed9f
This commit is contained in:
committed by
Ammar ELWazir
orang tua
1f4ea85cab
melakukan
14977e4dc1
@@ -49,6 +49,7 @@ THE SOFTWARE.
|
||||
#include <string>
|
||||
#include <thread>
|
||||
#include <vector>
|
||||
#include <algorithm>
|
||||
|
||||
#include "inc/rocprofiler.h"
|
||||
#include "util/hsa_rsrc_factory.h"
|
||||
@@ -1168,6 +1169,12 @@ extern "C" PUBLIC_API void OnLoadToolProp(rocprofiler_settings_t* settings)
|
||||
// Getting GPU indexes
|
||||
gpu_index_vec = new std::vector<uint32_t>;
|
||||
get_xml_array(xml, "top.metric", "gpu_index", ",", gpu_index_vec, " ");
|
||||
|
||||
// Skipping cpu count to get to correct gpu index
|
||||
const uint32_t cpu_count = HsaRsrcFactory::Instance().GetCountOfCpuAgents();
|
||||
std::transform(gpu_index_vec->begin(), gpu_index_vec->end(),
|
||||
gpu_index_vec->begin(),
|
||||
[&](int count) { return count + cpu_count; });
|
||||
|
||||
// Getting kernel names
|
||||
kernel_string_vec = new std::vector<std::string>;
|
||||
|
||||
Reference in New Issue
Block a user