From b8298bf5b627313b3e408aface7692e74d307ca0 Mon Sep 17 00:00:00 2001 From: Saitarun Movva Date: Sat, 1 Nov 2025 11:24:24 -0400 Subject: [PATCH] Fix #132: Python parser not accepting compute partition arguments The argparse 'choices' parameter was receiving a comma-separated string instead of a list, causing it to treat individual characters as valid choices rather than complete tokens like 'SPX', 'DPX', etc. Fixed by removing the unnecessary join() operation in get_accelerator_choices_types_indices() to return the list directly. This matches the pattern used by get_memory_partition_types(). Now 'amd-smi set -C DPX' and other partition commands work correctly. [ROCm/amdsmi commit: f6b1cb9024eab4afb18fedfdb929f3a24a795481] --- projects/amdsmi/amdsmi_cli/amdsmi_helpers.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/projects/amdsmi/amdsmi_cli/amdsmi_helpers.py b/projects/amdsmi/amdsmi_cli/amdsmi_helpers.py index c44deb3bc2..fa103a8d28 100755 --- a/projects/amdsmi/amdsmi_cli/amdsmi_helpers.py +++ b/projects/amdsmi/amdsmi_cli/amdsmi_helpers.py @@ -781,9 +781,8 @@ class AMDSMIHelpers(): logging.debug("AMDSMIHelpers.get_accelerator_choices_types_indices - Root, getting accelerator partition profiles") accelerator_partition_profiles = self.get_accelerator_partition_profile_config() if len(accelerator_partition_profiles['profile_types']) != 0: - compute_partitions_str = accelerator_partition_profiles['profile_types'] + accelerator_partition_profiles['profile_indices'] - accelerator_choices = ", ".join(compute_partitions_str) - return_val = (accelerator_choices, accelerator_partition_profiles) + compute_partitions_list = accelerator_partition_profiles['profile_types'] + accelerator_partition_profiles['profile_indices'] + return_val = (compute_partitions_list, accelerator_partition_profiles) return return_val