multimodallearning / pytorch-mask-rcnn

Other
2.01k stars 557 forks source link

Get some warning while compiling nms #84

Closed sjytker closed 5 years ago

sjytker commented 5 years ago

warning: initialization from incompatible pointer type [-Wincompatible-pointer-types] unsigned long long mask_flat = THCudaLongTensor_data(state, mask); ^ /home/sujunyu/planercnn-master/nms/src/nms_cuda.c:37:40: warning: initialization from incompatible pointer type [-Wincompatible-pointer-types] unsigned long long mask_cpu_flat = THLongTensor_data(mask_cpu); ^ /home/sujunyu/planercnn-master/nms/src/nms_cuda.c:40:39: warning: initialization from incompatible pointer type [-Wincompatible-pointer-types] unsigned long long* remv_cpu_flat = THLongTensor_data(remv_cpu); ^ /home/sujunyu/planercnn-master/nms/src/nms_cuda.c:23:7: warning: unused variable 'boxes_dim' [-Wunused-variable] int boxes_dim = THCudaTensor_size(state, boxes, 1);

These lead to the problem " can't find nms.gpu_nms " while running the programme. I assume it is due to the unsuccessfully compilation of nms.

I've already used docker with gcc version 5.4, cuda 9.0

sjytker commented 5 years ago

solved by modifying unsigned long long into int64_t

michelbotros commented 4 years ago

@Suujy in which files do u change unsigned long long to int?

sjytker commented 4 years ago

@Suujy in which files do u change unsigned long long to int?

I don't remember. From the warning above, maybe it's nms_cuda.c?

michelbotros commented 4 years ago

Worked, also had to change the long longs to int64_t in: nms_kernel.cu nms_kernel.h thanks!