Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CPU inference/predict #19

Open
kamste opened this issue Sep 20, 2023 · 4 comments
Open

CPU inference/predict #19

kamste opened this issue Sep 20, 2023 · 4 comments

Comments

@kamste
Copy link

kamste commented Sep 20, 2023

How to modify project to be able to do predictions on CPU (on machine without GPU or pytorch-cuda configuration)? Please help

@limhoyeon
Copy link
Owner

Im sorry for late reply.

we haven`t considered the cpu enviornment, but you can simply run on the cpu by modifying our codes like...

from

a = a.cuda()
b = torch.tensor([1., 2.], device="cuda") 

to

a = a.cpu()
b = torch.tensor([1., 2.], device="cpu") 

It would take a long time to do it yourself, but it's possible...
I sorry for not being more helpful.

@kamste
Copy link
Author

kamste commented Oct 25, 2023

Hello, thank you for the reply. The python part of the project is one thing and can be done like you mentioned. The issue is with rewriting CUDA kernels from pointops in external_libs folder. This functions are working only on specific type of GPU Nvidia series. Even if python is modified like you presented above there is still part in C++/C that is working only on GPU.
My question is: how to modify the project so there is no need to use cuda kernels (like sampling_cuda_kernel.cu, knnquery_cuda_kernel.cu ... etc. ) and have this part of the project run on CPU during inference.

@limhoyeon
Copy link
Owner

As you say,, it seems that the project does not support cpu.
Im planning to modify the coda kernels c++ library to PyTorch, which can be executed on cpu. However, Im not sure when it will be fixed.

@yusufM03
Copy link

Any one has fixed the project to support CPU ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants