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 optimization callbacks that fire on a marker function #621

Closed
wants to merge 7 commits into from

Conversation

vchuravy
Copy link
Member

Fix #620
alternative for #599

@vchuravy
Copy link
Member Author

This doesn't suffice.

Essentially Enzyme, needs a sequence of calls that work on the CPU and GPU.
With the current autodiff_deferred implementation we have that but reusing session pointers as keys into the deferred work-queue, and those session pointers are trampolines for the CPU.

So we might still need #599 and then this PR ought to not be necessary.

ptr = gpucompiler.lookup(Enzyme, f, ad_args...)
ccall(ptr, f, ad_args...)

And then Enzyme could implement gpucompiler(::Enzyme, f, ad_args...) to perform the necessary lookup on the CPU,
and we could use the abstract interpreter to perform the same on the GPU

@vchuravy vchuravy force-pushed the vc/rework_deferred_codegen branch 2 times, most recently from 4f14a5e to a018c17 Compare September 26, 2024 07:16
@vchuravy vchuravy closed this Sep 26, 2024
@vchuravy vchuravy deleted the vc/pipeline_callbacks branch September 26, 2024 07:29
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.

1 participant