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
I am trying to run your awesome CUDA-powered k-means. For testing purposes, I would like to make it runnable also on CPU, but I am getting errors during importing because of this:
or hiding the imports of get_default_device and set_default_device (they seem to be imported after checking torch.cuda.is_available() anyway, so it should be possible)?
Unfortunately, currently there's no cpu version of kmeans, since major parts of the code is written in cuda. The changes you suggested could make it possible to import TorchPQ in cpu only environment, but you will not be able to run any of the modules.
You can take a look at fast-pytorch-kmeans, it's implemented purely in python & pytorch, you can run it on both cpu and cuda, and it's pretty fast. The only issue you might face is out-of-memory errors when your dataset or the number of desired clusters is large.
Unfortunately, currently there's no cpu version of kmeans, since major parts of the code is written in cuda.
Yeah that is exatcly what I had in mind 😄 But I probably changed my mind, the current version is fine.
You can take a look at fast-pytorch-kmeans, it's implemented purely in python & pytorch, you can run it on both cpu and cuda, and it's pretty fast. The only issue you might face is out-of-memory errors when your dataset or the number of desired clusters is large.
Hello,
I am trying to run your awesome CUDA-powered k-means. For testing purposes, I would like to make it runnable also on CPU, but I am getting errors during importing because of this:
TorchPQ/torchpq/kernels/default_device.py
Line 3 in b8bbadf
which results in:
Would you mind changing it to something like:
or hiding the imports of
get_default_device
andset_default_device
(they seem to be imported after checkingtorch.cuda.is_available()
anyway, so it should be possible)?And also getting rid / hiding this:
TorchPQ/torchpq/__init__.py
Line 22 in b8bbadf
The text was updated successfully, but these errors were encountered: