aim-uofa / AdelaiDet

AdelaiDet is an open source toolbox for multiple instance-level detection and recognition tasks.
https://git.io/AdelaiDet
Other
3.37k stars 646 forks source link

Won't build with PyTorch 1.11 #550

Open igormp opened 2 years ago

igormp commented 2 years ago

The current code won't build with PyTorch 1.11, since it seems that they removed the TH/THC include files, as per this comment: https://github.com/open-mmlab/mmdetection3d/issues/1332#issuecomment-1085991179

The end result is this:

AdelaiDet/adet/layers/csrc/ml_nms/ml_nms.cu:4:10: fatal error: THC/THC.h: No such file or directory
    4 | #include <THC/THC.h>
      |          ^~~~~~~~~~~
compilation terminated.
ninja: build stopped: subcommand failed.
igormp commented 2 years ago

Seems like #518 fixes this issue.

vanga commented 2 years ago

I have this working on Colab with pytorch 1.11. But, I get this error on Linux, A100 with pytorch being the same version.

torch                   1.11.0+cu113
torchaudio              0.11.0+cu113
torchvision             0.12.0+cu113
/AdelaiDet/adet/layers/csrc/ml_nms/ml_nms.cu:4:10: fatal error: THC/THC.h: No such file or directory
 #include <THC/THC.h>
          ^~~~~~~~~~~
compilation terminated.
error: command '/usr/local/cuda-11.3/bin/nvcc' failed with exit code 1

is it related to cuda package then?

vanga commented 2 years ago

I got it working with the change from the PR https://github.com/aim-uofa/AdelaiDet/pull/518 and also removing line 4 as mentioned in the PR comments https://github.com/aim-uofa/AdelaiDet/blob/efab1f51e9cc892a2f8a78490b43b8118d3045da/adet/layers/csrc/ml_nms/ml_nms.cu#L4

visionKinger commented 2 years ago

I got it working with the change from the PR #518 and also removing line 4 as mentioned in the PR comments

https://github.com/aim-uofa/AdelaiDet/blob/efab1f51e9cc892a2f8a78490b43b8118d3045da/adet/layers/csrc/ml_nms/ml_nms.cu#L4

after removing the line 4,more error happened

2605759123 commented 2 years ago

I got it working with the change from the PR #518 and also removing line 4 as mentioned in the PR comments

https://github.com/aim-uofa/AdelaiDet/blob/efab1f51e9cc892a2f8a78490b43b8118d3045da/adet/layers/csrc/ml_nms/ml_nms.cu#L4

It works. Perfect!