Skip to content

Commit 6cf058d

Browse files
committed
Fixed print_helper cuda windows addition
Signed-off-by: Gregory Shimansky <[email protected]>
1 parent 2f7de0a commit 6cf058d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

python/test/unit/language/print_helper.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,8 @@ def test_print(func: str, data_type: str, device: str):
140140
func != "print_multiple_args" and func != "device_print_multiple_args" and \
141141
func != "device_print_pointer" and func != "device_print_scalar":
142142
assert_close(y, x)
143-
torch.cuda.synchronize()
143+
if torch.cuda.is_available():
144+
torch.cuda.synchronize()
144145

145146
# Wait until driver complete all the jobs for the device_print, especially test_subprocess
146147
# require this which captures stdout when child exits.

0 commit comments

Comments
 (0)