Add support to use the field name in rdci
In the rdci dmon and fieldgroup, now the fields can be specified
using either number id or the field name.
When the rdc is async fetching metrics, it will not report that fetch
as an error.
Change-Id: I81331e2c239af987181147be5ac0e29ba1617ab4
[ROCm/rdc commit: d30cb81fdb]
This commit is contained in:
1 bovenliggende
aa0a40f84d
commit
0f8f345992
6 files changed
+60
-12
No files matched your search
@@ -158,10 +158,13 @@ void RdciFieldGroupSubSystem::process() {
|
||||
uint32_t field_ids[RDC_MAX_FIELD_IDS_PER_FIELD_GROUP];
|
||||
for (uint32_t i = 0; i < fields.size(); i++) {
|
||||
if (!IsNumber(fields[i])) {
|
||||
throw RdcException(RDC_ST_BAD_PARAMETER,
|
||||
"The field Id "+fields[i]+" needs to be a number");
|
||||
if (!get_field_id_from_name(fields[i], field_ids[i])) {
|
||||
throw RdcException(RDC_ST_BAD_PARAMETER,
|
||||
"The field name "+fields[i]+" is not valid");
|
||||
}
|
||||
} else {
|
||||
field_ids[i] = std::stoi(fields[i]);
|
||||
}
|
||||
field_ids[i] = std::stoi(fields[i]);
|
||||
}
|
||||
rdc_field_grp_t group_id;
|
||||
result = rdc_group_field_create(rdc_handle_, fields.size(),
|
||||
|
||||
Reference in new issue
Block a user