mihaibujanca / dynamicfusion

Implementation of Newcombe et al. CVPR 2015 DynamicFusion paper
BSD 3-Clause "New" or "Revised" License
391 stars 105 forks source link

KinFu2 error: invalid configuration argument #53

Open LostInCode404 opened 6 years ago

LostInCode404 commented 6 years ago

This error is in the kernel call extract_normals_kernel<<<grid, block>>>(en, output); in kfusion::device::extractNormals method in tsdf_volume.cu. This occurs because value of grid dimensions in arguments is (0,1,1). The first value is set to 0 after the divup because the argument const PtrSz<Point>& points to the extractNormals function is being passed as empty(i.e. points.size is 0). So, I tracked from beginning, i.e. demo.cpp to see where the problem is.

demo.cpp calls has_image = dynamic_fusion(depth_device_); which later calls volume_->compute_points(); and volume_->compute_normals(); here. The latter one will subsequently call the extractNormals method using value of cuda::DeviceArray<Point> *cloud_; which was set to empty in the former one here, being the cause of the problem. So, I think that the problem is that volume_->compute_points(); sets the cloud as empty by calling the function fetchCloud(*cloud_buffer_);.

Moving ahead, in fetchCloud() method, there is a check which checks if the cloud is empty, else it creates a new cloud. That is fine, I checked it and new cloud is being created which is not empty. But when this function returns, it returns DeviceArray<Point>((Point*)cloud_buffer.ptr(), size);, this is itself empty because it uses a size variable which is set to 0 in line size_t size = extractCloud(volume, aff, b);.

Further, in kfusion::device::extractCloud, there is a kernel call extract_kernel<<<grid, block>>>(fs, output); which goes successful but this is the culprit that returns size as 0. The line cudaMemcpyFromSymbol (&size, output_count, sizeof(size)) sets the value of size as 0. I think this is where the problem is.

I'm not completely sure whether the problem is where I'm pointing it out to be, but that's all that I could infer. How should I go about solving this problems? Any help is appreciated. Thanks.

Edit: Does it have something to do with the __CUDA_ARCH__ checks here? OR, checks on this line.

lbq118 commented 5 years ago

I also encountered the same problem. Is your problem solved? Thanks

ktsiolis91 commented 5 years ago

Hello, I've recently cloned this project and unfortunately I encountered the same issue. Did you figure it out?? I would really appreciate any help or guidance.

Thanks!!!

LuyaooChen commented 3 years ago

I also encountered the same problem...

jinzhenmu commented 3 years ago

I also encountered the same problem...