Skip to content

Commit

Permalink
Fix stack size issue for ssd test
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinthesun committed Jun 11, 2020
1 parent 0644343 commit 21b662e
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions tests/python/frontend/tensorflow/test_forward.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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(
Expand Down Expand Up @@ -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
# -----------
Expand Down Expand Up @@ -3613,7 +3622,6 @@ def test_forward_spop():
# Main
# ----
if __name__ == '__main__':

# Transforms
test_forward_slice()
test_forward_transpose()
Expand Down

0 comments on commit 21b662e

Please sign in to comment.