Skip to content

Commit 1e3822c

Browse files
committed
Remove ROCM-specific stuff?
1 parent 77f2e23 commit 1e3822c

File tree

2 files changed

+1
-10
lines changed

2 files changed

+1
-10
lines changed

setup.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -320,12 +320,7 @@ def make_image_extension():
320320
else:
321321
warnings.warn("Building torchvision without JPEG support")
322322

323-
if USE_WEBP and IS_ROCM:
324-
warnings.warn(
325-
"Cannot enable webp support on rocm. "
326-
"See https://github.com/pytorch/vision/pull/8724#issuecomment-2503964558."
327-
)
328-
elif USE_WEBP:
323+
if USE_WEBP:
329324
webp_found, webp_include_dir, webp_library_dir = find_library(header="webp/decode.h")
330325
if webp_found:
331326
print("Building torchvision with WEBP support")

test/test_image.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@
4545
IS_MACOS = sys.platform == "darwin"
4646
PILLOW_VERSION = tuple(int(x) for x in PILLOW_VERSION.split("."))
4747
WEBP_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
5049
ROCM_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
]
877875
if 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))
899896
def 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

Comments
 (0)