2026-01-28 06:16:04 +00:00

48 lines
1.5 KiB
Python

#!/usr/bin/env python3
import argparse
from utils import profile_ip_eval_result
from utils import util
from utils import log
def arg_parse():
parser = argparse.ArgumentParser()
parser.add_argument("platform", help="HW platform <520|720|530|730>")
parser.add_argument(
"base_dir",
help="base directory contains models to compare (520: ip_eval_prof.txt | others: ProfileResult.txt)")
parser.add_argument(
'target_dir',
help='target directory contains models to compare (520: ip_eval_prof.txt | others: ProfileResult.txt)')
parser.add_argument("-a",
"--all",
action="store_true",
default=False,
help="show all models. if not set, only show boost > 0 cases")
parser.add_argument(
"-tf",
action="store_true",
default=False,
help=
'set compared file in target directory to "best_profile_result.txt". this option is only used for optimized compiler.'
)
return parser.parse_args()
if __name__ == '__main__':
# get arguments
args = arg_parse()
platform = args.platform
base_dir = args.base_dir
target_dir = args.target_dir
is_show_all = args.all
set_target_file = args.tf
# create logger
log = log.Log('./__magic_tmp__', True)
ip_prof = profile_ip_eval_result.IpEvalProf(platform, base_dir, target_dir, is_show_all, set_target_file, log)
ip_prof.run()