Skip to content

Comments

Use plain bazel to test jax, use hermetic rocm dependency#584

Open
alekstheod wants to merge 4 commits intorocm-jaxlib-v0.8.0from
simplify_jax_wheel_build
Open

Use plain bazel to test jax, use hermetic rocm dependency#584
alekstheod wants to merge 4 commits intorocm-jaxlib-v0.8.0from
simplify_jax_wheel_build

Conversation

@alekstheod
Copy link

@alekstheod alekstheod commented Dec 18, 2025

This PR is a POC that we can use plain bazel to run the tests or build the jax wheels.

Deployment script of the wheel can be used like a following:
./build/rocm/deploy_wheel.sh /tmp/jax.whl

@alekstheod alekstheod force-pushed the simplify_jax_wheel_build branch from e959b62 to 0cc81a0 Compare December 18, 2025 12:35
@alekstheod alekstheod force-pushed the simplify_jax_wheel_build branch from 0cc81a0 to 24d5725 Compare December 18, 2025 12:42
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR introduces plain Bazel-based testing and build workflows for JAX with hermetic ROCm dependencies. The changes enable running JAX unit tests and building JAX wheels using Bazel commands instead of relying on external build systems.

Key changes:

  • Added Bazel configuration and scripts for ROCm-based JAX testing and wheel deployment
  • Configured hermetic Python 3.12 and ROCm 7.10.0 dependencies with specific GPU targets
  • Exposed JAX wheel as a public filegroup for downstream consumption

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
build/rocm/run_jax_ut.sh Script to execute JAX unit tests with ROCm configuration via Bazel
build/rocm/rocm.bazelrc Bazel configuration defining ROCm build settings, compiler paths, and Python version
build/rocm/deploy_wheel.sh Script to build and deploy JAX wheel to a specified location
build/rocm/BUILD Build rules for wheel deployment script generation and binary target
BUILD.bazel Exposed jax_wheel as a public filegroup for build/rocm targets

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@alekstheod alekstheod force-pushed the simplify_jax_wheel_build branch from 0ff21d1 to 5cf95d5 Compare December 19, 2025 07:53
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@alekstheod alekstheod force-pushed the simplify_jax_wheel_build branch from 5cf95d5 to 6694656 Compare December 19, 2025 08:14
Copy link
Collaborator

@charleshofer charleshofer left a comment

Choose a reason for hiding this comment

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

I'm not really sure what the purpose of this PR is. We already have code that runs unit tests in Bazel. So, I don't understand what the purpose of making a POC to implement something we already have is.

Aside from that, unit tests need to get run with rocm/rocm-jax as the starting point. Running the tests this way might exercise some of our jaxlib changes, but it won't test the kernels wheel and PJRT code that needs to be tested.

If we're trying to improve upon the Bazel unit test setup, we should use the scripts introduced in ROCm/rocm-jax#206 as a starting point.

@alekstheod
Copy link
Author

I'm not really sure what the purpose of this PR is. We already have code that runs unit tests in Bazel. So, I don't understand what the purpose of making a POC to implement something we already have is.

Aside from that, unit tests need to get run with rocm/rocm-jax as the starting point. Running the tests this way might exercise some of our jaxlib changes, but it won't test the kernels wheel and PJRT code that needs to be tested.

If we're trying to improve upon the Bazel unit test setup, we should use the scripts introduced in ROCm/rocm-jax#206 as a starting point.

This PR is not something to be merged in. The purpose is to show how we can do everything we do without a need of an additional wrapper, so using plain bazel commands. The goal is to get your feedback so if you think it would be more convenient to use this instead of the build.py script.

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.

2 participants