-
Notifications
You must be signed in to change notification settings - Fork 37
Description
Together with @sshin23, we are working on rebasing the interface of MadNLP on NLPModels.jl (see MadNLP/MadNLP.jl#69).
In that context, we are wondering whether it would be possible to add new functions in NLPModels' API to support both the evaluations of dense Jacobians and dense Hessians. For us, this is particularly useful when we are working on the GPU (where we want to use as many vectorized operations as possible). A dummy example of such an interface can be found here:
https://github.com/frapac/MadNLP.jl/blob/fp/dense_gpu/lib/MadNLPTests/src/MadNLPTests.jl#L245-L255
(we need to implement hess_dense!
and jac_dense!
in MadNLP right now, but we think that this is not ideal).
An ideal interface for us would be:
function hess_dense!(
nlp::AbstractNLPModel,
x::AbstractVector,
y::AbstractVector
vals::AbstractMatrix;
obj_weight::Real = one(eltype(x)),
)
function jac_dense!(
nlp::AbstractNLPModel,
x::AbstractVector,
vals::AbstractMatrix,
)
But there might be some caveats in NLPModels.jl that we are not aware of.
CC @amontoison