SciML / SciML/Optimization.jl

automatically generated lagrangian allocates

Open
#968 8 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Julia
Stars
839
Forks
100
Avg merge
20h 43m
Merged PRs (30d)
38

Description

The automatically generated lagrangian allocates a lot of memory, killing performance
https://github.com/SciML/OptimizationBase.jl/blob/main/src/OptimizationDISparseExt.jl#L121C2-L137C12

It would be nice if it could use a cache instead of recreating the _res = zeros(eltype(x), num_cons) on each invokation

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading src/OptimizationDISparseExt.jl around lines 121-137, focusing on the automatically generated Lagrangian and its _res allocation. Check how repeated invocation currently recreates zeros(eltype(x), num_cons), then measure the allocation and performance impact. Done means repeated calls use an appropriate cache without changing the Lagrangian's results.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.