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

Add an example demonstrating input-output aliasing with the FFI #25042

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

dfm
Copy link
Collaborator

@dfm dfm commented Nov 21, 2024

diffbase #25041

As requested in #24986, this PR adds an FFI example that uses input-output aliasing.

Fixes #24986

Edited to add: This is the relevant diff: dfm/jax@ffi-example-refactor...ffi-example-input-output-alias

// after their first use.

ffi::Error CounterImpl(int64_t index, ffi::ResultBufferR0<ffi::S32> out) {
static std::mutex mutex;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Oh, how I'd love to see it converted to FFI state :)

@superbobry
Copy link
Collaborator

Can you rebase on main once #25041 is in please?

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.

An example for ffi input/output aliasing
3 participants