From 45e969f0c393a78f1cc3360ba5a72c2c05f7df5a Mon Sep 17 00:00:00 2001 From: "systems-assistant[bot]" <221163467+systems-assistant[bot]@users.noreply.github.com> Date: Tue, 2 Sep 2025 09:49:12 -0700 Subject: [PATCH] rocprofv3-avail minor scrip fix (#172) * rocprofv3-avail scrip fix * addressing feedback * formatting * rocprofv3 and rocprofv3-avail to display help when no args are provided --------- Co-authored-by: gobhardw --- projects/rocprofiler-sdk/source/bin/rocprofv3-avail.py | 5 +++++ projects/rocprofiler-sdk/source/bin/rocprofv3.py | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/projects/rocprofiler-sdk/source/bin/rocprofv3-avail.py b/projects/rocprofiler-sdk/source/bin/rocprofv3-avail.py index f0932a9fa7..9e3da6694d 100755 --- a/projects/rocprofiler-sdk/source/bin/rocprofv3-avail.py +++ b/projects/rocprofiler-sdk/source/bin/rocprofv3-avail.py @@ -458,6 +458,11 @@ def process_pmc_check(args): def main(argv=None): + # If no arguments provided, show help and exit + if (argv is None and len(sys.argv) == 1) or (argv is not None and len(argv) == 0): + parse_arguments(["--help"]) + return 0 + ROCPROFV3_AVAIL_DIR = os.path.dirname(os.path.realpath(__file__)) ROCM_DIR = os.path.dirname(ROCPROFV3_AVAIL_DIR) ROCPROF_LIST_AVAIL_TOOL_LIBRARY = ( diff --git a/projects/rocprofiler-sdk/source/bin/rocprofv3.py b/projects/rocprofiler-sdk/source/bin/rocprofv3.py index 0cb7fecacf..9aec5fb775 100755 --- a/projects/rocprofiler-sdk/source/bin/rocprofv3.py +++ b/projects/rocprofiler-sdk/source/bin/rocprofv3.py @@ -1662,6 +1662,11 @@ def main(argv=None): print(f" {key:>16}: {itr}") return 0 + # If no arguments provided, show help and exit + if (argv is None and len(sys.argv) == 1) or (argv is not None and len(argv) == 0): + parse_arguments(["--help"]) + return 0 + inp_args = ( parse_input(cmd_args.input) if getattr(cmd_args, "input") else [dotdict({})] )