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

Installation troubleshooting #171

Closed hypnopump closed 3 years ago

hypnopump commented 3 years ago

Hi there! Amazing library!

I'm having some problems to install the package in a Linux machine: The conda environment does have CUDA installed and I'm working with torch==1.8.1, although even the numpy tests do fail, so i suspect it must be something else...

RuntimeError                              Traceback (most recent call last)
<ipython-input-1-eb2849f7dd26> in <module>
      1 import pykeops
      2 pykeops.clean_pykeops()          # just in case old build files are still present
----> 3 pykeops.test_numpy_bindings()    # perform the compilation

~/miniconda3/envs/assistant/lib/python3.7/site-packages/pykeops/test/install.py in test_numpy_bindings()
     34         pykeops.config.build_type = "Debug"
     35         my_conv = pknp.Genred(formula, var)
---> 36         print(my_conv(x, y))
     37 
     38 

~/miniconda3/envs/assistant/lib/python3.7/site-packages/pykeops/numpy/generic/generic_red.py in __call__(self, backend, device_id, ranges, *args)
    312 
    313         out = self.myconv.genred_numpy(
--> 314             tagCpuGpu, tag1D2D, 0, device_id, ranges, nx, ny, *args
    315         )
    316 

RuntimeError: [KeOps] This KeOps shared object has been compiled without cuda support: 
 1) to perform computations on CPU, simply set tagHostDevice to 0
 2) to perform computations on GPU, please recompile the formula with a working version of cuda.
RuntimeError                              Traceback (most recent call last)
<ipython-input-2-9c28a002d77a> in <module>
      1 import pykeops
      2 pykeops.clean_pykeops()          # just in case old build files are still present
----> 3 pykeops.test_torch_bindings()    # perform the compilation

~/miniconda3/envs/assistant/lib/python3.7/site-packages/pykeops/test/install.py in test_torch_bindings()
     72         pykeops.config.build_type = "Debug"
     73         my_conv = pktorch.Genred(formula, var)
---> 74         print(my_conv(x, y))

~/miniconda3/envs/assistant/lib/python3.7/site-packages/pykeops/torch/generic/generic_red.py in __call__(self, backend, device_id, ranges, *args)
    577             nx,
    578             ny,
--> 579             *args
    580         )
    581 

~/miniconda3/envs/assistant/lib/python3.7/site-packages/pykeops/torch/generic/generic_red.py in forward(ctx, formula, aliases, backend, dtype, device_id, ranges, optional_flags, rec_multVar_highdim, nx, ny, *args)
     78 
     79         result = myconv.genred_pytorch(
---> 80             tagCPUGPU, tag1D2D, tagHostDevice, device_id, ranges, nx, ny, *args
     81         )
     82 

RuntimeError: [KeOps] This KeOps shared object has been compiled without cuda support: 
 1) to perform computations on CPU, simply set tagHostDevice to 0
 2) to perform computations on GPU, please recompile the formula with a working version of cuda.

Is there anything i should try? Thanks in advance!

hypnopump commented 3 years ago

Seems to be repeated, so closing this in favour of #170