Skip to content

Commit

Permalink
Validate that deepsparse.benchmark has recorded samples (#275)
Browse files Browse the repository at this point in the history
* Validate that deepsparse.benchmark has recorded samples

* quality
  • Loading branch information
mgoin authored Mar 1, 2022
1 parent 3d0d5a0 commit 16c00dd
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/deepsparse/benchmark_model/stream_benchmark.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,11 @@ def model_stream_benchmark(
else:
raise Exception(f"Unknown scenario '{scenario}'")

if len(batch_times) == 0:
raise Exception(
"Generated no batch timings, try extending benchmark time with '--time'"
)

# Convert times to milliseconds
batch_times_ms = [
(batch_time[1] - batch_time[0]) * 1000 for batch_time in batch_times
Expand Down

0 comments on commit 16c00dd

Please sign in to comment.