AdelaiDet icon indicating copy to clipboard operation
AdelaiDet copied to clipboard

Won't build with PyTorch 1.11

Open igormp opened this issue 2 years ago • 5 comments

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 avatar Apr 21 '22 01:04 igormp

Seems like #518 fixes this issue.

igormp avatar Apr 21 '22 02:04 igormp

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 avatar Jun 17 '22 15:06 vanga

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

vanga avatar Jun 17 '22 15:06 vanga

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

visionKinger avatar Aug 17 '22 09:08 visionKinger

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!

2605759123 avatar Sep 03 '22 14:09 2605759123