File tree Expand file tree Collapse file tree 1 file changed +2
-4
lines changed
python/paddle/fluid/tests/unittests/xpu Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Original file line number Diff line number Diff line change 2424paddle .enable_static ()
2525
2626
27- @unittest .skipIf (not paddle .is_compiled_with_xpu (),
28- "core is not compiled with XPU" )
2927class TestLabelSmoothOp (XPUOpTest ):
3028 def config (self ):
3129 self .op_type = "label_smooth"
@@ -45,14 +43,14 @@ def setUp(self):
4543 self .outputs = {'Out' : smoothed_label }
4644
4745 def test_check_output (self ):
46+ if not paddle .is_compiled_with_xpu ():
47+ return
4848 self .check_output_with_place (paddle .XPUPlace (0 ), atol = 1e-6 )
4949
5050 def test_check_grad (self ):
5151 return
5252
5353
54- @unittest .skipIf (not paddle .is_compiled_with_xpu (),
55- "core is not compiled with XPU" )
5654class TestLabelSmoothOp3D (TestLabelSmoothOp ):
5755 def setUp (self ):
5856 super (TestLabelSmoothOp3D , self ).setUp ()
You can’t perform that action at this time.
0 commit comments