Add options for --specs and --specs-correction

Co-authored-by: fei.zheng <fei.zheng@amd.com>
Signed-off-by: coleramos425 <colramos@amd.com>


[ROCm/rocprofiler-compute commit: 224d627438]
Dieser Commit ist enthalten in:
coleramos425
2024-01-15 12:24:28 -06:00
committet von Cole Ramos
Ursprung 035c6ec7a3
Commit a75180dbd2
2 geänderte Dateien mit 12 neuen und 0 gelöschten Zeilen
@@ -43,6 +43,7 @@ def omniarg_parser(parser, omniperf_home, supported_archs, omniperf_version):
parser._positionals.title = "Modes"
parser._optionals.title = "Help"
general_group.add_argument("-v", "--version", action="version", version=omniperf_version["ver_pretty"])
general_group.add_argument("-s", "--specs", action="store_true", help="Print system specs.")
subparsers = parser.add_subparsers(
dest="mode", help="Select mode of interaction with the target application:"
@@ -286,6 +287,7 @@ def omniarg_parser(parser, omniperf_home, supported_archs, omniperf_version):
general_group.add_argument(
"-V", "--verbose", help="Increase output verbosity", action="count", default=0
)
general_group.add_argument("-s", "--specs", action="store_true", help="Print system specs.")
interaction_group.add_argument(
"-i",
@@ -376,6 +378,7 @@ def omniarg_parser(parser, omniperf_home, supported_archs, omniperf_version):
general_group.add_argument(
"-V", "--verbose", help="Increase output verbosity", action="count", default=0
)
general_group.add_argument("-s", "--specs", action="store_true", help="Print system specs.")
analyze_group.add_argument(
"-p",
@@ -519,4 +522,10 @@ def omniarg_parser(parser, omniperf_home, supported_archs, omniperf_version):
)
analyze_advanced_group.add_argument(
"--report-diff", default=0, nargs="?", type=int, help=argparse.SUPPRESS
)
analyze_advanced_group.add_argument(
"--specs-correction",
type=str,
metavar="",
help="\t\tSpecify the specs to correct."
)
@@ -177,6 +177,9 @@ class Omniperf:
omniarg_parser(parser, config.omniperf_home, self.__supported_archs ,self.__version)
self.__args = parser.parse_args()
if self.__args.specs:
print(get_machine_specs(0))
sys.exit(0)
if self.__args.mode == None:
parser.print_help(sys.stderr)
error("Omniperf requires a valid mode.")