-
Notifications
You must be signed in to change notification settings - Fork 69
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
CUDA sin is broken #924
Comments
@vchuravy if you have any insights here |
So this was broken by https://github.com/EnzymeAD/Enzyme.jl/pull/915/files aka GPUCompiler 0.20 cc @maleadt if you might have any insights here. Essentially what used to happen is that for cuda code using device functions Enzyme/GPUCompiler would link in all of libdevice (aka sin, cos, etc). This is necessary since the derivative of nv_sin is nv_cos. Since ?GPUCompiler 0.20, it appears that by the time Enzyme gets it, the (from the source) unused nv_cos is dropped, leaving Enzyme.jl no implementation to use on CUDA, leading to issues. |
Yes, this PR: JuliaGPU/GPUCompiler.jl#458 specifically broke Enzyme CUDA compilation here, for the reasons above. @maleadt can we go back to having linking before codegen (otherwise we are unable to do the relevant force preservation and llvm.sin -> __nv_sin) ? |
Not easily, as that was a correctness fix for deferred-mode compilation. Changing it would re-introduce a bug. You should be able to sufficiently customize the compilation already though. Where were you currently detecting |
There was some change such (? to CUDA.jl) that nv_sin/etc is not always ebing linked in now, which means we cannot find it to generate the derivative of nv_cos.
The text was updated successfully, but these errors were encountered: