muelea / shapy

CVPR 2022 - Official code repository for the paper: Accurate 3D Body Shape Regression using Metric and Semantic Attributes.
https://shapy.is.tue.mpg.de/
305 stars 44 forks source link

Installation on Windows #10

Closed ijorquera closed 2 years ago

ijorquera commented 2 years ago

Hello, I've been trying to install the project as described in the Installation.md, but on Windows 10 instead of Ubuntu. Also, my machine has a rtx 3060, that's why I also installed CUDA 11.0 instead of 10.2 (keeping PyTorch 1.7.1 and every other requirement).

The problem I have with this method is in the last step, when I try to run python setup.py install inside mesh-mesh-intersection I get the following error:

nvcc fatal : Unsupported gpu architecture 'compute_86' error: command 'C:\\Program Files\\NVIDIA GPU Computing Toolkit\\CUDA\\v11.0\\bin\\nvcc.exe' failed with exit code 1

I wanted to know if there is a known way to run shapy on windows 10, or if there is a way to fix the above error since I wasn't able to find an answer googling by myself.

Thanks!

Edit: PS: I also have installed Visual studio 2019 with cpp desktop development, VS2019 build tools and its redistributables

ijorquera commented 2 years ago

Update: Tried running set TORCH_CUDA_ARCH_LIST=8.0 before the setup and now I don't get nvcc fatal anymore, but instead I'm getting some compilation errors:

2 errors detected in the compilation of "src/mesh_mesh_intersect_cuda_op.cu". error: command 'C:\\Program Files\\NVIDIA GPU Computing Toolkit\\CUDA\\v11.0\\bin\\nvcc.exe' failed with exit code 1

Scrolling up in the console I found these C:/Users/username/Documents/shapy3/shapy/mesh-mesh-intersection/include\aabb.hpp(34): error: attributes are not allowed here C:/Users/username/Documents/shapy3/shapy/mesh-mesh-intersection/include\triangle.hpp(33): error: attributes are not allowed here

ijorquera commented 2 years ago

Update: Tried commenting lines 34 and 33 from aabb.hpp and triangle.hpp (align(number)) and it seems to get quite far, but now I'm getting some link error (LNK2001 at mesh_mesh_intersect_cuda_op.obj and LNK1120 at mesh_mesh_intersect_cuda.cp38-win_amd64.pyd):

Creando biblioteca build\temp.win-amd64-3.8\Release\src\mesh_mesh_intersect_cuda.cp38-win_amd64.lib y objeto build\temp.win-amd64-3.8\Release\src\mesh_mesh_intersect_cuda.cp38-win_amd64.exp mesh_mesh_intersect_cuda_op.obj : error LNK2001: símbolo externo "public: long * __cdecl at::Tensor::data_ptr<long>(void)const " (??$data_ptr@J@Tensor@at@@QEBAPEAJXZ) sin resolver build\lib.win-amd64-3.8\mesh_mesh_intersect_cuda.cp38-win_amd64.pyd : fatal error LNK1120: 1 externos sin resolver error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Community\\VC\\Tools\\MSVC\\14.29.30133\\bin\\HostX86\\x64\\link.exe' failed with exit code 1120

I'm not quite sure how to work around that, maybe I'm missing something else?

Edit: sorry for the log in spanish

ijorquera commented 2 years ago

Update: Solved the last problem changing every long type in mesh_mesh_intersect_cuda_op.cu for long long (seems to be differences when using long in linux and windows)

Zevrap-81 commented 1 year ago

I am also having the same problem on windows but this solution did not solve my problem. It throws these errors now after changing long to long long " 6 errors detected in the compilation of "src/mesh_mesh_intersect_cuda_op.cu"."