-
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
CuArray
broadcasting
#1454
Comments
With debug info:
|
@jgreener64 the forward mode assertion should no longer err that way. It for some reason has a size mismatch error come up though. If you have cycles, some minimization through the broadcast impl would definitely be helpful here. |
The forward mode error is
which certainly seems a strange one. Adding println("a ", typeof(a), " ", a, " b ", typeof(b), " ", b, " ", a == b) to the start of f(x, y)
and this for the gradient: autodiff(Forward, f, Duplicated, Duplicated(x, dx), Const(y))
The error is effectively thrown when I also tried Infiltrator.jl and Debugger.jl but didn't have much luck. |
@jgreener64 is that still the case, I thought on main that should now be fixed |
Still the case for me on 21b0762 with CUDA 5.3.4 and Julia 1.10.3. |
Is broadcasting with CUDA+Enzyme still a general issue or not? I've got some multidimensional code which works with CPU but not CUDA |
It doesn't work at the minute from what I can tell. With Enzyme 0.12.25, CUDA 5.4.2 and Julia 1.10.3 the forward mode error above has changed to:
Reverse mode will be added in JuliaGPU/CUDA.jl#2422 as I understand it. |
Ah cool to see some progress! |
That PR should work from my local tests to enable broadcast cuda kerbel
call etc, but needs some brief cuda.jl CI love .
Note that while the PR adds support for general heterogeneous code (either
device or host code was separately previously supported), it still needs
optimization after landing for full performance.
…On Thu, Jul 25, 2024 at 10:36 AM Felix Wechsler ***@***.***> wrote:
Ah cool to see some progress!
—
Reply to this email directly, view it on GitHub
<#1454 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAJTUXDDE75LWUSS36KI23TZOEEPHAVCNFSM6AAAAABH6RFYH2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDENJQGQ4TAMZZGE>
.
You are receiving this because you commented.Message ID: <EnzymeAD/Enzyme.
***@***.***>
|
@jgreener64 FYI your latest issue isn't a problem with broadcasting, but the reduction of the sum |
Broadcasting reverse support is now landed in CUDA.jl. Note that like mentioned, this does not include reductions (like sum). Please opena n issue for that on cuda.jl and cc me. |
Issue opened at JuliaGPU/CUDA.jl#2455. |
Opening this to track progress in taking gradients through
CuArray
broadcasting. With Enzyme main (a68bf83) and CUDA v5.3.4:For forward mode:
For reverse mode:
The text was updated successfully, but these errors were encountered: