Skip to content

Commit c2ec15a

Browse files
committed
Nits
1 parent e2d571c commit c2ec15a

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

test/test_image.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -626,10 +626,11 @@ def test_encode_jpeg_cuda(img_path, scripted, contiguous):
626626
@needs_cuda
627627
def test_encode_jpeg_cuda_sync():
628628
"""
629+
Non-regression test for https://github.com/pytorch/vision/issues/8587.
629630
Attempts to reproduce an intermittent CUDA stream synchronization bug
630-
by randomly creating small images and round-tripping them via encode_jpeg
631-
and decode_jpeg on the GPU. Fails if the mean difference in u8 range exceeds 5.0.
632-
https://github.com/pytorch/vision/issues/8587
631+
by randomly creating images and round-tripping them via encode_jpeg
632+
and decode_jpeg on the GPU. Fails if the mean difference in uint8 range
633+
exceeds 5.
633634
"""
634635
torch.manual_seed(42)
635636

@@ -651,7 +652,6 @@ def test_encode_jpeg_cuda_sync():
651652

652653
decoded_image = decode_jpeg(jpeg_bytes.cpu(), device=device)
653654
mean_difference = (image.float() - decoded_image.float()).abs().mean().item()
654-
print(mean_difference)
655655

656656
assert mean_difference <= threshold, (
657657
f"Encode/decode mismatch at iteration={iteration}, "

0 commit comments

Comments
 (0)