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

GH-44229: [Docs] Add PyArrow to JAX example to the docs #44230

Merged
merged 1 commit into from
Sep 26, 2024

Conversation

felipecrv
Copy link
Contributor

@felipecrv felipecrv commented Sep 25, 2024

Rationale for this change

Explicitly mention in the docs a way that PyArrow can interop with JAX.

What changes are included in this PR?

  • Tweaks to the phrasing
  • Two JAX examples: one for jax.numpy and another for jax.dlpack

Are these changes tested?

N/A

Copy link

⚠️ GitHub issue #44229 has been automatically assigned in GitHub to PR creator.

Copy link
Member

@amoeba amoeba left a comment

Choose a reason for hiding this comment

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

LGTM.

One question, jax.numpy.from_dlpack ("Returns a Array representation of a DLPack tensor") and jax.dlpack.from_dlpack ("Construct a JAX array via DLPack") seem like redundant APIs, do JAX users tend to understand which is which or could we make it clear why a user would pick one or other in this example?

@felipecrv
Copy link
Contributor Author

One question, jax.numpy.from_dlpack ("Returns a Array representation of a DLPack tensor") and jax.dlpack.from_dlpack ("Construct a JAX array via DLPack") seem like redundant APIs, do JAX users tend to understand which is which or could we make it clear why a user would pick one or other in this example?

Yes. JAX itself is a nice to use Python library wrapping the XLA compiler. Then it provides public interfaces inspired by famous Python libraries: there is jax.numpy and jax.scipy for instance. jax.dlpack is the standalone entrypoint to dlpack code in case you are not using JAX via the familiar interfaces.

@felipecrv felipecrv merged commit 9fa78d0 into apache:main Sep 26, 2024
7 checks passed
@felipecrv felipecrv removed the awaiting committer review Awaiting committer review label Sep 26, 2024
@amoeba
Copy link
Member

amoeba commented Sep 26, 2024

Got it, thanks.

Copy link

After merging your PR, Conbench analyzed the 4 benchmarking runs that have been run so far on merge-commit 9fa78d0.

There were no benchmark performance regressions. 🎉

The full Conbench report has more details. It also includes information about 1 possible false positive for unstable benchmarks that are known to sometimes produce them.

@AlenkaF
Copy link
Member

AlenkaF commented Sep 26, 2024

Great addition, thanks @felipecrv!

@felipecrv felipecrv deleted the jax_dlpack branch September 26, 2024 12:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants