Finalize the rocprofiler fields
Change-Id: I4ed1c4309f21bdcc7281d911663036caf5947182 Signed-off-by: Galantsev, Dmitrii <dmitrii.galantsev@amd.com>
Этот коммит содержится в:
+14
-14
@@ -150,7 +150,7 @@ typedef enum {
|
||||
RDC_FI_GPU_COUNT = 1, //!< GPU count in the system
|
||||
RDC_FI_DEV_NAME, //!< Name of the device
|
||||
|
||||
/*
|
||||
/**
|
||||
* @brief Frequency related fields
|
||||
*/
|
||||
RDC_FI_GPU_CLOCK = 100, //!< The current clock for the GPU
|
||||
@@ -163,7 +163,7 @@ typedef enum {
|
||||
RDC_FI_GPU_TEMP, //!< Current temperature for the device
|
||||
RDC_FI_POWER_USAGE = 300, //!< Power usage for the device
|
||||
|
||||
/*
|
||||
/**
|
||||
* @brief PCIe related fields
|
||||
*/
|
||||
RDC_FI_PCIE_TX = 400, //!< PCIe Tx utilization information
|
||||
@@ -172,7 +172,7 @@ typedef enum {
|
||||
// The RDC_FI_PCIE_BANDWIDTH should be used
|
||||
RDC_FI_PCIE_BANDWIDTH, //!< PCIe bandwidth in GB/sec
|
||||
|
||||
/*
|
||||
/**
|
||||
* @brief GPU usage related fields
|
||||
*/
|
||||
RDC_FI_GPU_UTIL = 500, //!< GPU Utilization
|
||||
@@ -250,21 +250,21 @@ typedef enum {
|
||||
/**
|
||||
* @brief ROC-profiler related fields
|
||||
*/
|
||||
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_CU_OCCUPANCY = 800,
|
||||
RDC_FI_PROF_MEAN_OCCUPANCY_PER_CU,
|
||||
RDC_FI_PROF_MEAN_OCCUPANCY_PER_ACTIVE_CU,
|
||||
RDC_FI_PROF_ACTIVE_CYCLES,
|
||||
RDC_FI_PROF_ACTIVE_WAVES,
|
||||
RDC_FI_PROF_ELAPSED_CYCLES,
|
||||
RDC_FI_PROF_FETCH_SIZE,
|
||||
RDC_FI_PROF_WRITE_SIZE,
|
||||
RDC_FI_PROF_GRBM_COUNT,
|
||||
RDC_FI_PROF_SQ_WAVES,
|
||||
RDC_FI_PROF_TA_BUSY_AVR,
|
||||
|
||||
/*
|
||||
// metrics below are divided by time passed
|
||||
RDC_FI_PROF_EVAL_MEM_R_BW,
|
||||
RDC_FI_PROF_EVAL_MEM_W_BW,
|
||||
RDC_FI_PROF_EVAL_FLOPS_16,
|
||||
RDC_FI_PROF_EVAL_FLOPS_32,
|
||||
RDC_FI_PROF_EVAL_FLOPS_64,
|
||||
|
||||
/**
|
||||
* @brief Raw XGMI counter events
|
||||
*/
|
||||
RDC_EVNT_XGMI_0_NOP_TX = 1000, //!< NOPs sent to neighbor 0
|
||||
|
||||
@@ -24,8 +24,10 @@ THE SOFTWARE.
|
||||
#define RDC_MODULES_RDC_ROCP_RDCROCPBASE_H_
|
||||
#include <rocprofiler/rocprofiler.h>
|
||||
|
||||
#include <chrono>
|
||||
#include <cstdint>
|
||||
#include <map>
|
||||
#include <unordered_set>
|
||||
#include <vector>
|
||||
|
||||
#include "rdc/rdc.h"
|
||||
@@ -69,12 +71,17 @@ class RdcRocpBase {
|
||||
std::map<const char*, double> metric_to_value = {};
|
||||
// array of features for each device
|
||||
std::map<uint32_t, rocprofiler_feature_t> feature;
|
||||
// rocprofiler_feature_t features[dev_count][features_count] = {};
|
||||
void read_feature(rocprofiler_t* context, const unsigned feature_count);
|
||||
void read_feature(rocprofiler_t* context, const unsigned feature_count, uint32_t gpu_index);
|
||||
int run_profiler(uint32_t gpu_index, rdc_field_t field);
|
||||
std::vector<hsa_queue_t*> queues;
|
||||
hsa_agent_arr_t agent_arr = {};
|
||||
std::map<rdc_field_t, const char*> field_to_metric = {};
|
||||
// these fields must be divided by time passed
|
||||
std::unordered_set<rdc_field_t> eval_fields = {
|
||||
RDC_FI_PROF_EVAL_MEM_R_BW, RDC_FI_PROF_EVAL_MEM_W_BW, RDC_FI_PROF_EVAL_FLOPS_16,
|
||||
RDC_FI_PROF_EVAL_FLOPS_32, RDC_FI_PROF_EVAL_FLOPS_64,
|
||||
};
|
||||
std::chrono::time_point<std::chrono::system_clock, std::chrono::nanoseconds> start_time;
|
||||
|
||||
/**
|
||||
* @brief Convert from rocmtools status into RDC status
|
||||
|
||||
Ссылка в новой задаче
Block a user