Skip to content

Commit a0365a3

Browse files
committed
fix
1 parent 3410f75 commit a0365a3

3 files changed

Lines changed: 8 additions & 8 deletions

File tree

test/dygraph_to_static/test_build_strategy.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,10 +77,10 @@ def test_resnet(self):
7777
self.verify_predict()
7878

7979
@test_default_mode_only
80-
def test_in_static_mode_onednn(self):
80+
def test_in_static_mode_mkldnn(self):
8181
paddle.set_flags({'FLAGS_use_onednn': True})
8282
try:
83-
if paddle.base.core.is_compiled_with_onednn():
83+
if paddle.base.core.is_compiled_with_mkldnn():
8484
self.resnet_helper.train(True, self.build_strategy)
8585
finally:
8686
paddle.set_flags({'FLAGS_use_onednn': False})

test/dygraph_to_static/test_mnist.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -173,18 +173,18 @@ def test_mnist_to_static(self):
173173
)
174174

175175
@test_default_mode_only
176-
def test_mnist_declarative_cpu_vs_onednn(self):
176+
def test_mnist_declarative_cpu_vs_mkldnn(self):
177177
dygraph_loss_cpu = self.train_dygraph()
178178
paddle.set_flags({'FLAGS_use_onednn': True})
179179
try:
180-
dygraph_loss_onednn = self.train_dygraph()
180+
dygraph_loss_mkldnn = self.train_dygraph()
181181
finally:
182182
paddle.set_flags({'FLAGS_use_onednn': False})
183183
np.testing.assert_allclose(
184184
dygraph_loss_cpu,
185-
dygraph_loss_onednn,
185+
dygraph_loss_mkldnn,
186186
rtol=1e-05,
187-
err_msg=f'cpu dygraph is {dygraph_loss_cpu}\n onednn dygraph is \n{dygraph_loss_onednn}',
187+
err_msg=f'cpu dygraph is {dygraph_loss_cpu}\n mkldnn dygraph is \n{dygraph_loss_mkldnn}',
188188
)
189189

190190
def train(self, to_static=False):

test/dygraph_to_static/test_resnet.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -474,10 +474,10 @@ def test_resnet_composite(self):
474474
)
475475

476476
@test_default_mode_only
477-
def test_in_static_mode_onednn(self):
477+
def test_in_static_mode_mkldnn(self):
478478
paddle.set_flags({'FLAGS_use_onednn': True})
479479
try:
480-
if paddle.base.core.is_compiled_with_onednn():
480+
if paddle.base.core.is_compiled_with_mkldnn():
481481
self.train(to_static=True)
482482
finally:
483483
paddle.set_flags({'FLAGS_use_onednn': False})

0 commit comments

Comments
 (0)