File tree Expand file tree Collapse file tree 2 files changed +3
-5
lines changed
python/paddle/fluid/tests/unittests/xpu Expand file tree Collapse file tree 2 files changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -60,8 +60,7 @@ def init_dtype(self):
6060 pass
6161
6262 def test_check_output_with_place (self ):
63- self .check_output_with_place (
64- paddle .XPUPlace (int (os .getenv ("FLAGS_selected_xpus" , 0 ))))
63+ self .check_output_with_place (paddle .XPUPlace (0 ))
6564
6665
6766if __name__ == "__main__" :
Original file line number Diff line number Diff line change @@ -42,8 +42,7 @@ def conf(self):
4242 self .w = 105
4343
4444 def test_check_output_with_place (self ):
45- self .check_output_with_place (
46- paddle .XPUPlace (int (os .getenv ("FLAGS_selected_xpus" , 0 ))))
45+ self .check_output_with_place (paddle .XPUPlace (0 ))
4746
4847
4948class TestSGDOpCase8X (TestSGDOp ):
@@ -65,7 +64,7 @@ def runTest(self):
6564 sgd_optimizer = fluid .optimizer .SGD (learning_rate = 0.001 )
6665 sgd_optimizer .minimize (avg_cost )
6766
68- place = paddle .XPUPlace (int ( os . getenv ( "FLAGS_selected_xpus" , 0 )) )
67+ place = paddle .XPUPlace (0 )
6968 exe = fluid .Executor (place )
7069 exe .run (fluid .default_startup_program ())
7170 result = exe .run (fluid .default_main_program (), fetch_list = [avg_cost ])
You can’t perform that action at this time.
0 commit comments