Bulk fetch metrics from rocm_smi_lib
The RDC provides a wrapper to bulk fetch metrics from rocm_smi_lib. If the video card does not support bulk fetch or the metrics cannot be bulk fetched, it will fallback to fetch them one by one. Change-Id: I8852ba1ed67e0fabc805c93b1080f74c233516e1
이 커밋은 다음에 포함됨:
1 부모
ceb562d630
커밋
51efe26442
5 파일이 변경됨
+116
-2
검색과 일치하는 파일 없음
@@ -23,7 +23,9 @@ THE SOFTWARE.
|
||||
#define INCLUDE_RDC_LIB_RDCMETRICFETCHER_H_
|
||||
|
||||
#include <memory>
|
||||
#include <vector>
|
||||
#include "rdc_lib/rdc_common.h"
|
||||
#include "rdc_lib/RdcTelemetryLibInterface.h"
|
||||
#include "rdc/rdc.h"
|
||||
|
||||
|
||||
@@ -37,6 +39,10 @@ class RdcMetricFetcher {
|
||||
|
||||
virtual rdc_status_t fetch_smi_field(uint32_t gpu_index,
|
||||
rdc_field_t field_id, rdc_field_value* value) = 0;
|
||||
|
||||
virtual rdc_status_t bulk_fetch_smi_fields(
|
||||
rdc_gpu_field_t* fields, uint32_t fields_count,
|
||||
std::vector<rdc_gpu_field_value_t>& results) = 0; // NOLINT
|
||||
virtual ~RdcMetricFetcher() {}
|
||||
};
|
||||
|
||||
|
||||
@@ -70,6 +70,9 @@ class RdcMetricFetcherImpl: public RdcMetricFetcher {
|
||||
public:
|
||||
rdc_status_t fetch_smi_field(uint32_t gpu_index,
|
||||
rdc_field_t field_id, rdc_field_value* value) override;
|
||||
rdc_status_t bulk_fetch_smi_fields(
|
||||
rdc_gpu_field_t* fields, uint32_t fields_count,
|
||||
std::vector<rdc_gpu_field_value_t>& results) override; // NOLINT
|
||||
RdcMetricFetcherImpl();
|
||||
~RdcMetricFetcherImpl();
|
||||
|
||||
|
||||
새 이슈에서 참조
사용자 차단