Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move jax.extend.ffi module to top level jax.ffi #25633

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

dfm
Copy link
Collaborator

@dfm dfm commented Dec 20, 2024

In #21531, @froystig and I decided to land the JAX foreign function interface (FFI) under that jax.extend submodule, since it can be considered a mechanism for extending JAX. Since then, this decision has been questioned (most recently from @mattjj and @jakevdp), because the jax.extend submodule really has a narrower scope: interfacing with JAX internals (see the extend JEP for more details). Instead, the FFI is designed to allow users to extend JAX without interacting with JAX internals. Furthermore, code under jax.extend isn't required to follow the API compatibility contract that JAX's public APIs, but our aim is for the FFI to be a stable and well-supported public API.

With this in mind, this PR moves the FFI submodule back into the top level jax.ffi namespace, while leaving a deprecated import shim under jax.extend.ffi.

@dfm dfm self-assigned this Dec 20, 2024
@dfm dfm added the pull ready Ready for copybara import and testing label Dec 20, 2024
@dfm dfm force-pushed the move-ffi branch 2 times, most recently from f901fab to b775ab5 Compare December 20, 2024 12:44
docs/jax.ffi.rst Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pull ready Ready for copybara import and testing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants