Skip to content

Commit

Permalink
Revert "[Dy2St][2.6] Increase test_transformer and `test_mobile_net…
Browse files Browse the repository at this point in the history
…` ut time (PaddlePaddle#60829) (PaddlePaddle#60875)"

This reverts commit d788e9b.
  • Loading branch information
hanhaowen-mt committed May 13, 2024
1 parent e292842 commit 7aad721
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
5 changes: 2 additions & 3 deletions test/dygraph_to_static/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ 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})
Expand All @@ -41,6 +40,7 @@ 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)
Expand All @@ -53,14 +53,13 @@ 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
Expand Down
11 changes: 7 additions & 4 deletions test/dygraph_to_static/test_mobile_net.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,7 @@
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
Expand Down Expand Up @@ -738,6 +735,12 @@ 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")
Expand Down

0 comments on commit 7aad721

Please sign in to comment.