Skip to content

dxogrp/cgr-benchmarks

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

cvxgenrust Benchmarks

This reository contains the code for reproducing the numerical results in the paper "Generation of custom solvers in Rust for convex optimization".

Dependencies

  • Python 3.12 or newer
  • Rust and Cargo
  • CMake and a C/C++ build toolchain

Setup

We use uv to manage the Python environment. Once you have uv installed, create the environment and install dependencies:

make sync

This runs uv sync --frozen, which should leave the environment exactly at the versions recorded in uv.lock.

Run the full benchmark

Run the complete configured experiment:

make experiment

This target:

  1. generates cvxgenrust and CVXPYgen projects under artifacts/generated;
  2. builds the generated Rust and C drivers;
  3. runs all configured warmups and timing samples;
  4. writes results/solve_times.csv, results/environment.json, results/summary.md, and plots under results/plots;
  5. validates row counts, solver statuses, and objective-error tolerances.

The default configuration is benchmarks.toml, which uses 3 warmups, 30 timing samples, seed 10015, and the CLARABEL solver settings listed in that file.

Other commands

If results/solve_times.csv already exists, regenerate the Markdown summary and plots without rerunning benchmarks:

make report

For plots only:

make plot

Reuse existing generated projects and skip generation:

make run-skip-generate

Remove generated artifacts and result files:

make clean

The paper-style PDF plot in results/plots/solve_times.pdf is generated by:

uv run python src/paper.py

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors