Giter Club home page Giter Club logo

Comments (3)

vaydingul avatar vaydingul commented on June 14, 2024 1

Hi @FrancescoMandru,

The whole codebase is actually able to work in CPU, but, as you imagine, it takes a tremendous amount of time to even pass one epoch (126 hours in my case 😄 ).

To be able to work in the CPU, you should install all the dependencies in CPU mode. In this case, torch and torch-scatter can be installed easily. On the other hand, spconv can also be installed for CPU; it automatically detects your system information and shapes its build procedure according to that.

Additionally, you need to specify your CPU as the main device in the code. To do that, you should change the following line:

pytorch_device = torch.device('cuda:0')

as it is:

pytorch_device = torch.device("cpu")

Also, in cylinder_fea_generator.py file, you should change the line:

shuffled_ind = torch.randperm(pt_num, device=cur_dev)

as it is:

shuffled_ind = torch.randperm(pt_num)

After all of this, you should be able to run the code in CPU.

from cylinder3d.

xinge008 avatar xinge008 commented on June 14, 2024

From the readme of spconv (https://github.com/traveller59/spconv),
it seems that spconv requires cuda library to perform the cuda hash implementation.

In fact, I do not have a try on CPU only.

from cylinder3d.

FrancescoMandru avatar FrancescoMandru commented on June 14, 2024

Hi @xinge008, I tought it was an option to enjoy the speed up the GPU but not a necessary requirement. Usually modules work also in CPU but they are much slower. To prove this you can use a simple example with a fake dataset and it perfectly works. So no, I don't think that Spconv works only in GPU mode, I think that the problem comes from the fact that we are passinga data structure which is not suitable for this module. train_pt_fea_ten and train_grid_ten are two list and for sure they don't have a device parameter.

My only aim is to understand in detail how to prepare the input data point cloud for spconv modules and I'm struggling on this thing but honestly I'm surrending to solve this task.

from cylinder3d.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.