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: f6b1cb9024]
Esse commit está contido em:
Saitarun Movva
2025-11-01 11:24:24 -04:00
commit de Arif, Maisam
commit b8298bf5b6
+2 -3
Ver Arquivo
@@ -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