diff --git a/.gitignore b/.gitignore index fcf7cea7..8587415a 100644 --- a/.gitignore +++ b/.gitignore @@ -132,6 +132,8 @@ src/osqp/bindings.cpp +codegen_vec_out/ +codegen_mat_out/ CMakeFiles/ INSTALL.vcxproj INSTALL.vcxproj.filters diff --git a/CMakeLists.txt b/CMakeLists.txt index 75abdbf1..a18c12e4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -48,11 +48,7 @@ FetchContent_Declare( osqp # GIT_REPOSITORY https://github.com/osqp/osqp.git GIT_REPOSITORY https://github.com/lb3825/osqp.git - # SOURCE_DIR "C:/Users/baice/Documents/GitHub/osqp" - # SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../osqp" -# GIT_TAG v1.0.0 - GIT_TAG b/develop-halpern-ci-fixes -# GIT_TAG plot + GIT_TAG develop-halpern ) list(POP_BACK CMAKE_MESSAGE_INDENT) FetchContent_MakeAvailable(osqp) diff --git a/backend/cuda/pyproject.toml b/backend/cuda/pyproject.toml index 15a1e1e7..aab40919 100644 --- a/backend/cuda/pyproject.toml +++ b/backend/cuda/pyproject.toml @@ -32,6 +32,7 @@ OSQP_ALGEBRA_BACKEND = "cuda" OSQP_EXT_MODULE_NAME = "osqp_cuda" CMAKE_CUDA_COMPILER = {env="CMAKE_CUDA_COMPILER"} CUDA_TOOLKIT_ROOT_DIR = {env="CUDA_TOOLKIT_ROOT_DIR"} +OSQP_USE_FLOAT = {env="OSQP_USE_FLOAT"} [tool.setuptools_scm] root = "../.." diff --git a/src/bindings.cpp.in b/src/bindings.cpp.in index 56b9dd18..391a6c8a 100644 --- a/src/bindings.cpp.in +++ b/src/bindings.cpp.in @@ -369,7 +369,9 @@ PYBIND11_MODULE(@OSQP_EXT_MODULE_NAME@, m) { .value("OSQP_ALGEBRA_LOAD_ERROR", OSQP_ALGEBRA_LOAD_ERROR) .value("OSQP_CODEGEN_DEFINES_ERROR", OSQP_CODEGEN_DEFINES_ERROR) .value("OSQP_DATA_NOT_INITIALIZED", OSQP_DATA_NOT_INITIALIZED) - .value("OSQP_FUNC_NOT_IMPLEMENTED", OSQP_FUNC_NOT_IMPLEMENTED); + .value("OSQP_FUNC_NOT_IMPLEMENTED", OSQP_FUNC_NOT_IMPLEMENTED) + .value("OSQP_RUNTIME_ERROR", OSQP_RUNTIME_ERROR) + .export_values(); // Preconditioner Type py::enum_(m, "osqp_precond_type", py::module_local()) @@ -467,7 +469,7 @@ PYBIND11_MODULE(@OSQP_EXT_MODULE_NAME@, m) { .def_readwrite("adaptive_rho", &OSQPSettings::adaptive_rho) .def_readwrite("adaptive_rho_interval", &OSQPSettings::adaptive_rho_interval) .def_readwrite("restart_check_interval", &OSQPSettings::restart_check_interval) - .def_readwrite("adaptive_rho_fraction", &OSQPSettings::adaptive_rho_fraction) + //.def_readwrite("adaptive_rho_fraction", &OSQPSettings::adaptive_rho_fraction) .def_readwrite("adaptive_rho_tolerance", &OSQPSettings::adaptive_rho_tolerance) .def_readwrite("pid_controller", &OSQPSettings::pid_controller) //.def_readwrite("pid_controller_sqrt", &OSQPSettings::pid_controller_sqrt) @@ -523,7 +525,7 @@ PYBIND11_MODULE(@OSQP_EXT_MODULE_NAME@, m) { .def_readonly("status_polish", &OSQPInfo::status_polish) // obj_val is readwrite because Python wrappers may overwrite this value based on status_val .def_readwrite("obj_val", &OSQPInfo::obj_val) - .def_readwrite("dual_obj_val", &OSQPInfo::dual_obj_val) + //.def_readwrite("dual_obj_val", &OSQPInfo::dual_obj_val) .def_readonly("prim_res", &OSQPInfo::prim_res) .def_readonly("dual_res", &OSQPInfo::dual_res) .def_readonly("duality_gap", &OSQPInfo::duality_gap) diff --git a/src/osqp/tests/conftest.py b/src/osqp/tests/conftest.py index f4010987..596b16b5 100644 --- a/src/osqp/tests/conftest.py +++ b/src/osqp/tests/conftest.py @@ -23,7 +23,11 @@ def pytest_generate_tests(metafunc): values.append( ('mkl', 'indirect', 1e-3, 1e-4, 3), ) - if algebra_available('cuda') and 'cuda' in algebras: + if algebra_available('cuda') and 'cuda-direct' in algebras: + values.append( + ('cuda', 'direct', 1e-2, 1e-3, 2), + ) + if algebra_available('cuda') and 'cuda-indirect' in algebras: values.append( ('cuda', 'indirect', 1e-2, 1e-3, 2), )