Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: support torch>=1.11 #1041

Merged
merged 2 commits into from
Aug 13, 2022
Merged

Conversation

yihuajack
Copy link
Contributor

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

@sshaoshuai
Copy link
Collaborator

sshaoshuai commented Jul 24, 2022

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?

@yihuajack
Copy link
Contributor Author

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.

@sshaoshuai
Copy link
Collaborator

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

@sshaoshuai
Copy link
Collaborator

Hi @yihuajack ,

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

@yihuajack
Copy link
Contributor Author

Removed

Copy link
Contributor

@OrangeSodahub OrangeSodahub left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approve this improvement.

Copy link
Contributor

@OrangeSodahub OrangeSodahub left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approve this improvement.

Copy link
Collaborator

@sshaoshuai sshaoshuai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed.

@sshaoshuai sshaoshuai merged commit 9ff29e2 into open-mmlab:master Aug 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Install error with PyTorch 1.11
3 participants