We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
See the following tests:
ADNLPModels.jl/test/nls/nlpmodelstest.jl
Line 42 in 53a494c
ADNLPModels.jl/test/nlp/nlpmodelstest.jl
Line 25 in 53a494c
ADNLPModels.jl/test/gpu.jl
Line 28 in 53a494c
Line 18 in 53a494c
using CUDA, ADNLPModels, NLPModels, Symbolics hs6_autodiff(::Type{T}; kwargs...) where {T <: Number} = hs6_autodiff(Vector{T}; kwargs...) function hs6_autodiff(::Type{S} = Vector{Float64}; kwargs...) where {S} x0 = S([-12 // 10; 1]) f(x) = (1 - x[1])^2 c(x) = [10 * (x[2] - x[1]^2)] lcon = fill!(S(undef, 1), 0) ucon = fill!(S(undef, 1), 0) return ADNLPModel(f, x0, c, lcon, ucon, name = "hs6_autodiff"; kwargs...) end S = CuArray{Float64} function c!(cx, x) cx .= [10 * (x[2] - x[1]^2)] return cx end x0 = S([-12 // 10; 1]) output = similar(x0, 1) # nlp = hs6_autodiff(CuArray{Float64}) # ADNLPModels.SparseADJacobian(2, x -> (1 - x[1])^2, 1, c!, x0 = x0) # J = ADNLPModels.compute_jacobian_sparsity(c!, output, x0) J = Symbolics.jacobian_sparsity(c!, cx, x0)
The text was updated successfully, but these errors were encountered:
No branches or pull requests
See the following tests:
ADNLPModels.jl/test/nls/nlpmodelstest.jl
Line 42 in 53a494c
ADNLPModels.jl/test/nlp/nlpmodelstest.jl
Line 25 in 53a494c
ADNLPModels.jl/test/gpu.jl
Line 28 in 53a494c
ADNLPModels.jl/test/gpu.jl
Line 18 in 53a494c
A MWE:
The text was updated successfully, but these errors were encountered: