OpenPCDet icon indicating copy to clipboard operation
OpenPCDet copied to clipboard

feat: support torch>=1.11

Open yihuajack opened this issue 3 years ago • 3 comments

Fix #900. Support PyTorch version >= 1.11. Referring to https://github.com/pytorch/pytorch/pull/66765 and https://github.com/pytorch/pytorch/wiki/TH-to-ATen-porting-guide.

yihuajack avatar Jul 24 '22 07:07 yihuajack

Thanks, that's useful!

Actually we have noticed this error before, have you tried to remove "include THC xxx" ? If it also works, I prefer to directly remove this line of code. Can you help on checking it and modifying your PR?

sshaoshuai avatar Jul 24 '22 13:07 sshaoshuai

I'm using torch==1.12.0+cu116. After I removed

#include <THC/THC.h>
extern THCState *state;

in the modified 10 files, I could still successfully re-build OpenPCDet. Yet I'm not sure of the behavior for torch<=1.10.

yihuajack avatar Jul 24 '22 15:07 yihuajack

Yes, I have tried it before and it should also work for torch<=1.10.

sshaoshuai avatar Jul 24 '22 16:07 sshaoshuai

Hi @yihuajack ,

Can you help to remove these lines to support higher version PyTorch? So that I can merge your PR to the master.

sshaoshuai avatar Aug 12 '22 14:08 sshaoshuai

Removed

yihuajack avatar Aug 13 '22 01:08 yihuajack