Skip to content

Commit

Permalink
[XPU] fix typo in unit tests. (#45081)
Browse files Browse the repository at this point in the history
  • Loading branch information
houj04 committed Aug 11, 2022
1 parent 7812522 commit 9b35f03
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 9 deletions.
Expand Up @@ -245,13 +245,13 @@ def create_test_class(func_globals,
test_class,
test_type,
test_grad=True,
ignore_deivce_version=[],
test_deivce_version=[]):
ignore_device_version=[],
test_device_version=[]):
xpu_version = core.get_xpu_device_version(0)
if xpu_version in ignore_deivce_version:
if xpu_version in ignore_device_version:
return

if len(test_deivce_version) != 0 and xpu_version not in test_deivce_version:
if len(test_device_version) != 0 and xpu_version not in test_device_version:
return

test_class_obj = test_class()
Expand Down
Expand Up @@ -532,7 +532,7 @@ def init_test_case_2(self):
create_test_class(globals(),
XPUTestConv2DOp_NHWC,
stype,
ignore_deivce_version=[core.XPUVersion.XPU1])
ignore_device_version=[core.XPUVersion.XPU1])

#---------- test SAME VALID -----------
#create_test_padding_SAME_class(TestConv2DOp_AsyPadding)
Expand Down
Expand Up @@ -266,7 +266,7 @@ def test_out_and_grad(self):
create_test_class(globals(),
XPUTestResNetBasicBlockOp,
stype,
ignore_deivce_version=[core.XPUVersion.XPU1])
ignore_device_version=[core.XPUVersion.XPU1])

if __name__ == '__main__':
unittest.main()
Expand Up @@ -549,7 +549,7 @@ def set_data(self):
XPUGenerateProposalsV2Op,
stype,
test_grad=False,
ignore_deivce_version=[core.XPUVersion.XPU1])
ignore_device_version=[core.XPUVersion.XPU1])

if __name__ == '__main__':
unittest.main()
Expand Up @@ -301,7 +301,7 @@ def set_shape(self):
create_test_class(globals(),
XPUTestHuberLossOp,
stype,
ignore_deivce_version=[core.XPUVersion.XPU1])
ignore_device_version=[core.XPUVersion.XPU1])

if __name__ == '__main__':
unittest.main()
2 changes: 1 addition & 1 deletion python/paddle/fluid/tests/unittests/xpu/test_rnn_op_xpu.py
Expand Up @@ -207,7 +207,7 @@ def set_attrs(self):
create_test_class(globals(),
XPUTestRNNOp,
stype,
ignore_deivce_version=[core.XPUVersion.XPU1])
ignore_device_version=[core.XPUVersion.XPU1])

if __name__ == '__main__':
unittest.main()

1 comment on commit 9b35f03

@luckycookie88
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@houj04 Hi~~hj哥哥,我没找到这个网站的发私信功能,希望你能看见这条留言。我是小饼干{北大新传07级 一起当奥运志愿者 QQ:945406215},好久不见。我给你的foxmail发了邮件。有技术问题请教。方便的话,麻烦回复一下我,谢谢。

Please sign in to comment.