py-faster-rcnn
py-faster-rcnn copied to clipboard
Compilation on Windows
Hi, I'm trying to compile this python version of Faster-RCNN on Windows.
The modification was like:
if 'CUDA_PATH_V7_0' in os.environ:
home = os.environ['CUDA_PATH_V7_0']
nvcc = pjoin(home, 'bin', 'nvcc.exe')
I fixed the path to fit Windows, and conquered some minor issues. Then I compiled utils\bbox.c, nms\cpu_nms.c, and nms.cpp succesfully. However, I failed when building nms.gpu_nms. Here're the triggered errors:
error: Don't know how to compile nms/nms_kernel.cu to build\temp.win-amd64-2.7\Release\nms/nms_lernel.obj
or sometimes
TypeError: can only concatenate list (not "dist") to list
Did you successfully run this code on Windows?
anyone solved this issue?
Hello..
I was trying to use the code in windows as well..
I am using cygwin and anaconda to Build cython modules. I made the change you mentioned of 'nvcc.exe' and had to move the lib\x64 for cuda to a folder called lib64 not to alter the code..
but I still have an issue realted to MSVC I guess, even though I have Visual c++ 2008, when ever I call make in the lib directory I get this error message :
////////////////////////////////////////////////////////
python setup.py build_ext --inplace
running build_ext
Traceback (most recent call last):
File "setup.py", line 155, in
build_ext.py", line 339, in run
self.build_extensions()
File "setup.py", line 108, in build_extensions
customize_compiler_for_nvcc(self.compiler)
File "setup.py", line 81, in customize_compiler_for_nvcc
default_compiler_so = self.compiler_so
AttributeError: MSVCCompiler instance has no attribute 'compiler_so'
Makefile:2: recipe for target 'all' failed
make: *** [all] Error 1
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// I would appreciate any help and advice ..
Best Regards
@RaniemAR hi RaniemAR,I also met this problem,have you solve this?
I comment the line “default_compiler_so = self.compiler_so”, then met "can only concatenate list (not "dist") to list". Then i change the extra_compile_args to a list as xgdgsc said, i can start the VS compiler. But i met the "Dont know how to compile cu" problem.
Hi, all. Has anyone solved this issue?
I guess that the MSVCCompiler doesn't have compiler_so.
Maybe we can install Mingw32 and use
python setup.py build -c mingw32
https://github.com/cudamat/cudamat/blob/6565e63a23a2d61b046b8d115346130da05e7d31/setup.py may be helpful for using msvc
I met a a similar problem @RaniemAR All of a sudden we find solutions are similar But still not successful After such a long time,did you solved it?
caffe is not supported in windows yet
@RaniemAR I met a a similar problem
I am sorry Guys I am afraid I didn't. I had to give up trying!
I builded module manually in VS17 python3.7 @ C:\Tools\Python37 cuda10.1 @ C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.1 from lib\nms dir.
- run in cmd: "nvcc -arch=sm_52 --ptxas-options=-v -c --compiler-options /MD nms_kernel.cu" gives nms_kernel.obj
- in x64 native tools from VS: "cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -IC:\Tools\Python37\lib\site-packages\numpy\core\include -IC:\Tools\Python37\include /EHsc /Tpgpu_nms.cpp /Fogpu_nms.obj" gives gpu_nms.obj
- "link.exe /nologo /INCREMENTAL:NO /LTCG /DLL /MANIFEST:EMBED,ID=2 /MANIFESTUAC:NO "/LIBPATH:C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.1\lib\x64" /LIBPATH:C:\Tools\Python37\libs cudart.lib /EXPORT:PyInit_gpu_nms gpu_nms.obj nms_kernel.obj /OUT:gpu_nms.cp37-win_amd64.pyd"
Not sure if it works, cause for training it requres cuda compute cap 7.5, and i have only 5.2, but it builded sucessfully