From 816f7a850f2df332d1c7bf0e05dc2c67d35c35ce Mon Sep 17 00:00:00 2001 From: "Pryor, Adam" Date: Tue, 15 Jul 2025 16:03:28 -0500 Subject: [PATCH] [SWDEV-379269] Add all gpus as default to dmon (#211) Change-Id: Idb17e9018c39479830a4366f2002d02725d66873 Signed-off-by: adapryor --- rdci/src/RdciDmonSubSystem.cc | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/rdci/src/RdciDmonSubSystem.cc b/rdci/src/RdciDmonSubSystem.cc index f47f1141ba..0cb9d10814 100644 --- a/rdci/src/RdciDmonSubSystem.cc +++ b/rdci/src/RdciDmonSubSystem.cc @@ -181,13 +181,6 @@ void RdciDmonSubSystem::parse_cmd_opts(int argc, char** argv) { } } - if (options_.find(OPTIONS_GROUP_ID) == options_.end()) { - if (gpu_indexes == "") { - show_help(); - throw RdcException(RDC_ST_BAD_PARAMETER, "Need to specify the GPUs or group id"); - } - } - // Group and GPU index cannot co-exist if (gpu_indexes != "" && options_.find(OPTIONS_GROUP_ID) != options_.end()) { show_help(); @@ -321,6 +314,12 @@ void RdciDmonSubSystem::resolve_gpu_indexes() { throw RdcException(res, "Failed to get all devices"); } + // If neither group or gpu_index was specified, default to all + if (raw_gpu_indexes_.empty()) { + gpu_indexes_.assign(device_list, device_list + count); + return; + } + std::vector vec_ids = split_string(raw_gpu_indexes_, ','); for (uint32_t i = 0; i < vec_ids.size(); i++) { if (rdc_is_partition_string(vec_ids[i].c_str())) {