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({})] )