Skip to content

Commit

Permalink
Make test_pipeline_call_is_async check greater than speedup (#1267)
Browse files Browse the repository at this point in the history
* Make `test_pipeline_call_is_async` check greater than speedup

* Update test_pipeline.py
  • Loading branch information
mgoin committed Sep 22, 2023
1 parent b309fa4 commit 37f2dd9
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions tests/deepsparse/pipelines/test_pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@
from concurrent.futures import ThreadPoolExecutor
from unittest import mock

import numpy

import flaky
import pytest
from deepsparse.base_pipeline import BasePipeline
Expand Down Expand Up @@ -159,5 +157,6 @@ def sleep_then_engine_forward(xs, context):
dur_2_worker = (end - start) * 1e3

# instead of doing a hard comparison of timing for each separate
# duration, do relative comparison of timing
assert numpy.allclose(dur_1_worker / dur_2_worker, 2, atol=0.4)
# duration, do relative comparison of timing where it should be
# at least 1.5x faster
assert (dur_1_worker / dur_2_worker) >= 1.5

0 comments on commit 37f2dd9

Please sign in to comment.