From cf3e283d853baa6622c412ab5ffa6b38e249378b Mon Sep 17 00:00:00 2001 From: Adam Pryor <61172547+adam360x@users.noreply.github.com> Date: Wed, 28 Jan 2026 22:12:17 -0600 Subject: [PATCH] [FMDEV-170733] Remove amd-smi ptl set check (#2933) Signed-off-by: Arif, Maisam --- projects/amdsmi/amdsmi_cli/amdsmi_commands.py | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/projects/amdsmi/amdsmi_cli/amdsmi_commands.py b/projects/amdsmi/amdsmi_cli/amdsmi_commands.py index 5806324168..a6873fe79c 100644 --- a/projects/amdsmi/amdsmi_cli/amdsmi_commands.py +++ b/projects/amdsmi/amdsmi_cli/amdsmi_commands.py @@ -5129,13 +5129,9 @@ class AMDSMICommands(): if isinstance(args.ptl_status, int): status_string = "Enabled" if args.ptl_status else "Disabled" result = f"Requested PTL status to {status_string}" # This should not print out - try: - current_state = amdsmi_interface.amdsmi_get_gpu_ptl_state(args.gpu) - if current_state == args.ptl_status: - result = f"PTL state is already {status_string}" - else: - amdsmi_interface.amdsmi_set_gpu_ptl_state(args.gpu, args.ptl_status) - result = f"Successfully set PTL state to {status_string}" + try: # Due to driver requirements, do NOT check current state. Set state regardless of current state. + amdsmi_interface.amdsmi_set_gpu_ptl_state(args.gpu, args.ptl_status) + result = f"Successfully set PTL state to {status_string}" except amdsmi_exception.AmdSmiLibraryException as e: if e.get_error_code() == amdsmi_interface.amdsmi_wrapper.AMDSMI_STATUS_NO_PERM: raise PermissionError('Command requires elevation') from e