Profiler - Add all required metrics
Change-Id: Iea3938df9407789c061c3a6ead9167a69069d6e6 Signed-off-by: Galantsev, Dmitrii <dmitrii.galantsev@amd.com>
This commit is contained in:
+15
-9
@@ -230,13 +230,13 @@ typedef enum {
|
||||
// In new ASCI, such as MI300, the XGMI events is not supported
|
||||
// Using below XGMI related fields to calculate the bandwidth.
|
||||
RDC_FI_XGMI_0_READ_KB = 700, //!< XGMI_0 accumulated data read size (KB)
|
||||
RDC_FI_XGMI_1_READ_KB, //!< XGMI_1 accumulated data read size (KB)
|
||||
RDC_FI_XGMI_2_READ_KB, //!< XGMI_2 accumulated data read size (KB)
|
||||
RDC_FI_XGMI_3_READ_KB, //!< XGMI_3 accumulated data read size (KB)
|
||||
RDC_FI_XGMI_4_READ_KB, //!< XGMI_4 accumulated data read size (KB)
|
||||
RDC_FI_XGMI_5_READ_KB, //!< XGMI_5 accumulated data read size (KB)
|
||||
RDC_FI_XGMI_6_READ_KB, //!< XGMI_6 accumulated data read size (KB)
|
||||
RDC_FI_XGMI_7_READ_KB, //!< XGMI_7 accumulated data read size (KB)
|
||||
RDC_FI_XGMI_1_READ_KB, //!< XGMI_1 accumulated data read size (KB)
|
||||
RDC_FI_XGMI_2_READ_KB, //!< XGMI_2 accumulated data read size (KB)
|
||||
RDC_FI_XGMI_3_READ_KB, //!< XGMI_3 accumulated data read size (KB)
|
||||
RDC_FI_XGMI_4_READ_KB, //!< XGMI_4 accumulated data read size (KB)
|
||||
RDC_FI_XGMI_5_READ_KB, //!< XGMI_5 accumulated data read size (KB)
|
||||
RDC_FI_XGMI_6_READ_KB, //!< XGMI_6 accumulated data read size (KB)
|
||||
RDC_FI_XGMI_7_READ_KB, //!< XGMI_7 accumulated data read size (KB)
|
||||
|
||||
RDC_FI_XGMI_0_WRITE_KB, //!< XGMI_0 accumulated data write size (KB)
|
||||
RDC_FI_XGMI_1_WRITE_KB, //!< XGMI_1 accumulated data write size (KB)
|
||||
@@ -250,8 +250,14 @@ typedef enum {
|
||||
/**
|
||||
* @brief ROC-profiler related fields
|
||||
*/
|
||||
RDC_FI_PROF_GPU_UTIL = 800, //!<
|
||||
RDC_FI_PROF_TA_BUSY_AVR, //!<
|
||||
RDC_FI_PROF_CU_UTILIZATION = 800,
|
||||
RDC_FI_PROF_CU_OCCUPANCY,
|
||||
RDC_FI_PROF_FLOPS_16,
|
||||
RDC_FI_PROF_FLOPS_32,
|
||||
RDC_FI_PROF_FLOPS_64,
|
||||
RDC_FI_PROF_ACTIVE_CYCLES,
|
||||
RDC_FI_PROF_ACTIVE_WAVES,
|
||||
RDC_FI_PROF_ELAPSED_CYCLES,
|
||||
|
||||
/*
|
||||
* @brief Raw XGMI counter events
|
||||
|
||||
@@ -39,17 +39,6 @@ THE SOFTWARE.
|
||||
namespace amd {
|
||||
namespace rdc {
|
||||
|
||||
/**
|
||||
* @brief Map of RDC fields to rocmtools counters
|
||||
*
|
||||
* See metrics.xml in rocmtools for more info.
|
||||
* RDC_CALC fields are calculated over time by RDC.
|
||||
*/
|
||||
static const std::map<rdc_field_t, const char*> counter_map_k = {
|
||||
{RDC_FI_PROF_GPU_UTIL, "GPU_UTIL"},
|
||||
{RDC_FI_PROF_TA_BUSY_AVR, "TA_BUSY_avr"},
|
||||
};
|
||||
|
||||
typedef struct {
|
||||
hsa_agent_t* agents;
|
||||
unsigned count;
|
||||
@@ -79,17 +68,20 @@ class RdcRocpBase {
|
||||
* successfully.
|
||||
*/
|
||||
rdc_status_t rocp_lookup(pair_gpu_field_t gpu_field, double* value);
|
||||
const char* get_field_id_from_name(rdc_field_t);
|
||||
const std::vector<rdc_field_t> get_field_ids();
|
||||
|
||||
protected:
|
||||
private:
|
||||
rocprofiler_t* contexts[dev_count] = {nullptr};
|
||||
static const int features_count = 1;
|
||||
std::map<const char*, double> metrics;
|
||||
rocprofiler_feature_t features[dev_count][features_count];
|
||||
std::map<const char*, double> metrics = {};
|
||||
rocprofiler_feature_t features[dev_count][features_count] = {};
|
||||
void read_features(rocprofiler_t* context, const unsigned feature_count);
|
||||
int run_profiler(const char* feature_name, hsa_queue_t** queues);
|
||||
int run_profiler(const char* feature_name);
|
||||
hsa_queue_t* queues[dev_count] = {nullptr};
|
||||
hsa_agent_arr_t agent_arr;
|
||||
hsa_agent_arr_t agent_arr = {};
|
||||
std::map<rdc_field_t, const char*> counter_map_k = {};
|
||||
|
||||
/**
|
||||
* @brief Convert from rocmtools status into RDC status
|
||||
|
||||
Reference in New Issue
Block a user