Skip to content

Conversation

@Louis-Pujol
Copy link
Contributor

@Louis-Pujol Louis-Pujol commented May 20, 2025

In this PR, we implement a working windows installation procedure for KeOps. It is still work in progress.

@Louis-Pujol Louis-Pujol changed the title Windows compatibility [Draft] Windows compatibility May 20, 2025
@joanglaunes joanglaunes mentioned this pull request Jun 23, 2025
@Louis-Pujol
Copy link
Contributor Author

Hi @bcharlier @jeanfeydy @joanglaunes ,

It seems that this version works. I've tested it on github action: https://github.com/Louis-Pujol/keops_multiplatform_test/actions/runs/16226947535 with python3.8 to 3.13 and without cuda: test_torch_bindings() and test_numpy_bindings() pass

This is a first step toward a clean integration, all the cpp files are in two versions: for windows with the extension _win.cpp or _win.h (from #281, so nvrtc_jit and pykeops_nvrtc are from KeOps2.1) .

I'll continue to work on it but it is at least easily testable. If you have a Windows machine, you can install it with:

pip install keopscore@git+https://github.com/Louis-Pujol/keops.git@windows-compatibility#subdirectory=keopscore
pip install pykeops@git+https://github.com/Louis-Pujol/keops.git@windows-compatibility#subdirectory=pykeops

If you test and have bugs, let me know ! Even if it works, you will have warnings about missing g++ and openmp, you can ignore them for now.

What I have done so far:

  • add a subpackage windows_compilation: standalone cmake files generator with a compile() function and detection utilities for cuda, pybind11 and Python
  • Overwrite the cuda detection in keopscore.config to make it work on windows
  • For CPU code generation: replace long by int64_t
  • other small changes that can be found by ctrl+f if os.name == "nt"

Still todo:

  • Rewrite functioning C++ code from KeOps 2.3 source files (taking inspiration from Compile v2.1 on windows with vs2019 and cuda11.3 #281)
  • Detect and use openMP if available (should be possible with cmake)
  • Overwrite keopscore.config detectors of c++ compiler and openMP

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