-
Notifications
You must be signed in to change notification settings - Fork 55
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
detectron2 build on Windows 10, CUDA 10.1 works #2
Comments
Hi. Thanks a lot for your effort. I just tested the compilation using CUDA 10.0 instead of 10.1. This works as well, just use Visual Studio 2017 instead of 2019 (Community version works as well). |
The latest standard detectron2 0.11 from facebook builds without change on
CUDA 10.1
…On Fri, Apr 24, 2020 at 9:25 AM Michael Barz ***@***.***> wrote:
Hi. Thanks a lot for your effort. I just tested the compilation using CUDA
10.*0* instead of 10.1. This works as well, just use Visual Studio 2017
instead of 2019.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#2 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAK5KTI5O3JTCHY275UQEG3ROGHNBANCNFSM4JSLNDMQ>
.
|
Hi, An obvious one is the fact that my argument_spec.h file was not on "...Lib\site-packages\torch\include\torch\csrc\jit", but rather on "...Lib\site-packages\torch\include\torch\csrc\jit\runtime". Maybe that's the problem? Other two things: when using "conda install pytorch torchvision cudatoolkit=10.2 -c pytorch" it now installs PyTorch 1.5 and torchvision 0.6, which might also be problematic. My CUDA toolkit is 10.2. I am re-installing everything and trying to follow the versions mentioned. I will report back soon. |
Update: I was able to install it and run the demo. A couple of considerations:
|
FYI: |
That's very interesting! Did you change the content of argument_spec.h inside the "...\runtime" folder? That was the biggest difference I noticed from the usual path when I did it. I also forgot to mention (and I do not know if that was necessary or not), but I changed the content of the ROIAlign_cuda.cu and ROIAlignRotated_cuda.cu files on the d2 folder as well. |
no changes. Compiled inside of the Vis STudio x64 windows . |
Successfully build and run official demo:
Note: this repo is currently on v0.1 (latest: v0.1.1) therefore cannot run the official demo. |
@apiszcz Hi, have you solved the problem? I cannot find argument_spec.h either. |
Hi Team, Getting the following error:
Hey @apiszcz , Thanks a lot! |
You need to be in the x64 Native Tools shell window "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvars64.bat" |
Hey @apiszcz Gave the following error:
I have checked the "run as admin" in cl.exe properties too. Thanks a lot! |
That should work, did you try VS Community 2019?
if you don't install in that order you will have problems. |
I had VS2017 installed previously. If yes, do I need to do clean installs for all again? Thanks a lot! |
That is what I would do.
Remove everything (UNINSTALL) use the sequence I specified.
NOTE: I’m only a detectron2 user, not developer.
From: veer5551 <notifications@github.com>
Sent: Friday, May 29, 2020 3:44 PM
To: conansherry/detectron2 <detectron2@noreply.github.com>
Cc: ap <apiszcz@gmail.com>; Mention <mention@noreply.github.com>
Subject: Re: [conansherry/detectron2] detectron2 build on Windows 10, CUDA 10.1 works (#2)
I had VS2017 installed previously.
Then I installed CUDA 10.1
Then as mentioned in the readme, I updated the VS2017 with 14.11 toolset.
That might be causing the issues?
If yes, do I need to do clean installs for all again?
Thanks a lot!
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub <#2 (comment)> , or unsubscribe <https://github.com/notifications/unsubscribe-auth/AAK5KTIF43RFJGKR2SHRLN3RUAF6LANCNFSM4JSLNDMQ> . <https://github.com/notifications/beacon/AAK5KTIAS2HF7MTQ2RW4ITTRUAF6LA5CNFSM4JSLNDM2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEXVO5UY.gif>
|
Hey @apiszcz , Thanks a lot once again! |
Hey @apiszcz , Pytorch -1.5 Running with the following error now!
Running in native x64 shell Thanks a lot! |
i thought you were going to try VS 2019 community, however no big deal. |
Hey @apiszcz, Installed VS2019 (hopefully, it will not affect other projects though! not checked) log:
sys info:
Hopefully, am I getting closer to building it successfully? Thanks a lot for your help! |
Did you reinstall CUDA and CUDNN after the VS2019 install?
…On Sun, May 31, 2020 at 1:17 AM veer5551 ***@***.***> wrote:
Hey @apiszcz <https://github.com/apiszcz>,
Installed VS2019 (hopefully, it will not affect other projects though! not
checked)
However, now I am facing the same issue as #12
<#12>
log:
C:\Users\msjmf59\Documents\Projects\Auto_Labelling\Models\Pytorch\cns\detectron2\detectron2\layers\csrc\deformable\deform_conv.h(136): error: identifier "AT_CHECK" is undefined
C:\Users\msjmf59\Documents\Projects\Auto_Labelling\Models\Pytorch\cns\detectron2\detectron2\layers\csrc\deformable\deform_conv.h(184): error: identifier "AT_CHECK" is undefined
C:\Users\msjmf59\Documents\Projects\Auto_Labelling\Models\Pytorch\cns\detectron2\detectron2\layers\csrc\deformable\deform_conv.h(234): error: identifier "AT_CHECK" is undefined
C:\Users\msjmf59\Documents\Projects\Auto_Labelling\Models\Pytorch\cns\detectron2\detectron2\layers\csrc\deformable\deform_conv.h(284): error: identifier "AT_CHECK" is undefined
C:\Users\msjmf59\Documents\Projects\Auto_Labelling\Models\Pytorch\cns\detectron2\detectron2\layers\csrc\deformable\deform_conv.h(341): error: identifier "AT_CHECK" is undefined
C:/Users/msjmf59/Documents/Projects/Auto_Labelling/Models/Pytorch/cns/detectron2/detectron2/layers/csrc/deformable/deform_conv_cuda.cu(155): error: identifier "AT_CHECK" is undefined
C:/Users/msjmf59/Documents/Projects/Auto_Labelling/Models/Pytorch/cns/detectron2/detectron2/layers/csrc/deformable/deform_conv_cuda.cu(338): error: identifier "AT_CHECK" is undefined
C:/Users/msjmf59/Documents/Projects/Auto_Labelling/Models/Pytorch/cns/detectron2/detectron2/layers/csrc/deformable/deform_conv_cuda.cu(503): error: identifier "AT_CHECK" is undefined
C:/Users/msjmf59/Documents/Projects/Auto_Labelling/Models/Pytorch/cns/detectron2/detectron2/layers/csrc/deformable/deform_conv_cuda.cu(696): error: identifier "AT_CHECK" is undefined
C:/Users/msjmf59/Documents/Projects/Auto_Labelling/Models/Pytorch/cns/detectron2/detectron2/layers/csrc/deformable/deform_conv_cuda.cu(823): error: identifier "AT_CHECK" is undefined
C:/Users/msjmf59/Documents/Projects/Auto_Labelling/Models/Pytorch/cns/detectron2/detectron2/layers/csrc/deformable/deform_conv_cuda.cu(953): error: identifier "AT_CHECK" is undefined
11 errors detected in the compilation of "C:/Users/msjmf59/AppData/Local/Temp/tmpxft_00000a80_00000000-10_deform_conv_cuda.cpp1.ii".deform_conv_cuda.cu
ninja: build stopped: subcommand failed.
sys info:
sys.platform win32
Python 3.7.1 (v3.7.1:260ec2c36a, Oct 20 2018, 14:57:15) [MSC v.1915 64 bit (AMD64)]
Numpy 1.18.4
detectron2._C failed to import
DETECTRON2_ENV_MODULE <not set>
PyTorch 1.5.0+cu101
PyTorch Debug Build False
torchvision 0.6.0+cu101
CUDA available True
GPU 0 Quadro P1000
CUDA_HOME C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.1
NVCC Not Available
Pillow 7.1.2
--------------------- ----------------------------------------------------------------------------
PyTorch built with:
- C++ Version: 199711
- MSVC 191627039
- Intel(R) Math Kernel Library Version 2020.0.0 Product Build 20191125 for Intel(R) 64 architecture applications
- Intel(R) MKL-DNN v0.21.1 (Git Hash 7d2fd500bc78936d1d648ca713b901012f470dbc)
- OpenMP 200203
- CPU capability usage: AVX2
- CUDA Runtime 10.1
- NVCC architecture flags: -gencode;arch=compute_37,code=sm_37;-gencode;arch=compute_50,code=sm_50;-gencode;arch=compute_60,code=sm_60;-gencode;arch=compute_61,code=sm_61;-gencode;arch=compute_70,code=sm_70;-gencode;arch=compute_75,code=sm_75;-gencode;arch=compute_37,code=compute_37
- CuDNN 7.6.4
- Magma 2.5.2
Hopefully, am I getting closer to building it successfully?
Thanks a lot for your help!
Really Appreciate it!
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#2 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAK5KTKAPRGPLE2ZPZYY6XTRUHR5FANCNFSM4JSLNDMQ>
.
|
Yes, I did that too! Thanks! |
fyi
the code base from facebook is what you want to use
…On Sun, May 31, 2020 at 1:17 AM veer5551 ***@***.***> wrote:
Hey @apiszcz <https://github.com/apiszcz>,
Installed VS2019 (hopefully, it will not affect other projects though! not
checked)
However, now I am facing the same issue as #12
<#12>
log:
C:\Users\msjmf59\Documents\Projects\Auto_Labelling\Models\Pytorch\cns\detectron2\detectron2\layers\csrc\deformable\deform_conv.h(136): error: identifier "AT_CHECK" is undefined
C:\Users\msjmf59\Documents\Projects\Auto_Labelling\Models\Pytorch\cns\detectron2\detectron2\layers\csrc\deformable\deform_conv.h(184): error: identifier "AT_CHECK" is undefined
C:\Users\msjmf59\Documents\Projects\Auto_Labelling\Models\Pytorch\cns\detectron2\detectron2\layers\csrc\deformable\deform_conv.h(234): error: identifier "AT_CHECK" is undefined
C:\Users\msjmf59\Documents\Projects\Auto_Labelling\Models\Pytorch\cns\detectron2\detectron2\layers\csrc\deformable\deform_conv.h(284): error: identifier "AT_CHECK" is undefined
C:\Users\msjmf59\Documents\Projects\Auto_Labelling\Models\Pytorch\cns\detectron2\detectron2\layers\csrc\deformable\deform_conv.h(341): error: identifier "AT_CHECK" is undefined
C:/Users/msjmf59/Documents/Projects/Auto_Labelling/Models/Pytorch/cns/detectron2/detectron2/layers/csrc/deformable/deform_conv_cuda.cu(155): error: identifier "AT_CHECK" is undefined
C:/Users/msjmf59/Documents/Projects/Auto_Labelling/Models/Pytorch/cns/detectron2/detectron2/layers/csrc/deformable/deform_conv_cuda.cu(338): error: identifier "AT_CHECK" is undefined
C:/Users/msjmf59/Documents/Projects/Auto_Labelling/Models/Pytorch/cns/detectron2/detectron2/layers/csrc/deformable/deform_conv_cuda.cu(503): error: identifier "AT_CHECK" is undefined
C:/Users/msjmf59/Documents/Projects/Auto_Labelling/Models/Pytorch/cns/detectron2/detectron2/layers/csrc/deformable/deform_conv_cuda.cu(696): error: identifier "AT_CHECK" is undefined
C:/Users/msjmf59/Documents/Projects/Auto_Labelling/Models/Pytorch/cns/detectron2/detectron2/layers/csrc/deformable/deform_conv_cuda.cu(823): error: identifier "AT_CHECK" is undefined
C:/Users/msjmf59/Documents/Projects/Auto_Labelling/Models/Pytorch/cns/detectron2/detectron2/layers/csrc/deformable/deform_conv_cuda.cu(953): error: identifier "AT_CHECK" is undefined
11 errors detected in the compilation of "C:/Users/msjmf59/AppData/Local/Temp/tmpxft_00000a80_00000000-10_deform_conv_cuda.cpp1.ii".deform_conv_cuda.cu
ninja: build stopped: subcommand failed.
sys info:
sys.platform win32
Python 3.7.1 (v3.7.1:260ec2c36a, Oct 20 2018, 14:57:15) [MSC v.1915 64 bit (AMD64)]
Numpy 1.18.4
detectron2._C failed to import
DETECTRON2_ENV_MODULE <not set>
PyTorch 1.5.0+cu101
PyTorch Debug Build False
torchvision 0.6.0+cu101
CUDA available True
GPU 0 Quadro P1000
CUDA_HOME C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.1
NVCC Not Available
Pillow 7.1.2
--------------------- ----------------------------------------------------------------------------
PyTorch built with:
- C++ Version: 199711
- MSVC 191627039
- Intel(R) Math Kernel Library Version 2020.0.0 Product Build 20191125 for Intel(R) 64 architecture applications
- Intel(R) MKL-DNN v0.21.1 (Git Hash 7d2fd500bc78936d1d648ca713b901012f470dbc)
- OpenMP 200203
- CPU capability usage: AVX2
- CUDA Runtime 10.1
- NVCC architecture flags: -gencode;arch=compute_37,code=sm_37;-gencode;arch=compute_50,code=sm_50;-gencode;arch=compute_60,code=sm_60;-gencode;arch=compute_61,code=sm_61;-gencode;arch=compute_70,code=sm_70;-gencode;arch=compute_75,code=sm_75;-gencode;arch=compute_37,code=compute_37
- CuDNN 7.6.4
- Magma 2.5.2
Hopefully, am I getting closer to building it successfully?
Thanks a lot for your help!
Really Appreciate it!
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#2 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAK5KTKAPRGPLE2ZPZYY6XTRUHR5FANCNFSM4JSLNDMQ>
.
|
Hey @apiszcz, Built the detectron2 successfully and ran the demo! Works fine!! Thanks a lot for your help!! |
Thanks to all the comments/suggestion made here, I was able to install detectron2 (without too much hassle). PyTorch version: For some reason I can't seem to download the Running the nvidia-smi command, it says that I am running However, I am having have the following error when I attempt to train the model:
|
Hey @17sarf, For the first part for downloading torchvision 0.4.x, I can't help you much onto the error part though since I am a newbie to this domain! Thanks! |
@veer5551 thanks for the suggestion but I managed to download it by creating a conda python 3.6-based environment. I'm not sure if that was issue, but it all seems to be working now. I have |
@17sarf When you say you installed detectron=1.3 are you referring to the latest release: https://github.com/facebookresearch/detectron2/releases It looks to me that the code in this particular repository is for v0.1. Did you instead use the official repository and build from source? @veer5551 did you get your install working? What is your final setup? |
@solarflarefx yes I used official repository. |
@17sarf Got it thanks. Another question -- which command prompt are you using to build detectron2? Developer Command Prompt for VS 2019? Anaconda prompt? 5 errors detected in the compilation of "C:/Users/Windows/AppData/Local/Temp/tmpxft_00002f20_00000000-10_nms_rotated_cuda.cpp1.ii". I did change the two PyTorch files cast.h and argument_spec.h Did you have to make any changes to the .cu files? My environment: |
Hey @solarflarefx, Yes, My Installation was successful and detectron2 is working on my machine. No changes to any files. Used the official code base from Facebook for detectron2 Here is the system info : |
@veer5551 Thanks for your reply. Any idea what could be causing the nvcc.exe error I am getting above? |
@solarflarefx I used the Anaconda prompt to install detectron2. I hope you got it working now. |
@solarflarefx , Hope you got it working!! |
Hey. By using the official repo, wouldn't there be some issues building pycocotools? The latest repo requires pycocootools>=2.0.1 but the current version of pycocotool builds work for v2.0. I faced an error of an invalid identifier, localtime_r in detectron2/detectron2/layers/csrc/cocoeval/cocoeval.cpp, line 389. My system info is:
|
In detectron2\detectron2\layers\csrc\cocoeval\cocoeval.cpp |
Thanks for the reply, that worked! But now i face the problem of 5 errors detected in the compilation of "C:/Users/user/AppData/Local/Temp/tmpxft_00004348_00000000-10_nms_rotated_cuda.cpp1.ii". |
the acctual error is: this is caused by "box_iou_rotated_utils.h" not being included.
before Line 11:
in the detectron2\detectron2\layers\csrc\nms_rotated\nms_rotated_cuda.cu file. Note:
|
Thank you for this work and research, let's hope FaceBook adopts the changes for the build.
The build and initial tests are working on Windows 10.
The text was updated successfully, but these errors were encountered: