Repository navigation
Backport gfx r2.21 - #3268
Merged
Merged
Backport gfx r2.21#3268
Conversation
(cherry picked from commit 4de0b95)
…ta for ROCm 10.2 only! Imported from GitHub PR openxla/xla#51088 Add `rocm_path("lib/llvm/lib/libomp.so*")` to the `hipblaslt` runtime data in `third_party/gpus/rocm/BUILD.tpl`, next to `libtensilelite-host.so*`. The ROCm 10.2 release keeps this dependency; later ROCm builds no longer link OpenMP into `libtensilelite-host`. In ROCm 10.2, `libhipblaslt.so.1` depends on `libtensilelite-host.so.1`, which needs `libomp.so` and finds it through `$ORIGIN/llvm/lib`. tensorflow#50239 added `libtensilelite-host.so*` to the `hipblaslt` data but not `libomp.so`, so `rocm_dist/lib/llvm/lib/libomp.so` is missing from runfiles and anything that loads hipBLASLt from a 10.2 install fails before `main`: ``` error while loading shared libraries: libomp.so: cannot open shared object file: No such file or directory ``` This currently breaks the ROCm 10.2 nightly test runs, including the JAX unit tests in ROCm/xla's CI, where `xla_rocm_plugin.so` fails to load and every GPU test falls back to "Unknown backend: 'gpu'". ROCm 10.0 is unaffected because none of its math libraries need `libomp`. A `cc_test` depending on `@local_config_rocm//rocm:hipblaslt` that calls `dlopen("libhipblaslt.so.1", RTLD_NOW)`, built with `--config=rocm` and `ROCM_PATH` set to the TheRock pip install (`rocm-sdk path --root`), in the rocmless CI image: | ROCm | Before | After | |---|---|---| | 10.2.0a20261016 | fails: `libomp.so: cannot open shared object file` | passes; `libomp.so` loads next to `libtensilelite-host.so.1` | | 10.0.0 | n/a | passes | End to end: jax-ml/jax `main` Bazel GPU tests (`build/rocm/ci_test_targets.txt`, `--//jax:build_jaxlib=wheel`, the ROCm/xla CI flags without RBE) on a local gfx950 with TheRock 10.2.0a20261016 from pip and this change applied via `--override_repository=xla`: 147 of 147 tests pass. Reverting this change, `//tests:cholesky_update_test_gpu` fails with `libomp.so: cannot open shared object file`, as in CI. `--incompatible_disallow_empty_glob=false` is set in both XLA's and JAX's `.bazelrc`, so ROCm installs without `libomp` are unaffected. Copybara import of the project: -- c95b6b5f418254a324a032bfb907fd4459af267a by gulsumgudukbay <gudukbay@gmail.com>: [ROCm] Add libomp.so to the hipblaslt runtime data libtensilelite-host.so needs libomp.so and finds it through $ORIGIN/llvm/lib. Without libomp in runfiles, binaries that load hipBLASLt from ROCm 10.2 fail with "libomp.so: cannot open shared object file". Merging this change closes tensorflow#51088 PiperOrigin-RevId: 1018104611 (cherry picked from commit a85d8ba)
(cherry picked from commit 64c1d6b)
(cherry picked from commit 5eac230)
i-chaochen
approved these changes
Nov 29, 2026
i-chaochen
left a comment
Collaborator
There was a problem hiding this comment.
can we let agent to review these kind of PRs later on
hsharsha
force-pushed
the
backport-gfx-r2.21
branch
from
November 29, 2026 11:08
8122f35 to
a44c72f
Compare
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.
Submission Checklist