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 编写, Chris Freehill 于 2020-08-17 14:07:25 -05:00 提交
1 父节点 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