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

Adding complex broadcasting for gradients on the GPU #1324

Merged
merged 25 commits into from
Jan 10, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
revert testing bug
ptiede committed Nov 12, 2022
commit 83ed91753d1e87f379c8676e051f0976e06a3212
6 changes: 3 additions & 3 deletions test/cuda.jl
Original file line number Diff line number Diff line change
@@ -9,7 +9,7 @@ function gradcheck_gpu(f, xs...)
grad_zygote = gradient(f, xs...)
m = FiniteDifferences.central_fdm(5,1)
grad_finite_difference = FiniteDifferences.grad(m, f, collect.(xs)...)
return all(isapprox.(collect.(grad_zygote), grad_finite_difference, atol=1e-5))
return all(isapprox.(collect.(grad_zygote), grad_finite_difference))
end


@@ -152,8 +152,8 @@ end

@testset "CUDA complex broadcasting" begin
# Issue 961 and 1121 and 1215
x = rand(Float32, 50)
y = rand(ComplexF32, 50)
x = 2*rand(Float32, 10) .- 1f0
y = 2*rand(ComplexF32, 10) .- 1f0

xgpu =cu(x)
ygpu =cu(y)