Open saeedmaleki opened 2 days ago
Good suggestion! I've just opened a PR (https://github.com/jax-ml/jax/pull/25042) that adds such an example. I didn't add it to the tutorial, because we are using the examples/ffi
directory in the JAX repo to demonstrate more advanced features for now. Please take a look at https://github.com/jax-ml/jax/pull/25042 (or, more precisely, this diff) to see if you have any more specific questions that aren't answered there.
an example here to show how input/output are aliased.