facebookresearch / pytorch3d

PyTorch3D is FAIR's library of reusable components for deep learning with 3D data
https://pytorch3d.org/
Other
8.81k stars 1.32k forks source link

Trouble with installation on windows10 #1559

Closed chichuenchang closed 1 year ago

chichuenchang commented 1 year ago

❓ Questions about installation on windows

Hi, I have a RTX 2070 and here's the output of my nvidia-smi

Sun Jun 11 13:27:14 2023
+---------------------------------------------------------------------------------------+
| NVIDIA-SMI 531.14                 Driver Version: 531.14       CUDA Version: 12.1     |
|-----------------------------------------+----------------------+----------------------+
| GPU  Name                      TCC/WDDM | Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf            Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|                                         |                      |               MIG M. |
|=========================================+======================+======================|
|   0  NVIDIA GeForce RTX 2070       WDDM | 00000000:21:00.0  On |                  N/A |
|  0%   35C    P8               17W / 175W|    966MiB /  8192MiB |      1%      Default |
|                                         |                      |                  N/A |
+-----------------------------------------+----------------------+----------------------+

And I'm using CUDA11.7

nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2022 NVIDIA Corporation
Built on Tue_May__3_19:00:59_Pacific_Daylight_Time_2022
Cuda compilation tools, release 11.7, V11.7.64
Build cuda_11.7.r11.7/compiler.31294372_0

Windows 10 is 64 bit arch

PROCESSOR_ARCHITECTURE=AMD64
PROCESSOR_IDENTIFIER=Intel64 Family 6 Model 85 Stepping 4, GenuineIntel
PROCESSOR_LEVEL=6
PROCESSOR_REVISION=5504

I had a couple of issues before and did solve them by referring to #1227 and #1299, but now I'm having something not mentioned in the issues before.

Here's what I did before calling setup.py

  1. conda create new env with python=3.8
  2. install torch 1.13. pip install torch==1.13.0+cu117 torchvision==0.14.0+cu117 torchaudio==0.13.0 --extra-index-url https://download.pytorch.org/whl/cu117
  3. install fvcore and iospath pip install -U fvcore. (I used pip since somehow the conda install didn't work)
  4. Since I had the cub version error so I grabbed the cub 1.17 release https://github.com/NVIDIA/cub/releases/tag/1.17.1 Copy and overwrite the cub shipped with CUDA C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.7\include\cub
  5. To build on windows64 I grabbed the vcvars64.bat in the C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build and put it in my conda window and hit enter. image
  6. set PYTORCH3D_NO_NINJA=1
  7. set DISTUTILS_USE_SDK=1
  8. python setup.py install

The issue is I'm not getting a fatal error, instead the building process ended up into a endless loop. Here's part of the log: logs.txt I found the loops starts with a \pytorch3d\lib\site-packages\torch\include\c10/macros/Macros.h(138): warning C4067: unexpected tokens following preprocessor directive - expected a newline, and can run for hours of looping if I let it.

I was really confused of what's going on, please help!

bottler commented 1 year ago

How long is "hours"? This build is running single threaded (which is safer) and will therefore take a long time. I think it might just be slow and working. To get a sense of progress: You should see Command line warning D9002 : ignoring unknown option '-std=c++14' once per file, and there are over 60 files.

chichuenchang commented 1 year ago

Yes, I do see this warning once in a while. And I didn't really count how long I left it building on it's own, I said that because I found the repetitive console output after I get back from lunch which usually takes an hour.

But, okay I'll try another run and make sure it goes to the end.