From cd325a672da64ada7a0de6fd92d5a2f96603aae6 Mon Sep 17 00:00:00 2001 From: Michael Goin Date: Fri, 22 Sep 2023 09:32:27 -0400 Subject: [PATCH 1/2] Make `test_pipeline_call_is_async` check greater than speedup --- tests/deepsparse/pipelines/test_pipeline.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/deepsparse/pipelines/test_pipeline.py b/tests/deepsparse/pipelines/test_pipeline.py index 958f0ec62f..8adb228354 100644 --- a/tests/deepsparse/pipelines/test_pipeline.py +++ b/tests/deepsparse/pipelines/test_pipeline.py @@ -159,5 +159,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 From fe0abfec7552ab62df978974850315f075e0057e Mon Sep 17 00:00:00 2001 From: Michael Goin Date: Fri, 22 Sep 2023 09:40:42 -0400 Subject: [PATCH 2/2] Update test_pipeline.py --- tests/deepsparse/pipelines/test_pipeline.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/tests/deepsparse/pipelines/test_pipeline.py b/tests/deepsparse/pipelines/test_pipeline.py index 8adb228354..945959c679 100644 --- a/tests/deepsparse/pipelines/test_pipeline.py +++ b/tests/deepsparse/pipelines/test_pipeline.py @@ -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