-
Notifications
You must be signed in to change notification settings - Fork 38
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
Question about how to use on gpu #195
Comments
I don't currently have a GPU to debug this: can you share the full stack trace so I can see if I can eyeball it? |
Yes, here it is MethodError: no method matching compute_epsilon(::Val{:central}, ::CuArray{Float64, 2, CUDA.DeviceMemory}, ::Float64, ::Float64, ::Bool)
The function `compute_epsilon` exists, but no method is defined for this combination of argument types.
Closest candidates are:
compute_epsilon(::Val{:central}, ::T, ::Real, ::Real, ::Any) where T<:Number
@ FiniteDiff C:\Users\yolha\.julia\packages\FiniteDiff\vund7\src\epsilons.jl:13
compute_epsilon(::Val{:hcentral}, ::T, ::Real, ::Real, ::Any) where T<:Number
@ FiniteDiff C:\Users\yolha\.julia\packages\FiniteDiff\vund7\src\epsilons.jl:17
compute_epsilon(::Val{:central}, ::T, ::Real, ::Real) where T<:Number
@ FiniteDiff C:\Users\yolha\.julia\packages\FiniteDiff\vund7\src\epsilons.jl:13
...
Stacktrace:
[1] #finite_difference_gradient!#9
@ C:\Users\yolha\.julia\packages\FiniteDiff\vund7\src\gradients.jl:280 [inlined]
[2] finite_difference_gradient!
@ C:\Users\yolha\.julia\packages\FiniteDiff\vund7\src\gradients.jl:228 [inlined]
[3] finite_difference_gradient(f::typeof(f), x::CuArray{Float64, 2, CUDA.DeviceMemory}, fdtype::Val{:central}, returntype::Type, inplace::Val{true}, fx::Nothing, c1::Nothing, c2::Nothing; relstep::Float64, absstep::Float64, dir::Bool)
@ FiniteDiff C:\Users\yolha\.julia\packages\FiniteDiff\vund7\src\gradients.jl:163
[4] finite_difference_gradient(f::Function, x::CuArray{Float64, 2, CUDA.DeviceMemory}, fdtype::Val{:central}, returntype::Type, inplace::Val{true}, fx::Nothing, c1::Nothing, c2::Nothing)
@ FiniteDiff C:\Users\yolha\.julia\packages\FiniteDiff\vund7\src\gradients.jl:129
[5] top-level scope
@ In[12]:3 meaning, it enters here in the code,
and breaks because x should be a number and its the array that enters. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello, I wonder why this is not working on gpu :
The text was updated successfully, but these errors were encountered: