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

change <torch/torch.h> to <torch/extension.h> to work on windows #1

Closed
wants to merge 1 commit into from

Conversation

ausk
Copy link

@ausk ausk commented Apr 19, 2019

First, thank you for your work.

  1. If we include <torch/torch.h> in Pytorch 1.x , then it will complain:
#warning \
    "Including torch/torch.h for C++ extensions is deprecated. Please include torch/extension.h"

And in Windows, msvc will faild because fatal error C1021: 无效的预处理器命令“warning”.

Just change <torch/torch.h> to <torch/extension.h> will fix it.

  1. Also, insted install into user directory, we can build develop insted :
#python setup.py install --user
python setup.py build develop

The result is fine.
image

@ausk ausk mentioned this pull request Apr 19, 2019
@ausk ausk closed this Apr 25, 2019
@ausk ausk changed the title change <torch/torch.h> to <torch/extension.h> change <torch/torch.h> to <torch/extension.h> to work on windows Apr 25, 2019
@wudi00 wudi00 mentioned this pull request Aug 22, 2019
@Hello526 Hello526 mentioned this pull request Feb 7, 2020
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.

None yet

1 participant