You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hiya! Mac M1/M2/... are not compatible with CUDA, and so KeOps does not work. I keep getting
[KeOps] Warning : Cuda libraries were not detected on the system or could not be loaded ; using cpu only mode
[pyKeOps] Compiling pykeops cpp 25c52bb6f5 module ...
[KeOps] Warning : There were warnings or errors :
g++: error: unrecognized command-line option '-Xclang'
OK
First (unrelated) thing, I'm not really maintaining the notebooks in the tutorial folder anymore, as IIRC, they are all in the documentation in the docs/notebooks folder. I'm planning to remove this folder after checking that everything is in the doc.
For PyKeops on ARM + macOS, this is not linked with cuda and should work fine, but I opened an issue for a very similar problem (cf getkeops/keops#332) which was solved then, I hope what's in there helps you fix this.
Otherwise, feel free to open an issue there, I don't own a mac anymore, so it's hard for me to debug this.
You can also try to launch this with the conda install cxx-compiler installed.
In the meantime, the KDE can be completely replaced by
fromsklearn.neighborsimportKernelDensityasKDE
This will be slower and not pytorch-auto-differentiable, but should work fine otherwise.
Yes, this specific pipeline doesn't really have a non-keops alternative, but you can replace bandwidths by masses, which doesn't require keops, and should produce somehow similar pictures. This basically replaces a Gaussian Kernel Density Estimation (KDE) by the Distance To Measure (DTM), c.f., e.g., this tda paper.
I also forgot to mention that the GitHub workflow tests this pipeline on a mac with an M1 chip, and works fine with pykeops, with the default apple clang compiler. Can you try using the default compiler instead of gcc ?
Activity
DavidLapous commentedon Jul 5, 2024
Hey @yossibokorbleile, thanks for pointing that out;
First (unrelated) thing, I'm not really maintaining the notebooks in the tutorial folder anymore, as IIRC, they are all in the documentation in the docs/notebooks folder. I'm planning to remove this folder after checking that everything is in the doc.
For PyKeops on ARM + macOS, this is not linked with cuda and should work fine, but I opened an issue for a very similar problem (cf getkeops/keops#332) which was solved then, I hope what's in there helps you fix this.
Otherwise, feel free to open an issue there, I don't own a mac anymore, so it's hard for me to debug this.
You can also try to launch this with the
conda install cxx-compilerinstalled.In the meantime, the
KDEcan be completely replaced byThis will be slower and not pytorch-auto-differentiable, but should work fine otherwise.
yossibokorbleile commentedon Jul 5, 2024
Thanks!
Replacing KDE worked initially, until I tried
in
multipers_intro.ipynb.I will just continue with testing functionality, and ignore anything
KeOpsrelated.DavidLapous commentedon Jul 5, 2024
Yes, this specific pipeline doesn't really have a non-keops alternative, but you can replace
bandwidthsbymasses, which doesn't require keops, and should produce somehow similar pictures. This basically replaces a Gaussian Kernel Density Estimation (KDE) by the Distance To Measure (DTM), c.f., e.g., this tda paper.I also forgot to mention that the GitHub workflow tests this pipeline on a mac with an M1 chip, and works fine with pykeops, with the default apple clang compiler. Can you try using the default compiler instead of
gcc?