From 1e3822cf672be77d565fc43c6587f3ec901f167a Mon Sep 17 00:00:00 2001 From: Nicolas Hug Date: Mon, 2 Dec 2024 12:56:13 +0000 Subject: [PATCH] Remove ROCM-specific stuff? --- setup.py | 7 +------ test/test_image.py | 4 ---- 2 files changed, 1 insertion(+), 10 deletions(-) diff --git a/setup.py b/setup.py index a5234288458..c2be57e9775 100644 --- a/setup.py +++ b/setup.py @@ -320,12 +320,7 @@ def make_image_extension(): else: warnings.warn("Building torchvision without JPEG support") - if USE_WEBP and IS_ROCM: - warnings.warn( - "Cannot enable webp support on rocm. " - "See https://github.com/pytorch/vision/pull/8724#issuecomment-2503964558." - ) - elif USE_WEBP: + if USE_WEBP: webp_found, webp_include_dir, webp_library_dir = find_library(header="webp/decode.h") if webp_found: print("Building torchvision with WEBP support") diff --git a/test/test_image.py b/test/test_image.py index 6129abe8895..4146d54ac78 100644 --- a/test/test_image.py +++ b/test/test_image.py @@ -45,7 +45,6 @@ IS_MACOS = sys.platform == "darwin" PILLOW_VERSION = tuple(int(x) for x in PILLOW_VERSION.split(".")) WEBP_TEST_IMAGES_DIR = os.environ.get("WEBP_TEST_IMAGES_DIR", "") -IS_ROCM = torch.version.hip is not None # See https://github.com/pytorch/vision/pull/8724#issuecomment-2503964558 ROCM_WEBP_MESSAGE = "ROCM not built with webp support." @@ -872,7 +871,6 @@ def test_decode_gif(tmpdir, name, scripted): (decode_jpeg, "Not a JPEG file"), (decode_gif, re.escape("DGifOpenFileName() failed - 103")), (decode_webp, "WebPGetFeatures failed."), - pytest.param(decode_webp, "WebPGetFeatures failed.", marks=pytest.mark.skipif(IS_ROCM, reason=ROCM_WEBP_MESSAGE)), ] if DECODE_AVIF_ENABLED: decode_fun_and_match.append((_decode_avif, "BMFF parsing failed")) @@ -893,7 +891,6 @@ def test_decode_bad_encoded_data(decode_fun, match): decode_fun(encoded_data) -@pytest.mark.skipif(IS_ROCM, reason=ROCM_WEBP_MESSAGE) @pytest.mark.parametrize("decode_fun", (decode_webp, decode_image)) @pytest.mark.parametrize("scripted", (False, True)) def test_decode_webp(decode_fun, scripted): @@ -910,7 +907,6 @@ def test_decode_webp(decode_fun, scripted): # including within the repo. The test images were downloaded manually from the # different pages of https://developers.google.com/speed/webp/gallery @pytest.mark.skipif(not WEBP_TEST_IMAGES_DIR, reason="WEBP_TEST_IMAGES_DIR is not set") -@pytest.mark.skipif(IS_ROCM, reason=ROCM_WEBP_MESSAGE) @pytest.mark.parametrize("decode_fun", (decode_webp, decode_image)) @pytest.mark.parametrize("scripted", (False, True)) @pytest.mark.parametrize(