Skip to content

Commit

Permalink
bench try
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexanderDokuchaev committed Jul 17, 2024
1 parent d73afa0 commit b0264e8
Showing 1 changed file with 12 additions and 8 deletions.
20 changes: 12 additions & 8 deletions tests/post_training/pipelines/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -409,14 +409,18 @@ def run_bench(self) -> None:
"""
if not self.run_benchmark_app:
return
runner = Command(f"benchmark_app -m {self.path_compressed_ir}")
runner.run(stdout=False)
cmd_output = " ".join(runner.output)

match = re.search(r"Throughput\: (.+?) FPS", cmd_output)
if match is not None:
fps = match.group(1)
self.run_info.fps = float(fps)

try:
runner = Command(f"benchmark_app -m {self.path_compressed_ir}")
runner.run(stdout=False)
cmd_output = " ".join(runner.output)

match = re.search(r"Throughput\: (.+?) FPS", cmd_output)
if match is not None:
fps = match.group(1)
self.run_info.fps = float(fps)
except Exception as e:
print(e)

def cleanup_cache(self):
"""
Expand Down

0 comments on commit b0264e8

Please sign in to comment.