未验证 提交 9b35f035 编写于 作者: H houj04 提交者: GitHub

[XPU] fix typo in unit tests. (#45081)

上级 7812522c
...@@ -245,13 +245,13 @@ def create_test_class(func_globals, ...@@ -245,13 +245,13 @@ def create_test_class(func_globals,
test_class, test_class,
test_type, test_type,
test_grad=True, test_grad=True,
ignore_deivce_version=[], ignore_device_version=[],
test_deivce_version=[]): test_device_version=[]):
xpu_version = core.get_xpu_device_version(0) xpu_version = core.get_xpu_device_version(0)
if xpu_version in ignore_deivce_version: if xpu_version in ignore_device_version:
return 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 return
test_class_obj = test_class() test_class_obj = test_class()
......
...@@ -532,7 +532,7 @@ for stype in ['float32']: ...@@ -532,7 +532,7 @@ for stype in ['float32']:
create_test_class(globals(), create_test_class(globals(),
XPUTestConv2DOp_NHWC, XPUTestConv2DOp_NHWC,
stype, stype,
ignore_deivce_version=[core.XPUVersion.XPU1]) ignore_device_version=[core.XPUVersion.XPU1])
#---------- test SAME VALID ----------- #---------- test SAME VALID -----------
#create_test_padding_SAME_class(TestConv2DOp_AsyPadding) #create_test_padding_SAME_class(TestConv2DOp_AsyPadding)
......
...@@ -266,7 +266,7 @@ for stype in support_types: ...@@ -266,7 +266,7 @@ for stype in support_types:
create_test_class(globals(), create_test_class(globals(),
XPUTestResNetBasicBlockOp, XPUTestResNetBasicBlockOp,
stype, stype,
ignore_deivce_version=[core.XPUVersion.XPU1]) ignore_device_version=[core.XPUVersion.XPU1])
if __name__ == '__main__': if __name__ == '__main__':
unittest.main() unittest.main()
...@@ -549,7 +549,7 @@ for stype in support_types: ...@@ -549,7 +549,7 @@ for stype in support_types:
XPUGenerateProposalsV2Op, XPUGenerateProposalsV2Op,
stype, stype,
test_grad=False, test_grad=False,
ignore_deivce_version=[core.XPUVersion.XPU1]) ignore_device_version=[core.XPUVersion.XPU1])
if __name__ == '__main__': if __name__ == '__main__':
unittest.main() unittest.main()
...@@ -301,7 +301,7 @@ for stype in support_types: ...@@ -301,7 +301,7 @@ for stype in support_types:
create_test_class(globals(), create_test_class(globals(),
XPUTestHuberLossOp, XPUTestHuberLossOp,
stype, stype,
ignore_deivce_version=[core.XPUVersion.XPU1]) ignore_device_version=[core.XPUVersion.XPU1])
if __name__ == '__main__': if __name__ == '__main__':
unittest.main() unittest.main()
...@@ -207,7 +207,7 @@ for stype in support_types: ...@@ -207,7 +207,7 @@ for stype in support_types:
create_test_class(globals(), create_test_class(globals(),
XPUTestRNNOp, XPUTestRNNOp,
stype, stype,
ignore_deivce_version=[core.XPUVersion.XPU1]) ignore_device_version=[core.XPUVersion.XPU1])
if __name__ == '__main__': if __name__ == '__main__':
unittest.main() unittest.main()
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册