Skip to content

Conversation

@robtaylor
Copy link
Owner

Summary

  • Add iree_metal to _platforms_with_donation list in jax/_src/interpreters/mlir.py

The IREE Metal PJRT plugin now supports buffer donation, which allows JAX to reuse input buffers for outputs when the input is no longer needed. This optimization reduces memory allocation overhead and improves performance for workloads that can donate buffers.

Background

Buffer donation is an optimization where JAX can inform the runtime that an input buffer can be reused for an output, avoiding extra memory allocations. The IREE Metal PJRT plugin implements:

  • Duplicate buffer detection (same buffer donated multiple times)
  • Post-execution buffer invalidation
  • Runtime metadata extraction from compiled modules

Test plan

  • Run buffer donation tests with IREE Metal backend
  • Verify donated buffers are properly invalidated after execution
  • Confirm double-donation is detected and raises appropriate errors

🤖 Generated with Claude Code

mwhittaker and others added 30 commits December 8, 2025 15:46
PiperOrigin-RevId: 841983057
After getting rid of hints, these constructors are no longer necessary.

PiperOrigin-RevId: 842112040
PiperOrigin-RevId: 842264374
PiperOrigin-RevId: 842272730
Recently we have found the need to evolve the serialization of
`jax.export.Exported`. E.g., in jax-ml#33942 we have added a 32-bit
representation for `nr_devices`. This introduced a compatiblity
bug that was found by usersm and fixed in in jax-ml#33685.

Here we add backwards compatibility tests. See the description
in the `export_serialization_back_compat_test.py` module docstring.

Note that this is separate from our previous set of backwards
compatibility tests for the lowering of custom calls
(in `export_back_compat_test.py`). However, we reuse some
of the same ideas, and we use the same directory for
storing saved old serializations.
Introduces a variant of Get in AttributeMap that returns the value variant as is.

PiperOrigin-RevId: 842283537
…gration guide

Co-authored-by: Matthew Johnson <mattjj@google.com>
PiperOrigin-RevId: 842298387
They still run in CI.

PiperOrigin-RevId: 842313199
jakevdp and others added 30 commits December 19, 2025 09:53
These names were already deprecated in v0.8.0 or prior; this change means that the custom
AttributeError will be replaced with a generic AttributeError.
PiperOrigin-RevId: 846781195
…sfer_batching

PiperOrigin-RevId: 846791377
PiperOrigin-RevId: 846830895
The following modules are removed:

- `jax.lib.xla_bridge`
- `jax.lib.xla_client`
- `jax.lib.xla_extension`

All contents of these submodules were deprecated and removed as of JAX v0.8.0; the modules themselves have been raising warnings on import since this release.

PiperOrigin-RevId: 846831442
Updates LLVM usage to match
[7d381f2a5634](llvm/llvm-project@7d381f2a5634)

PiperOrigin-RevId: 846858892
This has been deprecated since JAX v0.8.0; after this change the flag still exists, but setting it raises a warning and otherwise has no effect. It will be removed in JAX v0.10.0.

PiperOrigin-RevId: 846877149
PiperOrigin-RevId: 846909748
PiperOrigin-RevId: 846930629
PiperOrigin-RevId: 846986071
The IREE Metal PJRT plugin now supports buffer donation, which allows
JAX to reuse input buffers for outputs when the input is no longer
needed. This optimization reduces memory allocation overhead.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
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.