Open yurivict opened 10 months ago
Hey!
I think there are quite a few different things there:
CMAKE_PREFIX_PATH
with .../site-packages/torch
ad hoc.nixpkgs#python3Packages.torch.dev
): https://github.com/NixOS/nixpkgs/blob/fccb6b42c3cad4e664236de94b0f9a0ea22b1d6e/pkgs/development/python-modules/torch/default.nix#L449-L451
cpp_extension
One noticeable inconvenience is that cpp_extension
tries to guess flags instead of relying on cmake or pkg-config. I suspect this is the reason we keep a copy of the headers in site-packages in the expression linked above, and it can also be seen as the reason CUDAExtension
does not support splayed CUDA installations
🐛 Describe the bug
These cmake files can't be found by cmake because cmake doesn't look in this location:
Likewise, these headers are also can't be easily found:
In order to satisfy the C++ API cmake files, headers and libraries should normally be installed under $PREFIX, for example under /usr/local/include, /usr/local/lib, etc.
They are actually properly installed when the cmake build is performed separately. So there is no need to install them with the Python module into the above paths.
Versions
n/a
cc @malfet @seemethere @jbschlosser