Skip to content

Slack models on GPU #115

Closed
Closed
@tmigot

Description

@tmigot
using Test, NLPModels, CUDA, NLPModelsModifiers, NLPModelsTest
nlp = LINSV(CuArray{Float64})
SlackModel(nlp) # fails

fails, because we expected NLPModelMeta{S, T} if nlp is of type AbstractNLPModel{S, T} (see

mutable struct SlackModel{T, S, M <: AbstractNLPModel{T, S}} <: AbstractNLPModel{T, S}
).
However, nlp is {Float64, CuArray{Float64}} while the "slack" meta is {Float64, CuArray{Float64, 1, CUDA.Mem.DeviceBuffer}}

slackMeta = NLPModelsModifiers.slack_meta(meta) # https://github.com/JuliaSmoothOptimizers/NLPModelsModifiers.jl/blob/a9fa77496346fd5da171535295d949b570ac2f5a/src/slack-model.jl#L115

@amontoison an opinion on this? #114 is a suggestion to fix this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions