diff --git a/projects/rocprofiler/src/core/context.h b/projects/rocprofiler/src/core/context.h index 34e3835632..b66b1584a6 100644 --- a/projects/rocprofiler/src/core/context.h +++ b/projects/rocprofiler/src/core/context.h @@ -436,7 +436,8 @@ class Context { if (kind == ROCPROFILER_FEATURE_KIND_METRIC) { // Processing metrics features const Metric* metric = metrics_->Get(name); if (metric == NULL) - EXC_RAISING(HSA_STATUS_ERROR, "input metric '" << name << "' is not found"); + EXC_RAISING(HSA_STATUS_ERROR, "input metric '" << name << "' is not supported on this hardware: " + << agent_info_->name); #if 0 std::cout << " " << name << (metric->GetExpr() ? " = " + metric->GetExpr()->String() : " counter") << std::endl; #endif diff --git a/projects/rocprofiler/src/core/counters/metrics/eval_metrics.cpp b/projects/rocprofiler/src/core/counters/metrics/eval_metrics.cpp index 3ef0353fde..bbe39d61c6 100644 --- a/projects/rocprofiler/src/core/counters/metrics/eval_metrics.cpp +++ b/projects/rocprofiler/src/core/counters/metrics/eval_metrics.cpp @@ -1,6 +1,6 @@ #include "eval_metrics.h" #include "src/utils/helper.h" - +#include "src/core/hsa/hsa_common.h" #include using namespace rocmtools; @@ -92,7 +92,12 @@ bool metrics::ExtractMetricEvents( // TODO: saurabh // const Metric* metric = metrics_dict->GetMetricByName(metric_names[i]); const Metric* metric = metrics_dict->Get(metric_names[i]); - if (metric == nullptr) fatal("input metric'%s' not found", metric_names[i].c_str()); + if (metric == nullptr) { + Agent::AgentInfo& agentInfo = rocmtools::hsa_support::GetAgentInfo(gpu_agent.handle); + fatal("input metric'%s' not supported on this hardware: %s ", metric_names[i].c_str(), + agentInfo.getName().data()); + + } // adding result object for derived metric std::lock_guard lock(extract_metric_events_lock);