300 Commits

Author SHA1 Message Date
David Dunleavy
1a19d5594a Update all uses of @tsl//third_party to @xla//third_party
PiperOrigin-RevId: 733495240
2025-03-04 15:55:23 -08:00
jax authors
d424f5b5b3 Refactor JAX wheel build rules to control the wheel filename and maintain reproducible wheel content and filename results.
This change is a part of the initiative to test the JAX wheels in the presubmit properly.

The list of the changes:
1. JAX wheel build rule verifies that `--@local_config_cuda//cuda:include_cuda_libs=false` during the wheel build. There is a way to pass the restriction by providing `--@local_config_cuda//cuda:override_include_cuda_libs=true`.

2. The JAX version number (which is also used in the wheel filenames) is stored in `_version` variable in the file [version.py](https://github.com/jax-ml/jax/blob/main/jax/version.py). The custom repository rule `jax_python_wheel_version_repository` saves this value in `wheel_version.bzl`, so it becomes available in Bazel build phase.

3. The version suffix of the wheel in the build rule output depends on the environment variables.

   The version suffix chunks that are not reproducible shouldn’t be calculated as a part of the wheel binary: for example, the current date changes every day, thus the wheels built today and tomorrow on the same code version will be technically different. To maintain reproducible wheel content, we need to pass suffix chunks in a form of environment variables.

4. Environment variables combinations for creating wheels with different versions:
  * `0.5.1.dev0+selfbuilt` (local build, default build rule behavior): `--repo_env=ML_WHEEL_TYPE=snapshot`
  * `0.5.1` (release): `--repo_env=ML_WHEEL_TYPE=release`
  * `0.5.1rc1` (release candidate): `--repo_env=ML_WHEEL_TYPE=release --repo_env=ML_WHEEL_VERSION_SUFFIX=rc1`
  * `0.5.1.dev20250128+3e75e20c7` (nightly build): `--repo_env=ML_WHEEL_TYPE=custom --repo_env=ML_WHEEL_BUILD_DATE=20250128 --repo_env=ML_WHEEL_GIT_HASH=$(git rev-parse HEAD)`

PiperOrigin-RevId: 723552265
2025-02-05 10:01:23 -08:00
vfdev-5
00806ddaf5 Added 3.13 ft requirements lock file and updated WORKSPACE 2025-01-08 22:47:29 +01:00
Vadym Matsishevskyi
8804be0229 Add Python 3.130rc2 support to the build.
This PR depends on https://github.com/openxla/xla/pull/17169. The change does not fail existing builds, but to be able to use python 3.13 functionality in jax the corresponding XLA pr needs to land first and get integrated with JAX (happens automatically).

PiperOrigin-RevId: 675243989
2024-09-16 12:14:32 -07:00
jax authors
599c13aa09 Introduce hermetic CUDA in Google ML projects.
1) Hermetic CUDA rules allow building wheels with GPU support on a machine without GPUs, as well as running Bazel GPU tests on a machine with only GPUs and NVIDIA driver installed. When `--config=cuda` is provided in Bazel options, Bazel will download CUDA, CUDNN and NCCL redistributions in the cache, and use them during build and test phases.

    [Default location of CUNN redistributions](https://developer.download.nvidia.com/compute/cudnn/redist/)

    [Default location of CUDA redistributions](https://developer.download.nvidia.com/compute/cuda/redist/)

    [Default location of NCCL redistributions](https://pypi.org/project/nvidia-nccl-cu12/#history)

2) To include hermetic CUDA rules in your project, add the following in the WORKSPACE of the downstream project dependent on XLA.

   Note: use `@local_tsl` instead of `@tsl` in Tensorflow project.

   ```
   load(
      "@tsl//third_party/gpus/cuda/hermetic:cuda_json_init_repository.bzl",
      "cuda_json_init_repository",
   )

   cuda_json_init_repository()

   load(
      "@cuda_redist_json//:distributions.bzl",
      "CUDA_REDISTRIBUTIONS",
      "CUDNN_REDISTRIBUTIONS",
   )
   load(
      "@tsl//third_party/gpus/cuda/hermetic:cuda_redist_init_repositories.bzl",
      "cuda_redist_init_repositories",
      "cudnn_redist_init_repository",
   )

   cuda_redist_init_repositories(
      cuda_redistributions = CUDA_REDISTRIBUTIONS,
   )

   cudnn_redist_init_repository(
      cudnn_redistributions = CUDNN_REDISTRIBUTIONS,
   )

   load(
      "@tsl//third_party/gpus/cuda/hermetic:cuda_configure.bzl",
      "cuda_configure",
   )

   cuda_configure(name = "local_config_cuda")

   load(
      "@tsl//third_party/nccl/hermetic:nccl_redist_init_repository.bzl",
      "nccl_redist_init_repository",
   )

   nccl_redist_init_repository()

   load(
      "@tsl//third_party/nccl/hermetic:nccl_configure.bzl",
      "nccl_configure",
   )

   nccl_configure(name = "local_config_nccl")
   ```

PiperOrigin-RevId: 662981325
2024-08-14 10:58:43 -07:00
Vadym Matsishevskyi
fb3607c1d5 Use inclusion list configuration for local wheels.
Also some documentation improvements/clarifications.

This allows it to not remove unused local wheels from the dist directory to avoid conflicts.

PiperOrigin-RevId: 650697758
2024-07-09 11:25:31 -07:00
Peter Hawkins
945fde41e4 Update minimum Python version to 3.10. 2024-06-26 13:47:14 -04:00
Vadym Matsishevskyi
a073476fa0 chore: adopt new local wheel installation logic
PiperOrigin-RevId: 641972325
2024-06-10 11:41:52 -07:00
Vadym Matsishevskyi
517e299a9d Use hermetic Python in JAX, see "Managing hermetic Python" in developer.md for details
PiperOrigin-RevId: 634146391
2024-05-15 18:20:56 -07:00
Peter Hawkins
a853539862 Remove Bazel workspace entries for nanobind and robin_map.
The XLA repository has these, no need to duplicate them.

PiperOrigin-RevId: 618248779
2024-03-22 12:01:32 -07:00
Antonio Sanchez
873cffc776 Use TSL's import of DUCC.
This is a necessary first step before adding DUCC support to XLA,
otherwise the JAX tests in the XLA repo pull from JAX's copy,
which has slightly different build rules.

PiperOrigin-RevId: 576880208
2023-10-26 08:26:56 -07:00
Peter Hawkins
70b7d50181 Switch jaxlib to use nanobind instead of pybind11.
nanobind has a number of advantages (https://nanobind.readthedocs.io/en/latest/why.html), notably speed of compilation and dispatch, but the main reason to do this for these bindings is because nanobind can target the Python Stable ABI starting with Python 3.12. This means that we will not need to ship per-Python version CUDA plugins starting with Python 3.12.

PiperOrigin-RevId: 559898790
2023-08-24 16:07:56 -07:00
Peter Hawkins
d6e06f4476 Move the XLA commit out of the top-level JAX WORKSPACE file and into a separate .bzl file.
No functional changes intended.

PiperOrigin-RevId: 556906943
2023-08-14 14:09:45 -07:00
Skye Wanderman-Milne
e132a0e5d5 Slightly downgrade xla version to avoid PJRT C API incompat 2023-07-27 14:05:14 -07:00
Skye Wanderman-Milne
0b24b2ba6a Update WORKSPACE and setup.py in preparation for jax/jaxlib 0.4.14 release 2023-07-27 13:35:04 -07:00
Peter Hawkins
0cd025348d Update XLA version to fix build failure. 2023-07-27 12:38:51 +00:00
Sharad Vikram
3baa6e7a89 Enable building jaxlib w/ Mosaic
PiperOrigin-RevId: 551159246
2023-07-26 03:59:30 -07:00
Peter Hawkins
487b640acf Jax 0.4.13 release. 2023-06-22 14:59:36 -07:00
Skye Wanderman-Milne
8223e452f2 Update WORKSPACE and setup.py for jax + jaxlib 0.4.12 release 2023-06-08 13:58:09 -07:00
Yash Katariya
48ad9a6f3e Start jax and jaxlib 0.4.11 release
PiperOrigin-RevId: 536860076
2023-05-31 16:48:52 -07:00
Sharad Vikram
1279418ce5 Link in CUDA runtime for triton in jaxlib
PiperOrigin-RevId: 535708416
2023-05-26 14:02:16 -07:00
Skye Wanderman-Milne
82bbeef519 Update setup.py, WORKSPACE, and CHANGELOG for jax/jaxlib 0.4.10 release 2023-05-11 14:46:06 -07:00
Skye Wanderman-Milne
5bcd9dcc46 Update WORKSPACE and setup.py in preparation for jax/jaxlib 0.4.9 release, take 2 2023-05-09 14:49:54 -07:00
Skye Wanderman-Milne
f28b20175f Update WORKSPACE and setup.py in preparation for jax/jaxlib 0.4.9 release 2023-05-04 14:38:46 -07:00
Peter Hawkins
51c40f04b9 Bump XLA version. 2023-05-03 18:52:04 +00:00
Yash Katariya
ae4f1fcb66 Update the commit in workspace too
PiperOrigin-RevId: 519797427
2023-03-27 12:30:18 -07:00
Yash Katariya
e9cac5eb47 Prepare for jax and jaxlib 0.4.7 release
PiperOrigin-RevId: 519785176
2023-03-27 11:45:22 -07:00
Peter Hawkins
172a831219 Switch JAX to use the OpenXLA repository. 2023-03-13 18:38:26 +00:00
Skye Wanderman-Milne
1aa08fd4a0 Update WORKSPACE and setup.py for jax/jaxlib 0.4.6 release 2023-03-09 10:44:58 -08:00
Yash Katariya
58e46b48e6 Prepare for jax and jaxlib 0.4.4 release
PiperOrigin-RevId: 510152471
2023-02-16 08:37:15 -08:00
Skye Wanderman-Milne
8ab158574d Update WORKSPACE and setup.py for jax/jaxlib 0.4.3 release 2023-02-07 15:45:28 -08:00
Skye Wanderman-Milne
9a7f29a9fb Update WORKSPACE for jaxlib 0.4.2 release (again)
This fixes a segfault that was affecting the previous 0.4.2 candidate.
2023-01-24 18:07:11 +00:00
Skye Wanderman-Milne
3f4bd5f449 Updates for jax + jaxlib 0.4.2 release 2023-01-20 19:04:46 +00:00
Yash Katariya
c4d590b1b6 Update values for release 0.4.1
PiperOrigin-RevId: 494889744
2022-12-12 19:04:38 -08:00
Yash Katariya
0118f8d568 Prepare for jax and jaxlib 0.4.0 release
PiperOrigin-RevId: 493733609
2022-12-07 16:02:24 -08:00
Jake VanderPlas
e66fe1dff4 Update XLA commit.
Fixes build error: no such target '@org_tensorflow//tensorflow/compiler/xla/mlir_hlo:python/MlirHloModule.cc'
2022-11-16 15:51:28 -08:00
Yash Katariya
50f7512a6e
Update WORKSPACE for jaxlib release 2022-11-14 16:37:09 -08:00
Yash Katariya
2e384ce58f Prepare for release of jax and jaxlib 0.3.24
PiperOrigin-RevId: 485985460
2022-11-03 15:13:23 -07:00
Skye Wanderman-Milne
63be2201aa Update WORKSPACE and setup.py for jaxlib 0.3.22 release 2022-10-11 17:55:05 +00:00
Peter Hawkins
8d8643664c jax/jaxlib 0.3.20 release candidate. 2022-09-28 13:33:52 +00:00
Peter Hawkins
bcd36d8eb2 Jax and jaxlib 0.3.18 release candidate. 2022-09-26 14:10:57 +00:00
Peter Hawkins
bec9d2e168 Bump XLA version. 2022-09-19 13:17:46 +00:00
jax authors
45764ea9a8 Merge pull request #12125 from hawkinsp:xla
PiperOrigin-RevId: 470295638
2022-08-26 11:38:03 -07:00
Peter Hawkins
12cb55d2f0 Bump XLA version. 2022-08-26 18:27:59 +00:00
Peter Hawkins
b63801b4db Fixes for PocketFFT->ducc migration.
* Rename modules from pocketfft to ducc.
* Fix up strides at their generation point rather than where they are
  consumed.
2022-08-26 14:30:03 +00:00
Peter Hawkins
6128cb7aa0 Update XLA commit. 2022-08-18 20:17:37 +00:00
Peter Hawkins
87db8fc5f6 Update XLA commit.
Fixes build error:
Label
 '@org_tensorflow//tensorflow/tsl/platform/default:build_config.bzl' is
 invalid because 'tensorflow/tsl/platform/default' is not a package.
2022-08-17 15:01:43 +00:00
Adam Paszke
6ed2d22566 Update WORKSPACE
to include the addition of use_global_device_ids in AllReduceOp.
2022-08-17 07:30:54 +00:00
Peter Hawkins
5603cb31d4 Bump XLA version.
Fixes https://github.com/google/jax/issues/9771
2022-08-15 21:12:52 +00:00
Yash Katariya
e982dd105f
Update the TF commit hash 2022-08-05 10:51:21 -07:00