[torch] Preload rocprofiler-sdk to fix nightly smoketests#4065
Merged
darren-amd merged 2 commits intomainfrom Mar 19, 2026
Merged
[torch] Preload rocprofiler-sdk to fix nightly smoketests#4065darren-amd merged 2 commits intomainfrom
darren-amd merged 2 commits intomainfrom
Conversation
Made-with: Cursor
ScottTodd
approved these changes
Mar 19, 2026
Contributor
Author
|
Thanks Scott! Waiting on CI to pass before merging. |
chiranjeevipattigidi
pushed a commit
that referenced
this pull request
Mar 23, 2026
## Motivation Fixes #3962 - The `rocprofiler-sdk` shared library is not being preloaded, causing `librocprofiler-sdk.so.1` to be missing at runtime. This is because the PyTorch `kineto` submodule was bumped which switched from `roctracer` to `rocprofiler-sdk`: pytorch/pytorch#177101 - `test_mempool_expandable` was enabled on ROCm by pytorch/pytorch#173330. This test was failing as it requires the rocm[devel] packages but was causing a crash: https://github.com/ROCm/TheRock/actions/runs/23164829934/job/67321547840. This test is currently already skipped for other torch versions. - Also skip `test_mempool_empty_cache_inactive`, `test_mempool_limited_memory_with_allocator`, `test_deleted_mempool_not_used_on_oom`, and `test_mempool_ctx_multithread` as these also require building `dummy_allocator` and are skipped in other torch versions. ## Technical Details - Adds `rocprofiler-sdk` to `LINUX_LIBRARY_PRELOADS` in `build_prod_wheels.py` so that `librocprofiler-sdk.so` is loaded - Registers `rocprofiler-sdk` as a `LibraryEntry` in `_dist_info.py` so the `rocm_sdk` package can resolve the name to the actual `.so` file. ## Test Plan - Verify that ROCm builds, the nightly smoke tests pass and that running the torch tests do not crash ## Test Result - ROCm builds successfully: https://github.com/ROCm/TheRock/actions/runs/23152017500 - Smoke tests pass for torch nightly and the runner is not crashing: https://github.com/ROCm/TheRock/actions/runs/23253453219 ## Submission Checklist - [x] Look over the contributing guidelines at https://github.com/ROCm/ROCm/blob/develop/CONTRIBUTING.md#pull-requests.
1 task
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.
Motivation
Fixes #3962
rocprofiler-sdkshared library is not being preloaded, causinglibrocprofiler-sdk.so.1to be missing at runtime. This is because the PyTorchkinetosubmodule was bumped which switched fromroctracertorocprofiler-sdk: bump kineto submodule to 0035505 pytorch/pytorch#177101test_mempool_expandablewas enabled on ROCm by [ROCm] Enable expandable segments pytorch/pytorch#173330. This test was failing as it requires the rocm[devel] packages but was causing a crash: https://github.com/ROCm/TheRock/actions/runs/23164829934/job/67321547840. This test is currently already skipped for other torch versions.test_mempool_empty_cache_inactive,test_mempool_limited_memory_with_allocator,test_deleted_mempool_not_used_on_oom, andtest_mempool_ctx_multithreadas these also require buildingdummy_allocatorand are skipped in other torch versions.Technical Details
rocprofiler-sdktoLINUX_LIBRARY_PRELOADSinbuild_prod_wheels.pyso thatlibrocprofiler-sdk.sois loadedrocprofiler-sdkas aLibraryEntryin_dist_info.pyso therocm_sdkpackage can resolve the name to the actual.sofile.Test Plan
Test Result
Submission Checklist