Skip to content

Commit

Permalink
Fix test_resnet and test_resnet_v2 ut (#55723)
Browse files Browse the repository at this point in the history
* Fix test_resnet and test_resnet_v2 ut

* Remove ut
  • Loading branch information
0x45f authored Jul 28, 2023
1 parent d608170 commit 9556bea
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 16 deletions.
4 changes: 2 additions & 2 deletions test/dygraph_to_static/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,9 @@ set_tests_properties(test_bmn PROPERTIES TIMEOUT 120)
set_tests_properties(test_build_strategy PROPERTIES TIMEOUT 120)

if(NOT WIN32)
set_tests_properties(test_resnet_v2 PROPERTIES TIMEOUT 120)
set_tests_properties(test_resnet_v2 PROPERTIES TIMEOUT 180)
set_tests_properties(test_tsm PROPERTIES TIMEOUT 900)
#set_tests_properties(test_resnet PROPERTIES TIMEOUT 120)
set_tests_properties(test_resnet PROPERTIES TIMEOUT 240)
endif()

if(APPLE)
Expand Down
14 changes: 0 additions & 14 deletions test/dygraph_to_static/test_resnet.py
Original file line number Diff line number Diff line change
Expand Up @@ -426,20 +426,6 @@ def test_resnet(self):
)
self.verify_predict()

def test_resnet_composite_backward(self):
core._set_prim_backward_enabled(True)
static_loss = self.train(to_static=True)
core._set_prim_backward_enabled(False)
dygraph_loss = self.train(to_static=True)
np.testing.assert_allclose(
static_loss,
dygraph_loss,
rtol=1e-05,
err_msg='static_loss: {} \n dygraph_loss: {}'.format(
static_loss, dygraph_loss
),
)

def test_resnet_composite_forward_backward(self):
core._set_prim_all_enabled(True)
static_loss = self.train(to_static=True)
Expand Down

0 comments on commit 9556bea

Please sign in to comment.