From 21b662e2fcf0ddc9f4a610b5795080d3566507e1 Mon Sep 17 00:00:00 2001 From: Wang Yao Date: Wed, 10 Jun 2020 13:44:36 -0700 Subject: [PATCH] Fix stack size issue for ssd test --- tests/python/frontend/tensorflow/test_forward.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/tests/python/frontend/tensorflow/test_forward.py b/tests/python/frontend/tensorflow/test_forward.py index 1733bba904f3c..52c13d8e0170d 100644 --- a/tests/python/frontend/tensorflow/test_forward.py +++ b/tests/python/frontend/tensorflow/test_forward.py @@ -21,6 +21,7 @@ This article is a test script to test tensorflow operator with Relay. """ from __future__ import print_function +import threading import numpy as np import pytest try: @@ -2292,7 +2293,7 @@ def test_forward_resnetv2(): # --- -def test_forward_ssd(): +def _test_ssd_impl(): '''Test SSD with backbone MobileNet V1''' with tf.Graph().as_default(): graph_def = tf_testing.get_workload( @@ -2321,6 +2322,14 @@ def test_forward_ssd(): tvm.testing.assert_allclose(tvm_output[i], tf_output[i], rtol=1e-3, atol=1e-3) +def test_forward_ssd(): + run_thread = threading.Thread(target=_test_ssd_impl, args=()) + old_stack_size = threading.stack_size(100 * 1024 * 1024) + run_thread.start() + run_thread.join() + threading.stack_size(old_stack_size) + + ####################################################################### # Placeholder # ----------- @@ -3613,7 +3622,6 @@ def test_forward_spop(): # Main # ---- if __name__ == '__main__': - # Transforms test_forward_slice() test_forward_transpose()