Enzyme icon indicating copy to clipboard operation
Enzyme copied to clipboard

Support differentiating through CUDA host code

Open tgymnich opened this issue 4 years ago • 4 comments

tgymnich avatar Feb 28 '22 16:02 tgymnich

In addition, we should at the same consider supporting hipStreams to maintain similar-ish support for both.

Or are hip-streams easier to handle @vchuravy ?

ludgerpaehler avatar Jun 14 '22 21:06 ludgerpaehler

Was just looking at the source of the particle framework our smoothed particle hydrodynamics codes here are built on top of, and differentiating through it would depend on our ability to add support for the differentiation of host-code..

For reference, here is the base framework openFPM.

Kokkos does also seem to depend on CUDA streams for the launch of its Kokkos::CUDA execution space instances.

ludgerpaehler avatar Jun 14 '22 21:06 ludgerpaehler

AMD has two complementary APIs HSA and HIP. HIP tries to follow CUDA so it should be straightforward HSA does not.

On Tue, Jun 14, 2022, 17:54 Ludger Paehler @.***> wrote:

In addition, we should at the same consider supporting hipStreams https://rocmdocs.amd.com/en/latest/ROCm_API_References/HIP_API/Stream-Management.html to maintain similar-ish support for both.

Or are hip-streams easier to handle @vchuravy https://github.com/vchuravy ?

— Reply to this email directly, view it on GitHub https://github.com/EnzymeAD/Enzyme/issues/535#issuecomment-1155747892, or unsubscribe https://github.com/notifications/unsubscribe-auth/AABDO2RGNEF5IPOXUDTR5FTVPD5RZANCNFSM5PRTNUDQ . You are receiving this because you were mentioned.Message ID: @.***>

vchuravy avatar Jun 14 '22 21:06 vchuravy

Coincidentally, Numba does actually seem to look "good" in that regard

ludgerpaehler avatar Jun 14 '22 22:06 ludgerpaehler