Skip to content

Fix rocJPEG dlopen failure in ROCm 7.14 wheels by adding RPATH to rocm-sdk-core - #9589

Open
akashveramd wants to merge 1 commit into
pytorch:mainfrom
akashveramd:av_fix_rpath
Open

Fix rocJPEG dlopen failure in ROCm 7.14 wheels by adding RPATH to rocm-sdk-core#9589
akashveramd wants to merge 1 commit into
pytorch:mainfrom
akashveramd:av_fix_rpath

Conversation

@akashveramd

@akashveramd akashveramd commented Aug 7, 2026

Copy link
Copy Markdown

Issue: image_stable.so is compiled with -lrocjpeg on ROCm 7.14, but librocjpeg.so.1 lives in the separate rocm-sdk-core Python wheel (site-packages/_rocm_sdk_core/lib/) which the dynamic linker doesn't know about — causing dlopen() to fail silently and all torchvision.io image ops to disappear.
This error was seen in: https://github.com/pytorch/test-infra/actions/runs/31064437484/job/92503112712?pr=8451#step:18:369

Fix: extend the RPATH embedded in image_stable.so to include $ORIGIN/../_rocm_sdk_core/lib (and sibling rocm-sdk wheel dirs) so the dynamic linker finds librocjpeg.so.1 at runtime.

This PR also reverts the temporary workaround from PR #9586 that disabled rocJPEG entirely.

cc @jeffdaily @jithunnair-amd

@pytorch-bot

pytorch-bot Bot commented Aug 7, 2026

Copy link
Copy Markdown

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/vision/9589

Note: Links to docs will display an error until the docs builds have been completed.

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@meta-cla meta-cla Bot added the cla signed label Aug 7, 2026
@NicolasHug

Copy link
Copy Markdown
Member

Thanks @akashveramd but as mentioned in #9587 , I'm going to remove the ROCJPEG decoder from torchvision as I'm migrating it to TorchCodec. Any chance you can help with meta-pytorch/torchcodec#1554 instead? I'd like help over there to see how we can unblock the test failures, which seem to be related to missing dependencies (might be similar to this one).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants