lxxue / FRNN

Fixed Radius Nearest Neighbor Search on GPU
181 stars 24 forks source link

Assertion `cell_idx < G` failed #7

Closed yuhao closed 3 years ago

yuhao commented 3 years ago

I got the following error:

FRNN/frnn/csrc/grid/counting_sort.cu:92: void CountingSortNDKernel(const float *, const long *, const int *, const int *, const int *, float *, int *, int, int, int) [with D = 3]: block: [195,0,0], thread: [191,0,0] Assertion `cell_idx < G` failed

The input point cloud is at this link: .https://drive.google.com/file/d/1_Bh3qahg-zSMOG_ATeJhLwiEG8jGK7VF/view?usp=sharing. I use a K = 50 and search radius is 0.1.

lxxue commented 3 years ago

I run the following script and it doesn't throw the error:

import torch
import frnn
import numpy as np

pc = []
with open('test.out', 'rt') as f:
    for line in f.readlines():
        pc.append([float(v) for v in line.split(',')])
pc = np.array([pc])
pc = torch.cuda.FloatTensor(pc)
print(pc.shape)
print(pc)

_ = frnn.frnn_grid_points(pc, pc, lengths1=None, lengths2=None, K=50, r=0.1)
print(_)

Maybe you can try git pull and then recompile the code to make sure our FRNNs are the same before running this script.