JuliaNLSolvers / Optim.jl

Optimization functions for Julia
Other
1.12k stars 217 forks source link

restore allocation free maxdiff #1051

Closed annuges closed 12 months ago

annuges commented 12 months ago

The maxdiff function used in assess_convergence allocates which causes a non negligible time increase in a large-ish LBFGS problem for me.

889 switched maxdiff to a mapreduce based implementation to support gpu arrays.

Unfortunately the mapreduce now allocates for standard arrays.

This change restores the previous allocation free code for normal Arrays while still allowing gpu arrays using mapreduce

codecov[bot] commented 12 months ago

Codecov Report

Merging #1051 (2cdc4f8) into master (5fa5d61) will increase coverage by 0.03%. The diff coverage is 100.00%.

:exclamation: Current head 2cdc4f8 differs from pull request most recent head 332cc29. Consider uploading reports for the commit 332cc29 to get more accurate results

@@            Coverage Diff             @@
##           master    #1051      +/-   ##
==========================================
+ Coverage   85.29%   85.32%   +0.03%     
==========================================
  Files          43       43              
  Lines        3216     3224       +8     
==========================================
+ Hits         2743     2751       +8     
  Misses        473      473              
Files Coverage Δ
src/utilities/maxdiff.jl 100.00% <100.00%> (ø)
pkofod commented 12 months ago

thanks