Skip to content

Commit dcbc5b9

Browse files
committed
Merge branch 'main' of https://github.com/google/jax
2 parents f90bbfa + ac06d19 commit dcbc5b9

File tree

283 files changed

+12079
-6895
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

283 files changed

+12079
-6895
lines changed

.bazelrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -379,4 +379,4 @@ build:debug --config debug_symbols -c fastbuild
379379
try-import %workspace%/.jax_configure.bazelrc
380380

381381
# Load rc file with user-specific options.
382-
try-import %workspace%/.bazelrc.user
382+
try-import %workspace%/.bazelrc.user

.github/workflows/asan.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,10 @@ jobs:
2525
run:
2626
shell: bash -l {0}
2727
steps:
28-
- uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
28+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
2929
with:
3030
path: jax
31-
- uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
31+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
3232
with:
3333
repository: python/cpython
3434
path: cpython

.github/workflows/ci-build.yaml

Lines changed: 37 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,17 @@ jobs:
2929
runs-on: ubuntu-latest
3030
timeout-minutes: 5
3131
steps:
32-
- uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
32+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
3333
- name: Set up Python 3.11
34-
uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 # v5.2.0
34+
uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0
3535
with:
3636
python-version: 3.11
37-
- uses: pre-commit/action@2c7b3805fd2a0fd8c1884dcaebf91fc102a13ecd # v3.0.1
37+
- run: python -m pip install pre-commit
38+
- uses: actions/cache@3624ceb22c1c5a301c8db4169662070a689d9ea8 # v4.1.1
39+
with:
40+
path: ~/.cache/pre-commit
41+
key: pre-commit-${{ env.pythonLocation }}-${{ hashFiles('.pre-commit-config.yaml', 'setup.py') }}
42+
- run: pre-commit run --show-diff-on-failure --color=always --all-files
3843

3944
build:
4045
name: "build ${{ matrix.name-prefix }} (py ${{ matrix.python-version }} on ubuntu-20.04, x64=${{ matrix.enable-x64}})"
@@ -57,13 +62,13 @@ jobs:
5762
prng-upgrade: 0
5863
num_generated_cases: 1
5964
steps:
60-
- uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
65+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
6166
- name: Image Setup
6267
run: |
6368
apt update
64-
apt install -y libssl-dev
69+
apt install -y libssl-dev
6570
- name: Set up Python ${{ matrix.python-version }}
66-
uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 # v5.2.0
71+
uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0
6772
with:
6873
python-version: ${{ matrix.python-version }}
6974
- name: Get pip cache dir
@@ -72,7 +77,7 @@ jobs:
7277
python -m pip install --upgrade pip wheel
7378
echo "dir=$(pip cache dir)" >> $GITHUB_OUTPUT
7479
- name: pip cache
75-
uses: actions/cache@3624ceb22c1c5a301c8db4169662070a689d9ea8 # v4.1.1
80+
uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.1.2
7681
with:
7782
path: ${{ steps.pip-cache.outputs.dir }}
7883
key: ${{ runner.os }}-py${{ matrix.python-version }}-pip-${{ hashFiles('**/setup.py', '**/requirements.txt', '**/test-requirements.txt') }}
@@ -108,9 +113,9 @@ jobs:
108113
matrix:
109114
python-version: ['3.10']
110115
steps:
111-
- uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
116+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
112117
- name: Set up Python ${{ matrix.python-version }}
113-
uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 # v5.2.0
118+
uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0
114119
with:
115120
python-version: ${{ matrix.python-version }}
116121
- name: Get pip cache dir
@@ -119,7 +124,7 @@ jobs:
119124
python -m pip install --upgrade pip wheel
120125
echo "dir=$(pip cache dir)" >> $GITHUB_OUTPUT
121126
- name: pip cache
122-
uses: actions/cache@3624ceb22c1c5a301c8db4169662070a689d9ea8 # v4.1.1
127+
uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.1.2
123128
with:
124129
path: ${{ steps.pip-cache.outputs.dir }}
125130
key: ${{ runner.os }}-pip-docs-${{ hashFiles('**/setup.py', '**/requirements.txt', '**/test-requirements.txt') }}
@@ -145,9 +150,9 @@ jobs:
145150
matrix:
146151
python-version: ['3.10']
147152
steps:
148-
- uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
153+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
149154
- name: Set up Python ${{ matrix.python-version }}
150-
uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 # v5.2.0
155+
uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0
151156
with:
152157
python-version: ${{ matrix.python-version }}
153158
- name: Get pip cache dir
@@ -156,7 +161,7 @@ jobs:
156161
python -m pip install --upgrade pip wheel
157162
echo "dir=$(pip cache dir)" >> $GITHUB_OUTPUT
158163
- name: pip cache
159-
uses: actions/cache@3624ceb22c1c5a301c8db4169662070a689d9ea8 # v4.1.1
164+
uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.1.2
160165
with:
161166
path: ${{ steps.pip-cache.outputs.dir }}
162167
key: ${{ runner.os }}-pip-docs-${{ hashFiles('**/setup.py', '**/requirements.txt', '**/test-requirements.txt') }}
@@ -181,9 +186,9 @@ jobs:
181186
enable-x64: 0
182187
num_generated_cases: 10
183188
steps:
184-
- uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
189+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
185190
- name: Set up Python ${{ matrix.python-version }}
186-
uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 # v5.2.0
191+
uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0
187192
with:
188193
python-version: ${{ matrix.python-version }}
189194
- name: Get pip cache dir
@@ -192,7 +197,7 @@ jobs:
192197
python -m pip install --upgrade pip wheel
193198
echo "dir=$(pip cache dir)" >> $GITHUB_OUTPUT
194199
- name: pip cache
195-
uses: actions/cache@3624ceb22c1c5a301c8db4169662070a689d9ea8 # v4.1.1
200+
uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.1.2
196201
with:
197202
path: ${{ steps.pip-cache.outputs.dir }}
198203
key: ${{ runner.os }}-py${{ matrix.python-version }}-pip-${{ hashFiles('**/setup.py', '**/requirements.txt', '**/test-requirements.txt') }}
@@ -217,26 +222,28 @@ jobs:
217222
218223
ffi:
219224
name: FFI example
220-
runs-on: ubuntu-latest
221-
timeout-minutes: 5
225+
runs-on: linux-x86-g2-16-l4-1gpu
226+
container:
227+
image: index.docker.io/tensorflow/build:latest-python3.12@sha256:48e99608fe9434ada5b14e19fdfd8e64f4cfc83aacd328b9c2101b210e984295 # ratchet:index.docker.io/tensorflow/build:latest-python3.12
228+
timeout-minutes: 30
222229
steps:
223-
- uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
224-
- name: Set up Python 3.11
225-
uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 # v5.2.0
230+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
231+
- name: Set up Python
232+
uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0
226233
with:
227-
python-version: 3.11
234+
python-version: 3.12
228235
- name: Get pip cache dir
229236
id: pip-cache
230237
run: |
231238
python -m pip install --upgrade pip wheel
232239
echo "dir=$(pip cache dir)" >> $GITHUB_OUTPUT
233240
- name: pip cache
234-
uses: actions/cache@3624ceb22c1c5a301c8db4169662070a689d9ea8 # v4.1.1
241+
uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.1.2
235242
with:
236243
path: ${{ steps.pip-cache.outputs.dir }}
237244
key: ${{ runner.os }}-pip-ffi-examples-${{ hashFiles('**/setup.py', '**/requirements.txt', '**/test-requirements.txt', 'examples/**/pyproject.toml') }}
238245
- name: Install JAX
239-
run: pip install .
246+
run: pip install .[cuda12]
240247
- name: Build and install example project
241248
run: python -m pip install -v ./examples/ffi[test]
242249
env:
@@ -245,6 +252,10 @@ jobs:
245252
# a different toolchain. GCC is the default compiler on the
246253
# 'ubuntu-latest' runner, but we still set this explicitly just to be
247254
# clear.
248-
CMAKE_ARGS: -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++
249-
- name: Run tests
255+
CMAKE_ARGS: -DCMAKE_CXX_COMPILER=g++ -DJAX_FFI_EXAMPLE_ENABLE_CUDA=ON
256+
- name: Run CPU tests
257+
run: python -m pytest examples/ffi/tests
258+
env:
259+
JAX_PLATFORM_NAME: cpu
260+
- name: Run GPU tests
250261
run: python -m pytest examples/ffi/tests

.github/workflows/cloud-tpu-ci-nightly.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ jobs:
4343
# https://opensource.google/documentation/reference/github/services#actions
4444
# mandates using a specific commit for non-Google actions. We use
4545
# https://github.com/sethvargo/ratchet to pin specific versions.
46-
- uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
46+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
4747
- name: Install JAX test requirements
4848
run: |
4949
pip install -U -r build/test-requirements.txt

.github/workflows/jax-array-api.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,17 +22,17 @@ jobs:
2222

2323
steps:
2424
- name: Checkout jax
25-
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
25+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
2626
- name: Checkout array-api-tests
27-
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
27+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
2828
with:
2929
repository: data-apis/array-api-tests
3030
# TODO(jakevdp) update this to a stable release/tag when available.
31-
ref: 'b4c0823469c02d6ce6e512ad4c2bd8ba42b1b4b2' # Latest commit as of 2024-09-09
31+
ref: 'bcd5919bbbdf4d4806b5b2613b4d8c0bc0625c54' # Latest commit as of 2024-10-31 👻
3232
submodules: 'true'
3333
path: 'array-api-tests'
3434
- name: Set up Python ${{ matrix.python-version }}
35-
uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 # v5.2.0
35+
uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0
3636
with:
3737
python-version: ${{ matrix.python-version }}
3838
- name: Install dependencies

.github/workflows/metal_plugin_ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727

2828
steps:
2929
- name: Get repo
30-
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
30+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
3131
with:
3232
path: jax
3333
- name: Setup build and test enviroment

.github/workflows/upstream-nightly.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,9 @@ jobs:
3636
outputs:
3737
artifacts_availability: ${{ steps.status.outputs.ARTIFACTS_AVAILABLE }}
3838
steps:
39-
- uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
39+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
4040
- name: Set up Python ${{ matrix.python-version }}
41-
uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 # v5.2.0
41+
uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0
4242
with:
4343
python-version: ${{ matrix.python-version }}
4444
- name: Install JAX test requirements
@@ -106,8 +106,8 @@ jobs:
106106
run:
107107
shell: bash
108108
steps:
109-
- uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
110-
- uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 # v5.2.0
109+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
110+
- uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0
111111
with:
112112
python-version: "3.x"
113113
- uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8

.github/workflows/wheel_win_x64.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,9 @@ jobs:
2525
- name: Install LLVM/Clang
2626
run: choco install llvm --version=18.1.4 --yes --no-progress --allow-downgrade
2727

28-
- uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
28+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
2929

30-
- uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 # v5.2.0
30+
- uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0
3131
with:
3232
python-version: ${{ matrix.pyver }}
3333
cache: 'pip'

.github/workflows/windows_ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,11 @@ jobs:
3131
- name: Install LLVM/Clang
3232
run: choco install llvm --version=18.1.4 --yes --no-progress --allow-downgrade
3333

34-
- uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
34+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
3535
with:
3636
path: jax
3737

38-
- uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 # v5.2.0
38+
- uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0
3939
with:
4040
python-version: ${{ matrix.pyver }}
4141
cache: 'pip'

CHANGELOG.md

Lines changed: 38 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,44 @@ Remember to align the itemized text with the first line of an item within a list
1010
When releasing, please add the new-release-boilerplate to docs/pallas/CHANGELOG.md.
1111
-->
1212

13-
## jax 0.4.35
13+
## jax 0.4.36
14+
15+
* Breaking Changes
16+
* {func}`jax.experimental.jax2tf.convert` with `native_serialization=False`
17+
or with `enable_xla=False` have been deprecated since July 2024, with
18+
JAX version 0.4.31. Now we removed support for these use cases. `jax2tf`
19+
with native serialization will still be supported.
20+
* In `jax.interpreters.xla`, the `xb`, `xc`, and `xe` symbols have been removed
21+
after being deprecated in JAX v0.4.31. Instead use `xb = jax.lib.xla_bridge`,
22+
`xc = jax.lib.xla_client`, and `xe = jax.lib.xla_extension`.
23+
* The deprecated module `jax.experimental.export` has been removed. It was replaced
24+
by {mod}`jax.export` in JAX v0.4.30. See the [migration guide](https://jax.readthedocs.io/en/latest/export/export.html#migration-guide-from-jax-experimental-export)
25+
for information on migrating to the new API.
26+
* The `initial` argument to {func}`jax.nn.softmax` and {func}`jax.nn.log_softmax`
27+
has been removed, after being deprecated in v0.4.27.
28+
* The following deprecated methods and functions in {mod}`jax.export` have
29+
been removed:
30+
* `jax.export.DisabledSafetyCheck.shape_assertions`: it had no effect
31+
already.
32+
* `jax.export.Exported.lowering_platforms`: use `platforms`.
33+
* `jax.export.Exported.mlir_module_serialization_version`:
34+
use `calling_convention_version`.
35+
* `jax.export.Exported.uses_shape_polymorphism`:
36+
use `uses_global_constants`.
37+
* the `lowering_platforms` kwarg for {func}`jax.export.export`: use
38+
`platforms` instead.
39+
* Hashing of tracers, which has been deprecated since version 0.4.30, now
40+
results in a `TypeError`.
41+
42+
* New Features
43+
* {func}`jax.jit` got a new `compiler_options: dict[str, Any]` argument, for
44+
passing compilation options to XLA. For the moment it's undocumented and
45+
may be in flux.
46+
* {func}`jax.tree_util.register_dataclass` now allows metadata fields to be
47+
declared inline via {func}`dataclasses.field`. See the function documentation
48+
for examples.
49+
50+
## jax 0.4.35 (Oct 22, 2024)
1451

1552
* Breaking Changes
1653
* {func}`jax.numpy.isscalar` now returns True for any array-like object with

0 commit comments

Comments
 (0)