Fix rocJPEG dlopen failure in ROCm 7.14 wheels by adding RPATH to rocm-sdk-core - #9589
Fix rocJPEG dlopen failure in ROCm 7.14 wheels by adding RPATH to rocm-sdk-core#9589akashveramd wants to merge 1 commit into
Conversation
🔗 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. |
|
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). |
Hi @NicolasHug, Sure, I am happy to help with PR#1554. |
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