Skip to content

Commit

Permalink
sort config.yaml in sub directory
Browse files Browse the repository at this point in the history
  • Loading branch information
XiangBin-gh authored and Jeffwhen committed Feb 16, 2023
1 parent 8fcd625 commit 5eb7e4c
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions python/tpu_perf/buildtree.py
Original file line number Diff line number Diff line change
Expand Up @@ -184,13 +184,17 @@ def read_dir(self, path):
context = self.expand_all_variables(
dict(home=p), context, shallow=True, no_except=True)
break
fnlist=[]
for fn in os.listdir(path):
if not fn.endswith('config.yaml'):
continue
fn = os.path.join(path, fn)
if not os.path.isfile(fn):
fnlist.append(fn)
fnlist.sort()
for cf in fnlist:
if not os.path.isfile(cf):
continue
for ret in self._read_dir(fn, context):
for ret in self._read_dir(cf, context):
yield ret

def hash_name(self, config):
Expand Down

0 comments on commit 5eb7e4c

Please sign in to comment.