Skip to content

Fix Windows CUDA builds and CMake installation - #113

Open
LucasBoTang wants to merge 3 commits into
MIT-Lu-Lab:mainfrom
LucasBoTang:fix/windows-cuda-preprocessor
Open

LucasBoTang wants to merge 3 commits into
MIT-Lu-Lab:mainfrom
LucasBoTang:fix/windows-cuda-preprocessor

Conversation

@LucasBoTang

Copy link
Copy Markdown
Collaborator

Thanks @brynpickering for tracking down the Windows build issues in conda-forge/cupdlpx-feedstock#1.

This adds the same compiler fix upstream: enable /Zc:preprocessor for CUDA 13+ on MSVC. CUDA 12 keeps the flag disabled because it causes CUB/Thrust errors when building for all architectures.

While testing this locally, I also found and fixed a few CMake issues:

  • Debug builds failed because /O2 conflicted with /RTC1. Use CMake's optimization flags for each build type.
  • Installed headers were missing their PSLP dependencies. Install those headers and fix the include path.
  • The installed Linux CLI could not find PSLP. Add relative library paths that also work after moving the installation.
  • Require CMake 3.23 for CUDA_ARCHITECTURES=all, detect newly added source files, and let CMake detect the HIP architecture unless one is specified.

Windows builds passed with CUDA 12.9 and 13.4. All 107 Python tests passed on CUDA 12.9, as did a Debug build. Linux build and installation checks passed with CUDA 13.3 and CMake 3.23.5, including custom install directories and relocation.

CUDA 13.4 passed the basic solve tests, but the full suite hit a separate reduction buffer sizing bug. That fix will be handled separately.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant