File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -334,13 +334,13 @@ def test_device_context_manager(self):
334
334
self .assertEqual (torch .xpu .current_device (), prev_device )
335
335
336
336
@unittest .skipIf (not TEST_MULTIXPU , "only one GPU detected" )
337
- def test_device_context_manager_with_set_device (self ):
337
+ def test_multi_device_context_manager (self ):
338
338
src_device = 0
339
339
dst_device = 1
340
340
torch .xpu .set_device (src_device )
341
341
with torch .accelerator .device_index (dst_device ):
342
342
self .assertEqual (torch .xpu .current_device (), 1 )
343
- self .assertEqual (torch .xpu .set_device (), src_device )
343
+ self .assertEqual (torch .xpu .current_device (), src_device )
344
344
345
345
def test_stream_context_manager (self ):
346
346
prev_stream = torch .xpu .current_stream ()
You can’t perform that action at this time.
0 commit comments