Skip to content
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

Compilation issue #8

Closed
donlk opened this issue Aug 6, 2016 · 6 comments
Closed

Compilation issue #8

donlk opened this issue Aug 6, 2016 · 6 comments

Comments

@donlk
Copy link
Contributor

donlk commented Aug 6, 2016

@mdaiter @csp256
Did you guys used CUDA 8 as a base for the implementation? I'm getting compilation errors about definitions allegedly introduced in CUDA 8.0.
Here:
nvcc fatal : Value 'sm_60' is not defined for option 'gpu-architecture' CMake Error at cunn_generated_ReLU.cu.o.cmake:203 (message): Error generating /mnt/linuxdata/Development/work/projects/sfmrecon/built/linux-x86_64/openMVG-prefix/src/openMVG-build/openMVG/features/deep/cunnproduction/CMakeFiles/cunn.dir//./cunn_generated_ReLU.cu.o
and here:
nvcc fatal : Unsupported gpu architecture 'compute_60' CMake Error at latch_cuda_generated_latch.cu.o.cmake:203 (message): Error generating /mnt/linuxdata/Development/work/projects/sfmrecon/built/linux-x86_64/openMVG-prefix/src/openMVG-build/openMVG/features/latch/CMakeFiles/latch_cuda.dir//./latch_cuda_generated_latch.cu.o

Also, i compiled Torch myself, but i did not get a THNets_CPU library as an output that is apparently required:
CMake Error: install(EXPORT "openMVG-targets" ...) includes target "deepDescriptorTHNets_static" which requires target "THNets_CPU" that is not in the export set.

And lastly, i see thnets depends on cudnn for which the usage is bound to registration here https://developer.nvidia.com/cudnn
This might complicate the build process for openMVG and violate its openness to some degree.

I'm using my own openMVG branch merged with the latest develop upstream and mdaiter's custom one:
https://github.com/donlk/openMVG/tree/gpu_matcher

@mdaiter
Copy link
Owner

mdaiter commented Aug 6, 2016

Hey @donlk ,
I did use CUDA 8.0 for this implementation, coupled with CuDNN v5.0. This was to allow for my code to run on my GTX 1080.

You can change sm_60 to sm_53 or really sm_30. All of the above should work.

I'm not too sure as to why THNets_CPU wouldn't be included in the compilation process. To ensure that this version builds, I just did a clean Git pull and recompile. It built flawlessly for me. However, I'll add in an explicit install to the openMVG_targets for you.

Give me 5 minutes.

@mdaiter
Copy link
Owner

mdaiter commented Aug 6, 2016

Hey @donlk ,
Just pushed! Could you please:

  1. Run git submodule update
  2. Run git pull ; git fetch

and test if it works?
Thanks!

@donlk
Copy link
Contributor Author

donlk commented Aug 7, 2016

Just tried it. Previous issues are gone, but there is a new one:

[ 44%] Building NVCC (Device) object openMVG/features/deep/thnets/CMakeFiles/THNets_CUDA.dir/cudnn/THNets_CUDA_generated_cunn_SpatialMaxUnpooling.cu.o /usr/include/string.h: In function ‘void* __mempcpy_inline(void*, const void*, size_t)’: /usr/include/string.h:652:42: error: ‘memcpy’ was not declared in this scope return (char *) memcpy (__dest, __src, __n) + __n; CMake Error at THNets_CUDA_generated_cunn_SpatialMaxUnpooling.cu.o.cmake:267 (message): Error generating file /mnt/linuxdata/Development/work/projects/sfmrecon/built/linux-x86_64/openMVG-prefix/src/openMVG-build/openMVG/features/deep/thnets/CMakeFiles/THNets_CUDA.dir/cudnn/./THNets_CUDA_generated_cunn_SpatialMaxUnpooling.cu.o openMVG/features/deep/thnets/CMakeFiles/THNets_CUDA.dir/build.make:461: recipe for target 'openMVG/features/deep/thnets/CMakeFiles/THNets_CUDA.dir/cudnn/THNets_CUDA_generated_cunn_SpatialMaxUnpooling.cu.o' failed make[2]: *** [openMVG/features/deep/thnets/CMakeFiles/THNets_CUDA.dir/cudnn/THNets_CUDA_generated_cunn_SpatialMaxUnpooling.cu.o] Error 1 CMakeFiles/Makefile2:1429: recipe for target 'openMVG/features/deep/thnets/CMakeFiles/THNets_CUDA.dir/all' failed make[1]: *** [openMVG/features/deep/thnets/CMakeFiles/THNets_CUDA.dir/all] Error 2 Makefile:127: recipe for target 'all' failed make: *** [all] Error 2

@mdaiter
Copy link
Owner

mdaiter commented Aug 7, 2016

@donlk this seems like a compiler error with no forced inlining, as referenced here: BVLC/caffe#4046 and here: tensorflow/tensorflow#1346 . I just added a CMake forced inlining function. Can you please retry? Thanks.

@donlk
Copy link
Contributor Author

donlk commented Aug 7, 2016

Yes you're right, i forgot i already encountered this issue in the past during OpenCV compilation which required the same solution.
It compiles fine now, though there is a runtime issue as well, for which i opened a new ticket: #10
You can close this one.

@mdaiter
Copy link
Owner

mdaiter commented Aug 7, 2016

Thanks @donlk ! I'll check out that issue ASAP.

@mdaiter mdaiter closed this as completed Aug 7, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants