-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Fixing Windows MSVC Compatibility #10
Comments
Hi, I get the following errors while trying to install Pytorch3d
The installation commands I ran were the following, in the order of execution
I'm using Visual Studio 2019 Community. It'd be great if these errors could be fixed. Thank you! |
Hi @srxdev0619, I believe I fixed this issue in my fork. You can clone my folk and re-compile it. |
Yes! The fix works perfectly, thank you so much! |
Hi! I followed your instructions, but still failed to compile When I set types as
and when I set them as
So, I think that we may replace
Could you help me? BTW, I use Windows 10 1909, with CUDA 10.1. I use Visual Studio Community 2019 with MSVC v142 as compilers and libraries. My python version is 3.6.6 and my pytorch version is 1.7.1. |
I think this answer has solved my problem: Just comment out the line. |
🐛 Bugs / Unexpected behaviors
Fixed Windows MSVC build compatibility issues. All tests passed.
If you are using pre-compiled pytorch 1.4 and torchvision 0.5. You should make the following revisions to the pytorch source codes also to successfully compile with visual studio 2019 (MSVC 19.16.27034) and CUDA 10.1.
-static constexpr *
+static const *
-static constexpr size_t DEPTH_LIMIT = 128;
+static const size_t DEPTH_LIMIT = 128;
-explicit operator type&() { return *(this->value); }
+explicit operator type& () { return *((type*)(this->value)); }
If you are using CUDA 10.2 with pre-compiled pytorch 1.4 and torchvision 0.5, you need to check
Pytorch Issue [(https://github.com/pytorch/pytorch/issues/33203)] for patching the pytorch source code in addition.
Instructions To Reproduce the Issue:
Please include the following (depending on what the issue is):
git diff
) or code you wrotePlease also simplify the steps as much as possible so they do not require additional resources to
run, such as a private dataset.
The text was updated successfully, but these errors were encountered: