Skip to content

Print total setup time - #1714

Merged
rapids-bot[bot] merged 2 commits into
NVIDIA:mainfrom
yuwenchen95:setup-time
Aug 14, 2026
Merged

Print total setup time#1714
rapids-bot[bot] merged 2 commits into
NVIDIA:mainfrom
yuwenchen95:setup-time

Conversation

@yuwenchen95

Copy link
Copy Markdown
Contributor

Description

Prints the cumulative barrier setup time before the true barrier solve.

Issue

Closes #1712

Signed-off-by: yuwenchen95 <yuwchen@nvidia.com>
@yuwenchen95 yuwenchen95 self-assigned this Aug 13, 2026
@yuwenchen95
yuwenchen95 requested a review from a team as a code owner August 13, 2026 13:52
@yuwenchen95
yuwenchen95 requested a review from kaatish August 13, 2026 13:52
@yuwenchen95 yuwenchen95 added non-breaking Introduces a non-breaking change improvement Improves an existing functionality barrier labels Aug 13, 2026
@yuwenchen95 yuwenchen95 added this to the 26.10 milestone Aug 13, 2026
@coderabbitai

coderabbitai Bot commented Aug 13, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 1335891b-95eb-4d61-a2d4-217f524175d6

📥 Commits

Reviewing files that changed from the base of the PR and between 2206fd5 and 5527fce.

📒 Files selected for processing (2)
  • cpp/src/barrier/barrier.cu
  • cpp/src/barrier/sparse_cholesky.cuh
💤 Files with no reviewable changes (1)
  • cpp/src/barrier/sparse_cholesky.cuh
🚧 Files skipped from review as they are similar to previous changes (1)
  • cpp/src/barrier/barrier.cu

📝 Walkthrough

Walkthrough

The barrier solver now logs cumulative setup duration before its initial time-limit check. The cuDSS analysis flow no longer logs total symbolic time.

Changes

Barrier timing logs

Layer / File(s) Summary
Update barrier timing logs
cpp/src/barrier/barrier.cu, cpp/src/barrier/sparse_cholesky.cuh
barrier_solver_t::solve logs total setup time before the initial time-limit check. The cuDSS analysis flow removes the Total symbolic time log entry.

Estimated code review effort: 1 (Trivial) | ~2 minutes

Merge Risk: ⚪ Minimal · up to 5527f

The change only adds cumulative barrier setup-time reporting before the solve and does not introduce an actionable merge-blocking risk; it is merge-ready after normal checks and review.

Suggested reviewers: kaatish, ramakrishnap-nv, chris-maes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly identifies the main change: printing total barrier setup time.
Description check ✅ Passed The description accurately explains the cumulative barrier setup-time logging change and links it to issue #1712.
Linked Issues check ✅ Passed The PR adds cumulative barrier setup-time output as required by issue #1712 and retains relevant component timings.
Out of Scope Changes check ✅ Passed The logging changes, including removal of duplicate total symbolic time, are within the stated timing-output scope.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands.

@mlubin

mlubin commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

What's an example of the full logs now with these change? Please show how the new logging looks in context.

@github-actions

github-actions Bot commented Aug 13, 2026

Copy link
Copy Markdown

CI Test Summary

✅ All 31 test job(s) passed.

@yuwenchen95

Copy link
Copy Markdown
Contributor Author

What's an example of the full logs now with these change? Please show how the new logging looks in context.

Here is the log for a portfolio optimization problem:

Setting CUDA_MODULE_LOADING to EAGER
Setting parameter barrier_dual_initial_point to 1
Reading file real_data_PO_socp.mps
Read file real_data_PO_socp.mps in 0.06 seconds
cuOpt version: 26.10.0, git hash: 6f164aec, host arch: x86_64, device archs: 103a-real
CPU: INTEL(R) XEON(R) PLATINUM 8570, threads (physical/logical): 112/224, RAM (available/total): 1900.23 / 2015.54 GiB
CUDA 12.9, device: NVIDIA B300 SXM6 AC (ID 0), VRAM: 267.68 GiB
CUDA device UUID: c60fdfe0-6265-abd2-809a-c97d6eb8f803
Problem has 2 quadratic constraints. Converting to second-order cones and solving with barrier.
Bounded 1 free variables in presolve
30 variables with no lower bound
Transforming 40 nonzero lower bound
Presolved problem: 23347 constraints 34957 variables 309513 nonzeros
Skipping Ruiz equilibration (row norm ratio 5.4, column norm ratio 5.4 < 5e4, Q coeff ratio 1.0 < 100)
Barrier solver started at 0.18 seconds
Barrier solver: 23347 constraints, 34957 variables, 309513 nonzeros


Second-order cones          : 2
Upper bounds                : 5815
Linear system               : augmented
cuDSS Version               : 0.7.1
cuDSS Threading layer       : libcudss_mtlayer_gomp.so.0
Reordering time             : 0.09s
Symbolic factorization time : 0.03s
Total symbolic time         : 0.12s
Symbolic nonzeros in factor : 2.39e+05
Total setup time            : 0.54s


                  Objective                         Infeasibility        Time
Iter   Primal              Dual                Primal   Dual    Compl.   Elapsed
  0   -2.661169453218e+02 +2.799766776001e+02 4.74e+03 1.73e+00 4.49e-02 0.5
  1   -4.692186511823e+01 +3.384595612038e+02 8.05e+02 2.08e-01 1.24e+00 0.5
  2   -9.357395793386e+00 +3.114424074523e+02 1.55e+02 9.13e-02 1.26e+00 0.6
  3   -1.244181443523e+00 +2.183736768546e+02 2.00e+01 8.54e-02 7.83e-01 0.6
  4   -4.117516086363e-01 +9.615417824305e+01 6.17e+00 7.61e-02 3.91e-01 0.6
  5   -1.880565954427e-01 +4.713620834793e+01 2.31e+00 3.98e-02 1.76e-01 0.6
  6   -7.580719171820e-02 +1.800611170353e+01 3.83e-01 9.46e-03 4.16e-02 0.6
  7   -5.589749373063e-02 +4.194829791521e+00 5.19e-02 1.42e-03 7.96e-03 0.6
  8   -5.096852161472e-02 +1.535606438649e+00 1.90e-02 5.41e-04 2.79e-03 0.6
  9   -4.739743165920e-02 +1.203997653774e+00 1.30e-02 3.73e-04 1.95e-03 0.6
 10   -4.344391270938e-02 +9.535652275771e-01 8.82e-03 2.56e-04 1.37e-03 0.6
 11   -4.111796110734e-02 +8.103824065290e-01 6.18e-03 1.82e-04 9.89e-04 0.6
 12   -3.607557670691e-02 +5.313167369263e-01 3.11e-03 9.43e-05 5.52e-04 0.6
 13   -2.929457650260e-02 +3.798476350543e-01 1.82e-03 5.65e-05 3.46e-04 0.6
 14   -2.072885480528e-02 +2.936250644753e-01 1.27e-03 3.86e-05 2.48e-04 0.6
 15   -1.728571260738e-02 +2.820915712223e-01 1.12e-03 4.01e-05 4.46e-04 0.6
 16   -8.063771939578e-03 +2.520530719362e-01 8.82e-04 3.29e-05 8.43e-04 0.6
 17   -9.196323205540e-03 +2.437528246951e-01 7.66e-04 2.12e-05 9.51e-04 0.6
 18   -6.580597354627e-03 +2.320520067259e-01 6.96e-04 9.62e-06 1.03e-03 0.6
 19   -3.666924932194e-03 +2.156180559261e-01 5.02e-04 2.47e-05 1.21e-03 0.6
 20   +1.307627496890e-02 +1.361197189640e-01 2.18e-04 1.76e-04 1.07e-03 0.6
 21   +1.958262411524e-02 +1.125731024959e-01 1.39e-04 1.77e-04 8.43e-04 0.6
 22   +2.460776364417e-02 +9.247869982436e-02 9.38e-05 2.05e-04 7.52e-04 0.6
 23   +2.702533893915e-02 +7.878902079053e-02 4.91e-05 1.45e-04 7.07e-04 0.7
 24   +2.988277868803e-02 +6.161087554934e-02 4.93e-06 8.44e-05 4.73e-04 0.7
 25   +3.500366872437e-02 +4.499636736593e-02 1.41e-06 8.07e-05 2.16e-04 0.7
 26   +3.615915237088e-02 +4.069927648677e-02 6.25e-07 4.12e-05 1.04e-04 0.7
 27   +3.634035350373e-02 +4.016307293493e-02 4.05e-07 2.70e-05 7.01e-05 0.7
 28   +3.752269530589e-02 +4.131449691367e-02 3.78e-07 2.51e-05 7.03e-04 0.7
 29   +3.868677610656e-02 +3.942286575548e-02 7.23e-08 5.90e-06 1.00e-04 0.7
 30   +3.905692722898e-02 +3.914775450604e-02 8.90e-09 7.89e-07 1.50e-05 0.7
 31   +3.910226074100e-02 +3.911241925639e-02 9.96e-10 8.99e-08 1.70e-06 0.7
 32   +3.910734001607e-02 +3.910846272555e-02 1.10e-10 9.97e-09 1.88e-07 0.7
 33   +3.910790362155e-02 +3.910802349070e-02 1.17e-11 1.07e-09 2.01e-08 0.7
 34   +3.910796414442e-02 +3.910797628800e-02 1.19e-12 1.08e-10 2.03e-09 0.7


Optimal solution found in 34 iterations and 0.702s
Objective +3.91079641e-02
Primal infeasibility (abs/rel): 3.57e-12/1.19e-12
Dual infeasibility   (abs/rel): 2.16e-10/1.08e-10
Complementarity gap  (abs/rel): 2.11e-09/2.03e-09


Barrier finished in 0.71 seconds
Dual variables for problems with quadratic constraints not returned.

@mlubin

mlubin commented Aug 13, 2026

Copy link
Copy Markdown
Contributor
Barrier solver started at 0.18 seconds
...
Total setup time            : 0.54s

Does setup time include the 0.18 seconds prior to barrier, or is it the "barrier setup time"?

@yuwenchen95

Copy link
Copy Markdown
Contributor Author
Barrier solver started at 0.18 seconds
...
Total setup time            : 0.54s

Does setup time include the 0.18 seconds prior to barrier, or is it the "barrier setup time"?

The total setup time includes 0.18s. This 0.18s includes converting user problems, barrier presolve and ruiz scaling, which should be counted in the total setup time.

@mlubin

mlubin commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

It's kinda confusing that we're including time spent prior to "Barrier solver started" but only logging this inclusive setup number when using the barrier solver and not for other solvers. Can we try to make this clearer without forcing users to check the code to understand what the timings are referring to?

@yuwenchen95

Copy link
Copy Markdown
Contributor Author

Barrier solver started at 0.18 seconds
Barrier solver: 23347 constraints, 34957 variables, 309513 nonzeros

Second-order cones : 2
Upper bounds : 5815
Linear system : augmented
cuDSS Version : 0.7.1
cuDSS Threading layer : libcudss_mtlayer_gomp.so.0
Reordering time : 0.09s
Symbolic factorization time : 0.03s
Total symbolic time : 0.12s
Symbolic nonzeros in factor : 2.39e+05
Total setup time : 0.54s

I agree current logging is confusing and indeed has overlap. Can we remove subblock timing (Barrier solver started at, Reordering time, Symbolic factorization time, Total symbolic time ) and only keep Total setup time instead? @chris-maes

@chris-maes

Copy link
Copy Markdown
Contributor

I agree current logging is confusing and indeed has overlap. Can we remove subblock timing (Barrier solver started at, Reordering time, Symbolic factorization time, Total symbolic time ) and only keep Total setup time instead? @chris-maes

I think it is valuable to know how long it took to do reordering and symbolic factorization. I would keep these.

We could remove 'Total symbolic time' since it is just the sum of these.

I'm not sure I would use "Total setup time" maybe just do something as simple as:

Elapsed time : 12.00s

This is consistent with how we measure time in the solver. We break out how much time is spent in individual long running pieces. And we also provide running elapsed time measured from the start of the solve.

We don't expect most users to look at this information. This is just to make it easier to perform some benchmarks.

@chris-maes

Copy link
Copy Markdown
Contributor

I would also keep Barrier solver start at . Again this provides valuable information and helps us break out how much time is spent in different parts of the solve.

@chris-maes

Copy link
Copy Markdown
Contributor

It's kinda confusing that we're including time spent prior to "Barrier solver started" but only logging this inclusive setup number when using the barrier solver and not for other solvers.

I would lean toward adding this PDLP and dual simplex as well. Rather than removing it for barrier.

The point is just to distinguish when we started the actual solve algorithm for the presolve phase.

Signed-off-by: yuwenchen95 <yuwchen@nvidia.com>

@chris-maes chris-maes left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM. Thanks!

@chris-maes

Copy link
Copy Markdown
Contributor

/merge

@rapids-bot
rapids-bot Bot merged commit 39f1361 into NVIDIA:main Aug 14, 2026
183 of 185 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

barrier improvement Improves an existing functionality non-breaking Introduces a non-breaking change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEA] Barrier should print out cumulative setup time

4 participants