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

Merged
merged 1 commit into from
Jan 7, 2025

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

@dfm dfm requested a review from superbobry November 21, 2024 18:17
@dfm dfm self-assigned this Nov 21, 2024
// 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?

@dfm dfm force-pushed the ffi-example-input-output-alias branch from 9b73593 to a554537 Compare January 2, 2025 17:18
@dfm
Copy link
Collaborator Author

dfm commented Jan 2, 2025

@superbobry — I lost track of this, but found it when going through my backlog! Rebased. Please take a look when you get a chance. Thanks!!

@google-ml-butler google-ml-butler bot added kokoro:force-run pull ready Ready for copybara import and testing labels Jan 7, 2025
@dfm dfm force-pushed the ffi-example-input-output-alias branch from a554537 to 62656b3 Compare January 7, 2025 18:22
@copybara-service copybara-service bot merged commit f1777d5 into jax-ml:main Jan 7, 2025
23 checks passed
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.

An example for ffi input/output aliasing
4 participants