From f8315942fe0a98ad8ca87278b8bd9adf4d42e4ae Mon Sep 17 00:00:00 2001 From: Vineet Bansal Date: Mon, 25 May 2026 12:41:02 -0400 Subject: [PATCH 1/7] memory allocation bugfixes in wrapper; added 3.13t to cibw --- cibuildwheel.toml | 10 +- src/bindings.cpp.in | 131 ++++++++---------- src/osqp/codegen/pywrapper/bindings.cpp.jinja | 82 +++++------ 3 files changed, 108 insertions(+), 115 deletions(-) diff --git a/cibuildwheel.toml b/cibuildwheel.toml index 3661c8bf..4f6c2b2a 100644 --- a/cibuildwheel.toml +++ b/cibuildwheel.toml @@ -1,6 +1,6 @@ [tool.cibuildwheel] build = "cp3*" -skip = ["cp313t-*", "cp314t-*", "*-win32", "*-manylinux_i686", "*-musllinux_*"] +skip = ["cp314t-*", "*-win32", "*-manylinux_i686", "*-musllinux_*"] build-verbosity = 1 before-build = "rm -rf {package}/osqp_sources/build" # Install CPU-only version of torch beforehand since that allows cibuildwheel @@ -18,6 +18,14 @@ before-test = 'pip install scipy --prefer-binary' test-groups = ["test-no-nn"] test-command = "python -m pytest -s {project}/src/osqp/tests --continue-on-collection-errors --ignore={project}/src/osqp/tests/nn_test.py" +[[tool.cibuildwheel.overrides]] +# Free-threaded Python 3.13t: torch support is experimental and not available +# on all platforms, so skip the nn tests. +select = "cp313t-*" +before-test = 'pip install scipy --prefer-binary' +test-groups = ["test-no-nn"] +test-command = "python -m pytest -s {project}/src/osqp/tests --continue-on-collection-errors --ignore={project}/src/osqp/tests/nn_test.py" + [tool.cibuildwheel.pyodide] build = "cp312-pyodide_wasm32" before-test = "" diff --git a/src/bindings.cpp.in b/src/bindings.cpp.in index 6666690e..1add93f6 100644 --- a/src/bindings.cpp.in +++ b/src/bindings.cpp.in @@ -176,18 +176,18 @@ OSQPInfo* PyOSQPSolver::get_info() { } OSQPInt PyOSQPSolver::warm_start(py::object x, py::object y) { - OSQPFloat* _x; - OSQPFloat* _y; + OSQPFloat* _x = NULL; + OSQPFloat* _y = NULL; - if (x.is_none()) { - _x = NULL; - } else { - _x = (OSQPFloat *)py::array_t(x).data(); + py::array_t _x_arr, _y_arr; + + if (!x.is_none()) { + _x_arr = py::array_t(x); + _x = (OSQPFloat *)_x_arr.data(); } - if (y.is_none()) { - _y = NULL; - } else { - _y = (OSQPFloat *)py::array_t(y).data(); + if (!y.is_none()) { + _y_arr = py::array_t(y); + _y = (OSQPFloat *)_y_arr.data(); } return osqp_warm_start(this->_solver, _x, _y); @@ -214,93 +214,83 @@ OSQPInt PyOSQPSolver::update_rho(OSQPFloat rho_new) { } OSQPInt PyOSQPSolver::update_data_vec(py::object q, py::object l, py::object u) { - OSQPFloat* _q; - OSQPFloat* _l; - OSQPFloat* _u; + OSQPFloat* _q = NULL; + OSQPFloat* _l = NULL; + OSQPFloat* _u = NULL; - if (q.is_none()) { - _q = NULL; - } else { - _q = (OSQPFloat *)py::array_t(q).data(); + py::array_t _q_arr, _l_arr, _u_arr; + + if (!q.is_none()) { + _q_arr = py::array_t(q); + _q = (OSQPFloat *)_q_arr.data(); } - if (l.is_none()) { - _l = NULL; - } else { - _l = (OSQPFloat *)py::array_t(l).data(); + if (!l.is_none()) { + _l_arr = py::array_t(l); + _l = (OSQPFloat *)_l_arr.data(); } - if (u.is_none()) { - _u = NULL; - } else { - _u = (OSQPFloat *)py::array_t(u).data(); + if (!u.is_none()) { + _u_arr = py::array_t(u); + _u = (OSQPFloat *)_u_arr.data(); } return osqp_update_data_vec(this->_solver, _q, _l, _u); } OSQPInt PyOSQPSolver::update_data_mat(py::object P_x, py::object P_i, py::object A_x, py::object A_i) { - OSQPFloat* _P_x; - OSQPInt* _P_i; + OSQPFloat* _P_x = NULL; + OSQPInt* _P_i = NULL; OSQPInt _P_n = 0; - OSQPFloat* _A_x; - OSQPInt* _A_i; + OSQPFloat* _A_x = NULL; + OSQPInt* _A_i = NULL; OSQPInt _A_n = 0; - if (P_x.is_none()) { - _P_x = NULL; - } else { - auto _P_x_array = py::array_t(P_x); - _P_x = (OSQPFloat *)_P_x_array.data(); - _P_n = _P_x_array.size(); + py::array_t _P_x_arr, _A_x_arr; + py::array_t _P_i_arr, _A_i_arr; + + if (!P_x.is_none()) { + _P_x_arr = py::array_t(P_x); + _P_x = (OSQPFloat *)_P_x_arr.data(); + _P_n = _P_x_arr.size(); } - if (P_i.is_none()) { - _P_i = NULL; - } else { - auto _P_i_array = py::array_t(P_i); - _P_i = (OSQPInt *)_P_i_array.data(); - _P_n = _P_i_array.size(); + if (!P_i.is_none()) { + _P_i_arr = py::array_t(P_i); + _P_i = (OSQPInt *)_P_i_arr.data(); + _P_n = _P_i_arr.size(); } - if (A_x.is_none()) { - _A_x = NULL; - } else { - auto _A_x_array = py::array_t(A_x); - _A_x = (OSQPFloat *)_A_x_array.data(); - _A_n = _A_x_array.size(); + if (!A_x.is_none()) { + _A_x_arr = py::array_t(A_x); + _A_x = (OSQPFloat *)_A_x_arr.data(); + _A_n = _A_x_arr.size(); } - if (A_i.is_none()) { - _A_i = NULL; - } else { - auto _A_i_array = py::array_t(A_i); - _A_i = (OSQPInt *)_A_i_array.data(); - _A_n = _A_i_array.size(); + if (!A_i.is_none()) { + _A_i_arr = py::array_t(A_i); + _A_i = (OSQPInt *)_A_i_arr.data(); + _A_n = _A_i_arr.size(); } return osqp_update_data_mat(this->_solver, _P_x, _P_i, _P_n, _A_x, _A_i, _A_n); } OSQPInt PyOSQPSolver::adjoint_derivative_compute(const py::object dx, const py::object dy) { - OSQPFloat* _dx; - OSQPFloat* _dy; + OSQPFloat* _dx = NULL; + OSQPFloat* _dy = NULL; - if (dx.is_none()) { - _dx = NULL; - } else { - auto _dx_array = py::array_t(dx); - _dx = (OSQPFloat *)_dx_array.data(); - } + py::array_t _dx_arr, _dy_arr; - if (dy.is_none()) { - _dy = NULL; - } else { - auto _dy_array = py::array_t(dy); - _dy = (OSQPFloat *)_dy_array.data(); + if (!dx.is_none()) { + _dx_arr = py::array_t(dx); + _dx = (OSQPFloat *)_dx_arr.data(); } + if (!dy.is_none()) { + _dy_arr = py::array_t(dy); + _dy = (OSQPFloat *)_dy_arr.data(); + } return osqp_adjoint_derivative_compute(this->_solver, _dx, _dy); - } OSQPInt PyOSQPSolver::adjoint_derivative_get_mat(CSC& dP, CSC& dA) { @@ -311,9 +301,10 @@ OSQPInt PyOSQPSolver::adjoint_derivative_get_mat(CSC& dP, CSC& dA) { } OSQPInt PyOSQPSolver::adjoint_derivative_get_vec(py::object dq, py::object dl, py::object du) { - OSQPFloat* _dq = (OSQPFloat *)py::array_t(dq).data(); - OSQPFloat* _dl = (OSQPFloat *)py::array_t(dl).data(); - OSQPFloat* _du = (OSQPFloat *)py::array_t(du).data(); + py::array_t _dq_arr(dq), _dl_arr(dl), _du_arr(du); + OSQPFloat* _dq = (OSQPFloat *)_dq_arr.data(); + OSQPFloat* _dl = (OSQPFloat *)_dl_arr.data(); + OSQPFloat* _du = (OSQPFloat *)_du_arr.data(); return osqp_adjoint_derivative_get_vec(this->_solver, _dq, _dl, _du); } diff --git a/src/osqp/codegen/pywrapper/bindings.cpp.jinja b/src/osqp/codegen/pywrapper/bindings.cpp.jinja index b8b54d15..99aa21e3 100644 --- a/src/osqp/codegen/pywrapper/bindings.cpp.jinja +++ b/src/osqp/codegen/pywrapper/bindings.cpp.jinja @@ -28,24 +28,23 @@ py::tuple solve() { } OSQPInt update_data_vec(py::object q, py::object l, py::object u) { - OSQPFloat* _q; - OSQPFloat* _l; - OSQPFloat* _u; - - if (q.is_none()) { - _q = NULL; - } else { - _q = (OSQPFloat *)py::array_t(q).data(); + OSQPFloat* _q = NULL; + OSQPFloat* _l = NULL; + OSQPFloat* _u = NULL; + + py::array_t _q_arr, _l_arr, _u_arr; + + if (!q.is_none()) { + _q_arr = py::array_t(q); + _q = (OSQPFloat *)_q_arr.data(); } - if (l.is_none()) { - _l = NULL; - } else { - _l = (OSQPFloat *)py::array_t(l).data(); + if (!l.is_none()) { + _l_arr = py::array_t(l); + _l = (OSQPFloat *)_l_arr.data(); } - if (u.is_none()) { - _u = NULL; - } else { - _u = (OSQPFloat *)py::array_t(u).data(); + if (!u.is_none()) { + _u_arr = py::array_t(u); + _u = (OSQPFloat *)_u_arr.data(); } return osqp_update_data_vec(&{{prefix}}solver, _q, _l, _u); @@ -53,43 +52,38 @@ OSQPInt update_data_vec(py::object q, py::object l, py::object u) { #if OSQP_EMBEDDED_MODE == 2 OSQPInt update_data_mat(py::object P_x, py::object P_i, py::object A_x, py::object A_i) { - OSQPFloat* _P_x; - OSQPInt* _P_i; + OSQPFloat* _P_x = NULL; + OSQPInt* _P_i = NULL; OSQPInt _P_n = 0; - OSQPFloat* _A_x; - OSQPInt* _A_i; + OSQPFloat* _A_x = NULL; + OSQPInt* _A_i = NULL; OSQPInt _A_n = 0; - if (P_x.is_none()) { - _P_x = NULL; - } else { - auto _P_x_array = py::array_t(P_x); - _P_x = (OSQPFloat *)_P_x_array.data(); - _P_n = _P_x_array.size(); + py::array_t _P_x_arr, _A_x_arr; + py::array_t _P_i_arr, _A_i_arr; + + if (!P_x.is_none()) { + _P_x_arr = py::array_t(P_x); + _P_x = (OSQPFloat *)_P_x_arr.data(); + _P_n = _P_x_arr.size(); } - if (P_i.is_none()) { - _P_i = NULL; - } else { - auto _P_i_array = py::array_t(P_i); - _P_i = (OSQPInt *)_P_i_array.data(); - _P_n = _P_i_array.size(); + if (!P_i.is_none()) { + _P_i_arr = py::array_t(P_i); + _P_i = (OSQPInt *)_P_i_arr.data(); + _P_n = _P_i_arr.size(); } - if (A_x.is_none()) { - _A_x = NULL; - } else { - auto _A_x_array = py::array_t(A_x); - _A_x = (OSQPFloat *)_A_x_array.data(); - _A_n = _A_x_array.size(); + if (!A_x.is_none()) { + _A_x_arr = py::array_t(A_x); + _A_x = (OSQPFloat *)_A_x_arr.data(); + _A_n = _A_x_arr.size(); } - if (A_i.is_none()) { - _A_i = NULL; - } else { - auto _A_i_array = py::array_t(A_i); - _A_i = (OSQPInt *)_A_i_array.data(); - _A_n = _A_i_array.size(); + if (!A_i.is_none()) { + _A_i_arr = py::array_t(A_i); + _A_i = (OSQPInt *)_A_i_arr.data(); + _A_n = _A_i_arr.size(); } return osqp_update_data_mat(&{{prefix}}solver, _P_x, _P_i, _P_n, _A_x, _A_i, _A_n); From 68f30f769392e2b072db1952767ba9013f8ce3f9 Mon Sep 17 00:00:00 2001 From: Vineet Bansal Date: Mon, 25 May 2026 12:42:42 -0400 Subject: [PATCH 2/7] Using cmake's new variables for finding python --- src/osqp/codegen/pywrapper/setup.py.jinja | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/osqp/codegen/pywrapper/setup.py.jinja b/src/osqp/codegen/pywrapper/setup.py.jinja index 9b321e15..d025f5aa 100644 --- a/src/osqp/codegen/pywrapper/setup.py.jinja +++ b/src/osqp/codegen/pywrapper/setup.py.jinja @@ -21,6 +21,9 @@ class CmdCMakeBuild(build_ext): cmake_args = [ f'-DCMAKE_LIBRARY_OUTPUT_DIRECTORY={extdir}', f'-DPYTHON_EXECUTABLE={sys.executable}', + f'-DPython_EXECUTABLE={sys.executable}', + f'-DPython3_EXECUTABLE={sys.executable}', + '-DPYBIND11_FINDPYTHON=NEW', ] build_args = [] From 8ec8322b2e642145e5de0ce3523006e9ff41423a Mon Sep 17 00:00:00 2001 From: Vineet Bansal Date: Mon, 25 May 2026 13:49:27 -0400 Subject: [PATCH 3/7] added 3.14t to build --- backend/cuda/cibuildwheel.toml | 2 +- backend/mkl/cibuildwheel.toml | 4 ++-- cibuildwheel.toml | 6 +++--- pyproject.toml | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/backend/cuda/cibuildwheel.toml b/backend/cuda/cibuildwheel.toml index f8b0b453..7c791a18 100644 --- a/backend/cuda/cibuildwheel.toml +++ b/backend/cuda/cibuildwheel.toml @@ -1,6 +1,6 @@ [tool.cibuildwheel] build = "cp3*" -skip = ["cp313t-*", "cp314t-*", "*-win32", "*-manylinux_i686", "*-musllinux_*"] +skip = ["*-win32", "*-manylinux_i686", "*-musllinux_*"] build-verbosity = 1 before-build = "rm -rf {package}/osqp_sources/build" repair-wheel-command = "" diff --git a/backend/mkl/cibuildwheel.toml b/backend/mkl/cibuildwheel.toml index c70c14cb..4c445ad6 100644 --- a/backend/mkl/cibuildwheel.toml +++ b/backend/mkl/cibuildwheel.toml @@ -1,6 +1,6 @@ [tool.cibuildwheel] build = "cp3*" -skip = ["cp313t-*", "cp314t-*", "*-win32", "*-manylinux_i686", "*-musllinux_*"] +skip = ["*-win32", "*-manylinux_i686", "*-musllinux_*"] build-verbosity = 1 before-build = "rm -rf {package}/osqp_sources/build" @@ -19,7 +19,7 @@ before-all = [ "wget -q https://registrationcenter-download.intel.com/akdlm/IRC_NAS/cd013e6c-49c4-488b-8b86-25df6693a9b7/m_BaseKit_p_2023.2.0.49398.dmg", "hdiutil attach -noverify -noautofsck m_BaseKit_p_2023.2.0.49398.dmg", "sudo /Volumes/m_BaseKit_p_2023.2.0.49398/bootstrapper.app/Contents/MacOS/bootstrapper --silent --eula accept --components intel.oneapi.mac.mkl.devel", - "pip install 'cmake==3.18.4'" + "pip install cmake" ] environment = { MKL_ROOT = "/opt/intel/oneapi/mkl/latest" } repair-wheel-command = "" diff --git a/cibuildwheel.toml b/cibuildwheel.toml index 4f6c2b2a..d3ae2a33 100644 --- a/cibuildwheel.toml +++ b/cibuildwheel.toml @@ -1,6 +1,6 @@ [tool.cibuildwheel] build = "cp3*" -skip = ["cp314t-*", "*-win32", "*-manylinux_i686", "*-musllinux_*"] +skip = ["*-win32", "*-manylinux_i686", "*-musllinux_*"] build-verbosity = 1 before-build = "rm -rf {package}/osqp_sources/build" # Install CPU-only version of torch beforehand since that allows cibuildwheel @@ -19,9 +19,9 @@ test-groups = ["test-no-nn"] test-command = "python -m pytest -s {project}/src/osqp/tests --continue-on-collection-errors --ignore={project}/src/osqp/tests/nn_test.py" [[tool.cibuildwheel.overrides]] -# Free-threaded Python 3.13t: torch support is experimental and not available +# Free-threaded Python: torch support is experimental and not available # on all platforms, so skip the nn tests. -select = "cp313t-*" +select = "cp313t-* cp314t-*" before-test = 'pip install scipy --prefer-binary' test-groups = ["test-no-nn"] test-command = "python -m pytest -s {project}/src/osqp/tests --continue-on-collection-errors --ignore={project}/src/osqp/tests/nn_test.py" diff --git a/pyproject.toml b/pyproject.toml index 29fae926..4cf3c55c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,5 +1,5 @@ [build-system] -requires = ["scikit-build-core", "pybind11"] +requires = ["scikit-build-core", "pybind11>=2.13"] build-backend = "scikit_build_core.build" [project] From 0abf88e1e7ca4c8326822cb91dd6dc6978ecb480 Mon Sep 17 00:00:00 2001 From: Vineet Bansal Date: Mon, 25 May 2026 14:22:16 -0400 Subject: [PATCH 4/7] consistent cibuildwheel version; skip building on 3.14t on windows (any algebra) --- .github/workflows/build_cuda.yml | 2 +- .github/workflows/build_cuda_windows.yml | 2 +- backend/cuda/cibuildwheel.toml | 2 +- backend/mkl/cibuildwheel.toml | 2 +- cibuildwheel.toml | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build_cuda.yml b/.github/workflows/build_cuda.yml index 3b627500..a32a008f 100644 --- a/.github/workflows/build_cuda.yml +++ b/.github/workflows/build_cuda.yml @@ -23,7 +23,7 @@ jobs: - uses: actions/checkout@master - name: Build wheels - uses: pypa/cibuildwheel@v2.23 + uses: pypa/cibuildwheel@v3.3.1 with: package-dir: backend/cuda config-file: backend/cuda/cibuildwheel.toml diff --git a/.github/workflows/build_cuda_windows.yml b/.github/workflows/build_cuda_windows.yml index b4f887ed..c0dd6020 100644 --- a/.github/workflows/build_cuda_windows.yml +++ b/.github/workflows/build_cuda_windows.yml @@ -51,7 +51,7 @@ jobs: del %TEMP%\cuda.exe - name: Build wheels - uses: pypa/cibuildwheel@v2.23 + uses: pypa/cibuildwheel@v3.3.1 with: package-dir: backend/cuda config-file: backend/cuda/cibuildwheel.toml diff --git a/backend/cuda/cibuildwheel.toml b/backend/cuda/cibuildwheel.toml index 7c791a18..ced222b6 100644 --- a/backend/cuda/cibuildwheel.toml +++ b/backend/cuda/cibuildwheel.toml @@ -1,6 +1,6 @@ [tool.cibuildwheel] build = "cp3*" -skip = ["*-win32", "*-manylinux_i686", "*-musllinux_*"] +skip = ["cp314t-win_amd64", "*-win32", "*-manylinux_i686", "*-musllinux_*"] build-verbosity = 1 before-build = "rm -rf {package}/osqp_sources/build" repair-wheel-command = "" diff --git a/backend/mkl/cibuildwheel.toml b/backend/mkl/cibuildwheel.toml index 4c445ad6..681ca99e 100644 --- a/backend/mkl/cibuildwheel.toml +++ b/backend/mkl/cibuildwheel.toml @@ -1,6 +1,6 @@ [tool.cibuildwheel] build = "cp3*" -skip = ["*-win32", "*-manylinux_i686", "*-musllinux_*"] +skip = ["cp314t-win_amd64", "*-win32", "*-manylinux_i686", "*-musllinux_*"] build-verbosity = 1 before-build = "rm -rf {package}/osqp_sources/build" diff --git a/cibuildwheel.toml b/cibuildwheel.toml index d3ae2a33..e80ad134 100644 --- a/cibuildwheel.toml +++ b/cibuildwheel.toml @@ -1,6 +1,6 @@ [tool.cibuildwheel] build = "cp3*" -skip = ["*-win32", "*-manylinux_i686", "*-musllinux_*"] +skip = ["cp314t-win_amd64", "*-win32", "*-manylinux_i686", "*-musllinux_*"] build-verbosity = 1 before-build = "rm -rf {package}/osqp_sources/build" # Install CPU-only version of torch beforehand since that allows cibuildwheel From 68aff1f25f26ebc2f5cd00445efbe5b4d15c7788 Mon Sep 17 00:00:00 2001 From: Vineet Bansal Date: Mon, 25 May 2026 14:29:42 -0400 Subject: [PATCH 5/7] installing yum-utils on linux runner --- backend/cuda/cibuildwheel.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/backend/cuda/cibuildwheel.toml b/backend/cuda/cibuildwheel.toml index ced222b6..ff800a50 100644 --- a/backend/cuda/cibuildwheel.toml +++ b/backend/cuda/cibuildwheel.toml @@ -7,6 +7,7 @@ repair-wheel-command = "" [tool.cibuildwheel.linux] before-all = [ + "yum install -y yum-utils", "yum-config-manager --add-repo https://developer.download.nvidia.com/compute/cuda/repos/rhel9/x86_64/cuda-rhel9.repo", "yum search cuda-toolkit*", "yum install -y cuda-toolkit-12-6" From f05b12b23a9f0e19ab639184e5d12422f6e0fb41 Mon Sep 17 00:00:00 2001 From: Vineet Bansal Date: Mon, 25 May 2026 14:55:04 -0400 Subject: [PATCH 6/7] using gcc 13 for cuda backend on linux --- backend/cuda/cibuildwheel.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/cuda/cibuildwheel.toml b/backend/cuda/cibuildwheel.toml index ff800a50..d06589a6 100644 --- a/backend/cuda/cibuildwheel.toml +++ b/backend/cuda/cibuildwheel.toml @@ -7,12 +7,12 @@ repair-wheel-command = "" [tool.cibuildwheel.linux] before-all = [ - "yum install -y yum-utils", + "yum install -y yum-utils gcc-toolset-13", "yum-config-manager --add-repo https://developer.download.nvidia.com/compute/cuda/repos/rhel9/x86_64/cuda-rhel9.repo", "yum search cuda-toolkit*", "yum install -y cuda-toolkit-12-6" ] -environment = { CMAKE_CUDA_COMPILER = "/usr/local/cuda-12.6/bin/nvcc" } +environment = { CMAKE_CUDA_COMPILER = "/usr/local/cuda-12.6/bin/nvcc", CC = "/opt/rh/gcc-toolset-13/root/usr/bin/gcc", CXX = "/opt/rh/gcc-toolset-13/root/usr/bin/g++" } [tool.cibuildwheel.windows] environment = { CMAKE_CUDA_COMPILER = "C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v12.6/bin/nvcc.exe", CUDA_TOOLKIT_ROOT_DIR = "C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v12.6", CMAKE_GENERATOR_TOOLSET = "cuda=C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v12.6" } From 4f57e99fba15333e04b4901aaaf6f3340fb54888 Mon Sep 17 00:00:00 2001 From: Vineet Bansal Date: Mon, 25 May 2026 15:04:17 -0400 Subject: [PATCH 7/7] reverted cuda/linux cibuildwheel to 2.23 till we have time for this --- .github/workflows/build_cuda.yml | 2 +- backend/cuda/cibuildwheel.toml | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build_cuda.yml b/.github/workflows/build_cuda.yml index a32a008f..3b627500 100644 --- a/.github/workflows/build_cuda.yml +++ b/.github/workflows/build_cuda.yml @@ -23,7 +23,7 @@ jobs: - uses: actions/checkout@master - name: Build wheels - uses: pypa/cibuildwheel@v3.3.1 + uses: pypa/cibuildwheel@v2.23 with: package-dir: backend/cuda config-file: backend/cuda/cibuildwheel.toml diff --git a/backend/cuda/cibuildwheel.toml b/backend/cuda/cibuildwheel.toml index d06589a6..ced222b6 100644 --- a/backend/cuda/cibuildwheel.toml +++ b/backend/cuda/cibuildwheel.toml @@ -7,12 +7,11 @@ repair-wheel-command = "" [tool.cibuildwheel.linux] before-all = [ - "yum install -y yum-utils gcc-toolset-13", "yum-config-manager --add-repo https://developer.download.nvidia.com/compute/cuda/repos/rhel9/x86_64/cuda-rhel9.repo", "yum search cuda-toolkit*", "yum install -y cuda-toolkit-12-6" ] -environment = { CMAKE_CUDA_COMPILER = "/usr/local/cuda-12.6/bin/nvcc", CC = "/opt/rh/gcc-toolset-13/root/usr/bin/gcc", CXX = "/opt/rh/gcc-toolset-13/root/usr/bin/g++" } +environment = { CMAKE_CUDA_COMPILER = "/usr/local/cuda-12.6/bin/nvcc" } [tool.cibuildwheel.windows] environment = { CMAKE_CUDA_COMPILER = "C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v12.6/bin/nvcc.exe", CUDA_TOOLKIT_ROOT_DIR = "C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v12.6", CMAKE_GENERATOR_TOOLSET = "cuda=C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v12.6" }