IDEA-Research / DAB-DETR

[ICLR 2022] Official implementation of the paper "DAB-DETR: Dynamic Anchor Boxes are Better Queries for DETR"
Apache License 2.0
498 stars 86 forks source link

Compiling CUDA operators error #31

Open Aliweka2020 opened 2 years ago

Aliweka2020 commented 2 years ago

when try to compile CUDA operator I get this errors:

C:/Users/Ali/DAB-DETR-main/models/dab_deformable_detr/ops/src\cuda/ms_deform_im2col_cuda.cuh(97): error: identifier "__floorf" is undefined in device code

C:/Users/Ali/DAB-DETR-main/models/dab_deformable_detr/ops/src\cuda/ms_deform_im2col_cuda.cuh(98): error: calling a host function("floorf") from a device__ function("ms_deform_attn_col2im_bilinear ") is not allowed

C:/Users/Ali/DAB-DETR-main/models/dab_deformable_detr/ops/src\cuda/ms_deform_im2col_cuda.cuh(98): error: identifier "__floorf" is undefined in device code

C:/Users/Ali/DAB-DETR-main/models/dab_deformable_detr/ops/src\cuda/ms_deform_im2col_cuda.cuh(172): error: calling a host function("floorf") from a device__ function("ms_deform_attn_col2im_bilinear_gm ") is not allowed

C:/Users/Ali/DAB-DETR-main/models/dab_deformable_detr/ops/src\cuda/ms_deform_im2col_cuda.cuh(172): error: identifier "__floorf" is undefined in device code

C:/Users/Ali/DAB-DETR-main/models/dab_deformable_detr/ops/src\cuda/ms_deform_im2col_cuda.cuh(173): error: calling a host function("floorf") from a device__ function("ms_deform_attn_col2im_bilinear_gm ") is not allowed

C:/Users/Ali/DAB-DETR-main/models/dab_deformable_detr/ops/src\cuda/ms_deform_im2col_cuda.cuh(173): error: identifier "__floorf" is undefined in device code

12 errors detected in the compilation of "C:/Users/Ali/AppData/Local/Temp/tmpxft_00002e2c_00000000-7_ms_deform_attn_cuda.cpp1.ii". error: command 'C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.2\bin\nvcc.exe' failed with exit code 1

Any suggestions......

SlongLiu commented 2 years ago

Can you provide more information about your device, environments (like the cuda version and PyTorch version), and commands used?

Aliweka2020 commented 2 years ago

I am using RTX2060 GPU with pytorch 1.10.0 + cuda 10.2 environment.

Aliweka2020 commented 2 years ago

I am running these commands

cd models/dab_deformable_detr/ops python setup.py

on windows machine

Aliweka2020 commented 2 years ago

now I get this error

image