getkeops / keops

KErnel OPerationS, on CPUs and GPUs, with autodiff and without memory overflows
https://www.kernel-operations.io
MIT License
1.04k stars 64 forks source link

[Question/BUG?] GPU backend only working on pykeops.config.build_type = 'Debug' #196

Closed Leguark closed 2 years ago

Leguark commented 2 years ago

Hi,

first of all thank you for this awesome work. The idea of symbolic matrices still seems like black magic to me and I am really surprised they are not attracting more attention. In any case, I am working hard to add GemPy (https://github.com/cgre-aachen/gempy) to the list of libraries using pyKeops.

I just have a fast question because the behavior is quite unexpected and narrow so maybe can help you to find some bug or something stupid in my installation.

In my current setup (gcc 8, cuda 11.2 pykeops 1.5) I have the library working perfectly for the CPU backend but for the GPU it only works when I set the build_type to debug, otherwise I get a segmentation fault error. Is this something you have encountered before?

Thanks!

joanglaunes commented 2 years ago

Hello @Leguark , Thank you ; nothing is black magic in fact unfortunately ! I am not remembering about this type of bug, but many things can be involved. I think we would need the full error messages to help you. But also, we are about to release a new version which is currently in the branch called python_engine. It has exactly the same functionality, but the inner coding and compiling method is very different. If you are ok to try it out, it may solve your problem and you can stay with this beta version until it will be released. You can install it as follows : pip install git+https://github.com/getkeops/keops.git@python_engine Please let us know if this works for you. Otherwise of course you can just send us the error messages from the current release and we will try to help you.

Leguark commented 2 years ago

I didn't know you were so far on the new compilation pipeline. I will be happy to test it.

I also notice that many of my issues come when I try to run pyKeops directly from Pycharm. In any case, if it was nothing obvious I will close the issue.

Cheers