Skip to content

Commit 9a2f043

Browse files
authored
fix get_places on custom device (#74868)
1 parent 55899ba commit 9a2f043

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

test/legacy_test/op_test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -402,7 +402,7 @@ def get_places():
402402
os.environ.get('FLAGS_CI_both_cpu_and_gpu', 'False').lower()
403403
in ['1', 'true', 'on']
404404
or not core.is_compiled_with_cuda()
405-
):
405+
) and not is_custom_device():
406406
places.append(base.CPUPlace())
407407
if core.is_compiled_with_cuda():
408408
places.append(base.CUDAPlace(0))

0 commit comments

Comments
 (0)