Skip to content

Cherrypick pr932 to v0.10.1#983

Open
zahiqbal wants to merge 4 commits into
rocm-jaxlib-v0.10.1from
cherrypick-pr932-to-v0.10.1
Open

Cherrypick pr932 to v0.10.1#983
zahiqbal wants to merge 4 commits into
rocm-jaxlib-v0.10.1from
cherrypick-pr932-to-v0.10.1

Conversation

@zahiqbal

Copy link
Copy Markdown

Motivation

Backports the ROCm release fixes from #932 (merged into rocm-jaxlib-v0.10.0) onto rocm-jaxlib-v0.10.1.

Technical Details

PR #932 imported upstream openxla/xla ROCm fixes for the JAX v0.10.0 jaxlib line. Those commits landed on rocm-jaxlib-v0.10.0 via squash merge (76282465), but were not present on rocm-jaxlib-v0.10.1 because the two release branches diverged from b6f37ab.
Cherry-pick verification showed that most of the PR #932 changes are already present on v0.10.1 through newer upstream history. This PR applies only the remaining deltas:

Original PR #932 commits

Commit Upstream PR Status on v0.10.1
a4814ea openxla#41229 — rocprim segmented scan Already present
54e351c4 openxla#41481 — ReshapeDecomposer before LayoutNormalization Already present
b19a0f72 openxla#40385 — streamline ROCm bazel targets Cherry-picked (partial)
ef144763 openxla#41591 — unblock CI after openxla#40385 Cherry-picked (partial)
a2d6083b librocm_kpack / libclang-cpp runfiles Cherry-picked
6853664e openxla#40922 — triton fusion numerics verifier Already present
05759a72 rocm_blas formatting Cherry-picked

Files changed

  • third_party/gpus/rocm/BUILD.tpl
  • third_party/gpus/rocm/build_defs.bzl.tpl
  • xla/stream_executor/rocm/rocm_blas.cc
  • xla/tsl/platform/default/dso_loader.cc

Test Plan

  • ROCm jaxlib build succeeds on rocm-jaxlib-v0.10.1 with this branch
  • Verify ROCm library runfiles include librocm_kpack.so and libclang-cpp.so (ROCm 7.13+)
  • Run ROCm CI / relevant bazel targets that exercise direct ROCm library linking
  • Confirm no regressions in JAX dot-product attention / layout normalization tests (already covered upstream on v0.10.1)

Test Result

UT test passed

Submission Checklist

draganmladjenovic and others added 4 commits June 23, 2026 02:18
Imported from GitHub PR openxla#40385

📝 Summary of Changes
Move from linking to rocm libraries trough DsoLoader to direct linking. Make sure we only link to specified rocm library, not to any other library said library may use. This change leaves enough wrapper (namespace wrap) headers needed for TF.

🎯 Justification
Makes our build targets not tainted by transitive dependencies of rocm libraries. DsoLoader use has little benefit for rocm since the libraries get loaded ahead of time by jax plugin anyways.

🚀 Kind of Contribution
♻️ Cleanup

Copybara import of the project:

--
38470a3 by Dragan Mladjenovic <Dragan.Mladjenovic@amd.com>:

[ROCm] Streamline bazel targets for rocm libraries

--
7f2ec34 by Dragan Mladjenovic <Dragan.Mladjenovic@amd.com>:

[ROCm] Remove rocm_solver_context

--
1e34f26 by Dragan Mladjenovic <Dragan.Mladjenovic@amd.com>:

[ROCm] Remove hipblaslt_wrapper.h

--
2a35a53 by Dragan Mladjenovic <Dragan.Mladjenovic@amd.com>:

[ROCm] Remove hipsparse_wrapper.h

--
37338f2 by Dragan Mladjenovic <Dragan.Mladjenovic@amd.com>:

Remove rocsolver_wrapper.h

--
545039f by Dragan Mladjenovic <Dragan.Mladjenovic@amd.com>:

Remove rocblas_wrapper.h

--
c7e959e by Dragan Mladjenovic <Dragan.Mladjenovic@amd.com>:

Remove rocm_driver_wrapper.h

--
e41363d by Dragan Mladjenovic <Dragan.Mladjenovic@amd.com>:

Remove wrap namespace usage from rocm_fft

--
94dc13e by Dragan Mladjenovic <Dragan.Mladjenovic@amd.com>:

Remove wrap namespace usage from rocm_dnn

--
0885e40 by Dragan Mladjenovic <Dragan.Mladjenovic@amd.com>:

Remove TryDlopenROCmLibraries

--
983cc3f by Dragan Mladjenovic <Dragan.Mladjenovic@amd.com>:

Remove :all_files

--
aa5b6c3 by Dragan Mladjenovic <Dragan.Mladjenovic@amd.com>:

Partialy restore *wrapper.h files needed by ROCm TF

--
d2e89c2 by Dragan Mladjenovic <Dragan.Mladjenovic@amd.com>:

Use more filegroups

--
3abd237 by Dragan Mladjenovic <Dragan.Mladjenovic@amd.com>:

Remove DsoLoader ROCm support

--
474acd2 by Dragan Mladjenovic <Dragan.Mladjenovic@amd.com>:

Unblock X86 build CI

--
57e1100 by Dragan Mladjenovic <Dragan.Mladjenovic@amd.com>:

Fix RBE build

--
8a55bfb by Dragan Mladjenovic <Dragan.Mladjenovic@amd.com>:

Move to rocm_lib_import macro

Merging this change closes openxla#40385

COPYBARA_INTEGRATE_REVIEW=openxla#40385 from ROCm:draganm/rocm_libs 8a55bfb
PiperOrigin-RevId: 904252712

(cherry picked from commit 4f993de)
Imported from GitHub PR openxla#41591

📝 Summary of Changes
Default for hermetic paths in non-hermetic build too

🎯 Justification
Makes CI pick up rocm libs when doing local build + remote testing

🚀 Kind of Contribution
🐛 Bug Fix
Copybara import of the project:

--
2ab9ead by Dragan Mladjenovic <Dragan.Mladjenovic@amd.com>:

[ROCm] Unblock CI after PR openxla#40385

Merging this change closes openxla#41591

COPYBARA_INTEGRATE_REVIEW=openxla#41591 from ROCm:draganm/rocm_libs_followup 2ab9ead
PiperOrigin-RevId: 909965137

(cherry picked from commit d9922e7)
Two new DT_NEEDED entries appeared in ROCm 7.13 that BUILD.tpl's data
globs weren't mirroring into runfiles, causing dlopen failures at
runtime:

  - libamdhip64.so.7   -> librocm_kpack.so.0
  - libamd_comgr.so.3  -> libclang-cpp.so

(cherry picked from commit 9fb3e7d)
i-chaochen

This comment was marked as duplicate.

@i-chaochen i-chaochen left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Please also cherry-pick this openxla#44389 , openxla#41116 and openxla#44428 openxla#45093 to v0.10.1 release and waiting for the CI result.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants