Skip to content

fix: make hot loop alloc-free and test it#51

Merged
gdalle merged 6 commits into
mainfrom
gd/test
May 7, 2026
Merged

fix: make hot loop alloc-free and test it#51
gdalle merged 6 commits into
mainfrom
gd/test

Conversation

@gdalle
Copy link
Copy Markdown
Member

@gdalle gdalle commented May 6, 2026

  • Add a few tweaks to remove all allocations from the hot loop of PDHG and PDLP:
    • Move progress meter creation to initialization time
    • Remove string formatting
    • Replace homemade proj_box with built-in clamp (not sure why it helps)
  • Add allocation tests using Chairmarks (note that those can fail in CI due to code coverage, hence the conditional toggle in Test.yml)

@gdalle gdalle linked an issue May 6, 2026 that may be closed by this pull request
Comment thread src/algorithms/pdhg.jl Outdated
@gdalle gdalle requested a review from klamike May 6, 2026 18:52
Comment thread src/algorithms/common.jl Outdated
Comment thread src/utils/linalg.jl
Copy link
Copy Markdown
Collaborator

@klamike klamike left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM except I'd rather not have prog as part of the state. What do you think of https://github.com/JuliaDecisionFocusedLearning/CoolPDLP.jl/pull/51/changes#r3197969644

@klamike
Copy link
Copy Markdown
Collaborator

klamike commented May 6, 2026

I'll try to reproduce the 1.10 CUDA failure to see what's happening. It might be too old Julia + too new CUDA (v13)

@gdalle
Copy link
Copy Markdown
Member Author

gdalle commented May 7, 2026

Merging this since I reverted the only change you disagreed with! Thanks for the review

@gdalle gdalle merged commit 84d05cf into main May 7, 2026
7 of 8 checks passed
@gdalle gdalle deleted the gd/test branch May 7, 2026 10:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add allocation tests

2 participants