getkeops / keops

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

Installation failure: KeyError: 'nvrtc' when running `pykeops.test_numpy_bindings()` #258

Closed parthe closed 2 years ago

parthe commented 2 years ago

I get the same error when running pykeops.test_torch_bindings() as well.

In [14]: pykeops.test_numpy_bindings()    
---------------------------------------------------------------------------
KeyError                                  Traceback (most recent call last)
Input In [14], in <cell line: 1>()
----> 1 pykeops.test_numpy_bindings()

File ~/.conda/envs/keops/lib/python3.10/site-packages/pykeops/numpy/test_install.py:20, in test_numpy_bindings()
     17 import pykeops.numpy as pknp
     19 my_conv = pknp.Genred(formula, var)
---> 20 if np.allclose(my_conv(x, y).flatten(), expected_res):
     21     pyKeOps_Message("pyKeOps with numpy bindings is working!", use_tag=False)
     22 else:

File ~/.conda/envs/keops/lib/python3.10/site-packages/pykeops/numpy/generic/generic_red.py:303, in Genred.__call__(self, backend, device_id, ranges, out, *args)
    299     device_id = default_device_id if tagCPUGPU == 1 else -1
    301 from pykeops.common.keops_io import keops_binder
--> 303 self.myconv = keops_binder["nvrtc" if tagCPUGPU else "cpp"](
    304     tagCPUGPU,
    305     tag1D2D,
    306     tagHostDevice,
    307     use_ranges,
    308     device_id,
    309     self.formula,
    310     self.aliases,
    311     len(args),
    312     dtype,
    313     "numpy",
    314     self.optional_flags,
    315 ).import_module()
    317 # N.B.: KeOps C++ expects contiguous data arrays
    318 test_contig = all(arg.flags["C_CONTIGUOUS"] for arg in args)

KeyError: 'nvrtc'
parthe commented 2 years ago

Don't know if this is relevant but I also received the following warning message

[KeOps] Warning : Cuda libraries were not detected on the system ; using cpu only mode

in spite of the fact that torch.cuda.is_available() returns True

jeanfeydy commented 2 years ago

Hi @parthe ,

Thanks for your interest in this library! I'm closing the issue as this is a duplicate for #257 (the problem is exactly the same: KeOps doesn't know where to find your CUDA headers and other development files). Hopefully, we will solve your issue quickly :-) Best regards, Jean