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

[Fix] Fix build with cuda9.0 #1525

Merged
merged 2 commits into from
Nov 29, 2021
Merged

Conversation

grimoire
Copy link
Member

Motivation

Can not build mmcv-full with cuda9.0.

Reference
pytorch/extension-cpp#35

Modification

Replace torch/extension.h with torch/types.h

@teamwong111
Copy link
Contributor

Checked.

Copy link
Collaborator

@ZwwWayne ZwwWayne left a comment

Choose a reason for hiding this comment

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

shall we leave a note for that in case we cause the similar bug in the future?

@grimoire
Copy link
Member Author

@ZwwWayne sure. Where should I put the note? In code?

@grimoire
Copy link
Member Author

By the way, I prefer <torch/extension.h> since this seems like the official way to add custom ops.
https://pytorch.org/tutorials/advanced/cpp_extension.html

@ZwwWayne
Copy link
Collaborator

We can add a comment just in the line above line 17. I also thought we should use torch.extension.h, so I think we should notify other developers in the code. An example can be as below:

Using <torch/extension.h> is recommended in the official documentation in https://pytorch.org/tutorials/advanced/cpp_extension.html#writing-the-c-op.
However, we use torch/types.h for compatibility with CUDA 9.0

@ZwwWayne ZwwWayne merged commit 3b2139e into open-mmlab:master Nov 29, 2021
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.

4 participants