4545IS_MACOS = sys .platform == "darwin"
4646PILLOW_VERSION = tuple (int (x ) for x in PILLOW_VERSION .split ("." ))
4747WEBP_TEST_IMAGES_DIR = os .environ .get ("WEBP_TEST_IMAGES_DIR" , "" )
48- IS_ROCM = torch .version .hip is not None
4948# See https://github.com/pytorch/vision/pull/8724#issuecomment-2503964558
5049ROCM_WEBP_MESSAGE = "ROCM not built with webp support."
5150
@@ -872,7 +871,6 @@ def test_decode_gif(tmpdir, name, scripted):
872871 (decode_jpeg , "Not a JPEG file" ),
873872 (decode_gif , re .escape ("DGifOpenFileName() failed - 103" )),
874873 (decode_webp , "WebPGetFeatures failed." ),
875- pytest .param (decode_webp , "WebPGetFeatures failed." , marks = pytest .mark .skipif (IS_ROCM , reason = ROCM_WEBP_MESSAGE )),
876874]
877875if DECODE_AVIF_ENABLED :
878876 decode_fun_and_match .append ((_decode_avif , "BMFF parsing failed" ))
@@ -893,7 +891,6 @@ def test_decode_bad_encoded_data(decode_fun, match):
893891 decode_fun (encoded_data )
894892
895893
896- @pytest .mark .skipif (IS_ROCM , reason = ROCM_WEBP_MESSAGE )
897894@pytest .mark .parametrize ("decode_fun" , (decode_webp , decode_image ))
898895@pytest .mark .parametrize ("scripted" , (False , True ))
899896def test_decode_webp (decode_fun , scripted ):
@@ -910,7 +907,6 @@ def test_decode_webp(decode_fun, scripted):
910907# including within the repo. The test images were downloaded manually from the
911908# different pages of https://developers.google.com/speed/webp/gallery
912909@pytest .mark .skipif (not WEBP_TEST_IMAGES_DIR , reason = "WEBP_TEST_IMAGES_DIR is not set" )
913- @pytest .mark .skipif (IS_ROCM , reason = ROCM_WEBP_MESSAGE )
914910@pytest .mark .parametrize ("decode_fun" , (decode_webp , decode_image ))
915911@pytest .mark .parametrize ("scripted" , (False , True ))
916912@pytest .mark .parametrize (
0 commit comments