jump-dev / jump-dev/SumOfSquares.jl

Performance of GramMatrix -> AlgebraElement

Open
#358 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Julia
Stars
131
Forks
26
PR merge metrics
No merged PRs in 30d

Description

If we use `SA.AlgebraElement` with sparse coefficients, it's not going to exploit the mutability of the underlying MOI expression so it will be inefficient.
The advantage of https://github.com/jump-dev/SumOfSquares.jl/pull/355 where we first determine a the basis with `_NonZero` as coefficient (in which case sparse coefficients is very appropriate) is that we now have a basis where we actually want a dense vector of coefficients.
When the basis is fixed like the sampling basis, it's the same.
So in the `Variable.KernelBridge`, we should use a dense vector of coefficients and make sure `operate!!` is called with `add_mul` on them.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start in Variable.KernelBridge and trace the GramMatrix to AlgebraElement path, focusing on how coefficients are stored and how operate!! is invoked. Compare the fixed and _NonZero basis cases; done means the kernel bridge uses dense coefficients and calls operate!! with add_mul without changing the resulting expressions.

Written by the indexing model from the issue text.

Assessment

Tech stack
julia
Domain
performance
Issue type
Refactor
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.