From 6278b5413fab1a9c16230c3753939f304bbd2e16 Mon Sep 17 00:00:00 2001 From: Nyakku Shigure Date: Wed, 17 Jan 2024 10:35:46 +0800 Subject: [PATCH] [Dy2St][2.6] Increase `test_transformer` and `test_mobile_net` ut time (#60829) --- test/dygraph_to_static/CMakeLists.txt | 5 +++-- test/dygraph_to_static/test_mobile_net.py | 11 ++++------- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/test/dygraph_to_static/CMakeLists.txt b/test/dygraph_to_static/CMakeLists.txt index a7b3a01ce177d..d9620c0695308 100644 --- a/test/dygraph_to_static/CMakeLists.txt +++ b/test/dygraph_to_static/CMakeLists.txt @@ -31,6 +31,7 @@ if(NOT WITH_GPU) list(REMOVE_ITEM TEST_OPS test_build_strategy) list(REMOVE_ITEM TEST_OPS test_bert) list(REMOVE_ITEM TEST_OPS test_transformer) + list(REMOVE_ITEM TEST_OPS test_mobile_net) endif() foreach(TEST_OP ${TEST_OPS}) @@ -40,7 +41,6 @@ endforeach() set_tests_properties(test_se_resnet PROPERTIES TIMEOUT 900) set_tests_properties(test_yolov3 PROPERTIES TIMEOUT 900 LABELS "RUN_TYPE=EXCLUSIVE") -set_tests_properties(test_mobile_net PROPERTIES TIMEOUT 120) set_tests_properties(test_seq2seq PROPERTIES TIMEOUT 420) set_tests_properties(test_cycle_gan PROPERTIES TIMEOUT 150) set_tests_properties(test_basic_api_transformation PROPERTIES TIMEOUT 240) @@ -53,13 +53,14 @@ endif() if(APPLE) set_tests_properties(test_bmn PROPERTIES TIMEOUT 300) - set_tests_properties(test_mobile_net PROPERTIES TIMEOUT 300) endif() if(WITH_GPU) set_tests_properties(test_train_step_resnet18_sgd PROPERTIES TIMEOUT 240) set_tests_properties(test_train_step_resnet18_adam PROPERTIES TIMEOUT 240) set_tests_properties(test_bert PROPERTIES TIMEOUT 240) + set_tests_properties(test_transformer PROPERTIES TIMEOUT 240) + set_tests_properties(test_mobile_net PROPERTIES TIMEOUT 240) endif() # Legacy IR only tests for dygraph_to_static diff --git a/test/dygraph_to_static/test_mobile_net.py b/test/dygraph_to_static/test_mobile_net.py index 599d863d12c79..44cf791191a8d 100644 --- a/test/dygraph_to_static/test_mobile_net.py +++ b/test/dygraph_to_static/test_mobile_net.py @@ -19,7 +19,10 @@ import unittest import numpy as np -from dygraph_to_static_utils import Dy2StTestBase, test_pt_only +from dygraph_to_static_utils import ( + Dy2StTestBase, + test_pt_only, +) from predictor_utils import PredictorTools import paddle @@ -735,12 +738,6 @@ def assert_same_predict(self, model_name): ) @test_pt_only - def test_mobile_net_pir(self): - # MobileNet-V1 - self.assert_same_loss("MobileNetV1") - # MobileNet-V2 - self.assert_same_loss("MobileNetV2") - def test_mobile_net(self): # MobileNet-V1 self.assert_same_loss("MobileNetV1")