Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
2331f40
New feat: GPU precondition
LucasBoTang Nov 14, 2025
4874ee5
New feat: synchronized A/At scaling
LucasBoTang Nov 15, 2025
1901b1e
Todo: infeasible is stucked
LucasBoTang Nov 15, 2025
8fb1d19
New feat: preconditioner prints
LucasBoTang Nov 15, 2025
732c4be
Bug fixed: objective & bound rescale
LucasBoTang Nov 16, 2025
6be829f
feat: add logging for precondition time
LucasBoTang Nov 21, 2025
73d9e91
Bug fixed: numerical issue
LucasBoTang Nov 26, 2025
055a8fa
Clean code: clang-format and align naming style
LucasBoTang Nov 27, 2025
0742da9
Clean code: rename variables
LucasBoTang Nov 27, 2025
3917ee6
Refactor: move finite-bound computation
LucasBoTang Nov 28, 2025
dddf0df
Numerical issue: back to old version
LucasBoTang Nov 29, 2025
a2651be
Code refactor: CUB DeviceReduce for bound norm
LucasBoTang Dec 12, 2025
2f7b90c
Bug fixed: typo
LucasBoTang Dec 16, 2025
90e2353
Clean code: Limit CUB headers to device_reduce to reduce compile time
LucasBoTang Dec 17, 2025
f213b5e
Clean code
LucasBoTang Jan 13, 2026
4bd6ba8
Bug fixed: warm start solution
LucasBoTang Jan 13, 2026
d5e5be1
Bug fixed: illegal memory access in bound
LucasBoTang Jan 13, 2026
d372a20
Bug fixed: norm computation on scaled bound
LucasBoTang Jan 13, 2026
ea36c2a
Revert "Bug fixed: norm computation on scaled bound"
LucasBoTang Jan 13, 2026
466cb55
Bug fixed: unused sv params
LucasBoTang Jan 13, 2026
9a12ba3
New feat: add verbose logging
LucasBoTang Jan 20, 2026
28d6453
New ver: 0.2.4
LucasBoTang Jan 20, 2026
5afbfd6
Merge branch 'main' into preconditioner-v2
LucasBoTang Jan 20, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -63,3 +63,7 @@ test/*
/_b
*.whl
*.pyc


*.txt
*.sh
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ project(cupdlpx LANGUAGES C CXX CUDA)

set(CUPDLPX_VERSION_MAJOR 0)
set(CUPDLPX_VERSION_MINOR 2)
set(CUPDLPX_VERSION_PATCH 3)
set(CUPDLPX_VERSION_PATCH 4)

set(CUPDLPX_VERSION "${CUPDLPX_VERSION_MAJOR}.${CUPDLPX_VERSION_MINOR}.${CUPDLPX_VERSION_PATCH}")
add_compile_definitions(CUPDLPX_VERSION="${CUPDLPX_VERSION}")
Expand Down
4 changes: 3 additions & 1 deletion internal/internal_types.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,9 @@ typedef struct
int num_nonzeros;
int *row_ptr;
int *col_ind;
int *row_ind;
double *val;
int *transpose_map;
} cu_sparse_matrix_csr_t;

typedef struct
Expand All @@ -46,6 +48,7 @@ typedef struct
int num_blocks_primal;
int num_blocks_dual;
int num_blocks_primal_dual;
int num_blocks_nnz;
double objective_vector_norm;
double constraint_bound_norm;
double *constraint_lower_bound_finite_val;
Expand Down Expand Up @@ -129,7 +132,6 @@ typedef struct

typedef struct
{
lp_problem_t *scaled_problem;
double *con_rescale;
double *var_rescale;
double con_bound_rescale;
Expand Down
2 changes: 1 addition & 1 deletion internal/preconditioner.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ extern "C"

rescale_info_t *rescale_problem(
const pdhg_parameters_t *params,
const lp_problem_t *original_problem);
pdhg_solver_state_t *state);

#ifdef __cplusplus
}
Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "scikit_build_core.build"

[project]
name = "cupdlpx"
version = "0.2.2"
version = "0.2.4"
description = "Python bindings for cuPDLPx (GPU-accelerated first-order LP solver)"
readme = "README.md"
license = { text = "Apache-2.0" }
Expand All @@ -25,7 +25,7 @@ wheel.packages = ["python/cupdlpx"]
sdist.include = ["tests/**", "pyproject.toml", "README.md", "LICENSE"]

[tool.scikit-build.cmake.define]
CMAKE_CUDA_ARCHITECTURES = "60;61;70;75;80;86;89;90;90-virtual"
CMAKE_CUDA_ARCHITECTURES = "all"
CMAKE_CUDA_STANDARD = "17"
CUPDLPX_BUILD_PYTHON = "ON"
CUPDLPX_BUILD_STATIC_LIB = "ON"
Expand Down
31 changes: 16 additions & 15 deletions src/cli.c
Original file line number Diff line number Diff line change
Expand Up @@ -102,21 +102,6 @@ void save_solver_summary(const cupdlpx_result_t *result, const char *output_dir,
}
fprintf(outfile, "Termination Reason: %s\n",
termination_reason_to_string(result->termination_reason));
fprintf(outfile, "Runtime (sec): %e\n", result->cumulative_time_sec);
fprintf(outfile, "Iterations Count: %d\n", result->total_count);
fprintf(outfile, "Primal Objective Value: %e\n",
result->primal_objective_value);
fprintf(outfile, "Dual Objective Value: %e\n", result->dual_objective_value);
fprintf(outfile, "Relative Primal Residual: %e\n",
result->relative_primal_residual);
fprintf(outfile, "Relative Dual Residual: %e\n",
result->relative_dual_residual);
fprintf(outfile, "Absolute Objective Gap: %e\n", result->objective_gap);
fprintf(outfile, "Relative Objective Gap: %e\n",
result->relative_objective_gap);
fprintf(outfile, "Rows: %d\n", result->num_constraints);
fprintf(outfile, "Columns: %d\n", result->num_variables);
fprintf(outfile, "Nonzeros: %d\n", result->num_nonzeros);
if (result->presolve_time > 0.0)
{
fprintf(outfile, "Presolve Status: %s\n", get_presolve_status_str(result->presolve_status));
Expand All @@ -142,6 +127,22 @@ void save_solver_summary(const cupdlpx_result_t *result, const char *output_dir,
// fprintf(outfile, "Postsolve Time (sec): %e\n", result->presolve_stats.time_postsolve);
// }
}
fprintf(outfile, "Precondition time (sec): %e\n", result->rescaling_time_sec);
fprintf(outfile, "Runtime (sec): %e\n", result->cumulative_time_sec);
fprintf(outfile, "Iterations Count: %d\n", result->total_count);
fprintf(outfile, "Primal Objective Value: %e\n",
result->primal_objective_value);
fprintf(outfile, "Dual Objective Value: %e\n", result->dual_objective_value);
fprintf(outfile, "Relative Primal Residual: %e\n",
result->relative_primal_residual);
fprintf(outfile, "Relative Dual Residual: %e\n",
result->relative_dual_residual);
fprintf(outfile, "Absolute Objective Gap: %e\n", result->objective_gap);
fprintf(outfile, "Relative Objective Gap: %e\n",
result->relative_objective_gap);
fprintf(outfile, "Rows: %d\n", result->num_constraints);
fprintf(outfile, "Columns: %d\n", result->num_variables);
fprintf(outfile, "Nonzeros: %d\n", result->num_nonzeros);
if (result->feasibility_polishing_time > 0.0)
{
fprintf(outfile, "Feasibility Polishing Time (sec): %e\n", result->feasibility_polishing_time);
Expand Down
Loading