Skip to content

Commit

Permalink
Add outdir arg
Browse files Browse the repository at this point in the history
Change-Id: Ibc76668929262abc59afe5b601acf0dff7203bf2
  • Loading branch information
Jeffwhen committed Feb 14, 2023
1 parent 866ea0b commit f89d3c8
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions python/tpu_perf/buildtree.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,10 @@ def __init__(self, root, args = None):
self.root = root
self.global_config = global_config = read_config(root) or dict()
global_config['root'] = root
if 'outdir' not in global_config:
global_config['outdir'] = os.path.join(root, 'output')
outdir = 'output'
if args.outdir:
outdir = args.outdir
global_config['outdir'] = os.path.join(root, outdir)

self.cases = []
if not args.full:
Expand Down Expand Up @@ -73,6 +75,7 @@ def add_arguments(parser):
'models', metavar='MODEL', type=str, nargs='*',
help='model directories to run')
parser.add_argument('--full', action='store_true', help='Run all cases')
parser.add_argument('--outdir', '-o', type=str, help='Output path')
parser.add_argument('--list', '-l', type=str, help='Case list')
parser.add_argument('--devices', '-d',
type=int, nargs='*', help='Devices',
Expand Down

0 comments on commit f89d3c8

Please sign in to comment.