Implement the stats subsystem in rdci

Add support for the stats subsystem in rdci
Modify the dmon system to handle the case when no GPUs in a group

Change-Id: I5a18e1201d24b5318b8e324a77551a757b108f25


[ROCm/rdc commit: 096dc2dadb]
이 커밋은 다음에 포함됨:
Bill(Shuzhou) Liu
2020-04-21 09:48:14 -04:00
커밋한 사람 Chris Freehill
부모 819c4febca
커밋 39f3d3af8a
7개의 변경된 파일과 369개의 추가작업 그리고 5개의 파일을 삭제
+22 -2
파일 보기
@@ -309,12 +309,32 @@ void RdciDmonSubSystem::process() {
result = rdc_group_gpu_get_info(rdc_handle_,
options_[OPTIONS_GROUP_ID], &group_info);
if (result != RDC_ST_OK) {
throw RdcException(result, rdc_status_string(result));
std::string error_msg = rdc_status_string(result);
if (result == RDC_ST_NOT_FOUND) {
error_msg = "Cannot find the group " +
std::to_string(options_[OPTIONS_GROUP_ID]);
}
throw RdcException(result, error_msg.c_str());
}
if (group_info.count == 0) {
throw RdcException(RDC_ST_NOT_FOUND, "The gpu group " +
std::to_string(options_[OPTIONS_GROUP_ID])
+ " must contain at least 1 GPU.");
}
result = rdc_group_field_get_info(rdc_handle_,
options_[OPTIONS_FIELD_GROUP_ID], &field_info);
if (result != RDC_ST_OK) {
throw RdcException(result, rdc_status_string(result));
std::string error_msg = rdc_status_string(result);
if (result == RDC_ST_NOT_FOUND) {
error_msg = "Cannot find the field group " +
std::to_string(options_[OPTIONS_FIELD_GROUP_ID]);
}
throw RdcException(result, error_msg.c_str());
}
if (field_info.count == 0) {
throw RdcException(RDC_ST_NOT_FOUND, "The field group " +
std::to_string(options_[OPTIONS_FIELD_GROUP_ID])
+ " must contain at least 1 field.");
}
// keep extra 1 minute data