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
Open
Fix rocJPEG dlopen failure in ROCm 7.14 wheels by adding RPATH to rocm-sdk-core#9589akashveramd wants to merge 1 commit into
akashveramd 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. |
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). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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