isl-org / Open3D

Open3D: A Modern Library for 3D Data Processing
http://www.open3d.org
Other
11.35k stars 2.29k forks source link

Creating o3d.t.geometry.PointCloud with points on CUDA takes longer than just performing analysis on the CPU #5799

Open MartinPedersenpp opened 1 year ago

MartinPedersenpp commented 1 year ago

Checklist

My Question

Hello

I am trying to utilize the GPU of my Jetson Xavier NX to perform faster dbscan algorithms, but unfortunately I have observed that when I have to create and copy my original point cloud to a o3d.t.geometry.pointcloud then it takes 2+ seconds to copy the data points to the GPU which removes the whole point of speeding up processing with the GPU.

I there a way I can troubleshoot why is is taking so long to copy the point cloud to the GPU?

I have followed the example in the 0.16 documentation and this is all I am doing, but it takes around 3 seconds to perform the whole sequence, but only 0.7 seconds to perform the dbscan which is around 0.5 seconds faster than performing it on the ARM CPU of the jetson, but overall the copying of the data to the GPU makes it slower.

device = o3d.core.Device('CUDA:0')
dtype = o3d.core.float32
grounded_point_cloud_tensor = o3d.t.geometry.PointCloud(device)
grounded_point_cloud_tensor.point.positions = o3d.core.Tensor(np.asarray(grounded_point_cloud.points), dtype, device)
clustered_labels = grounded_point_cloud_tensor.cluster_dbscan(eps=extraction_filter_cfg.eps*self.depth_multiplier, min_points=int(min_points/n), print_progress=False)
ssheorey commented 1 year ago

Hi @MartinPedersenpp we don't have a CUDA implementation for DBSCAN yet. It will run on the CPU.