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

Pre-built Executable Error == cudaSuccess (8 vs. 0) invalid device function #23

Closed
jason061938 opened this issue Oct 5, 2017 · 4 comments

Comments

@jason061938
Copy link

jason061938 commented Oct 5, 2017

Hi,

I've successfully built and now rebuilt Caffe with the following parameters:

        <CpuOnlyBuild>false</CpuOnlyBuild>
        <UseCuDNN>true</UseCuDNN>
        <CudaVersion>7.5</CudaVersion>
        <!-- NOTE: If Python support is enabled, PythonDir (below) needs to be
         set to the root of your Python installation. If your Python installation
         does not contain debug libraries, debug build will not work. -->
        <PythonSupport>true</PythonSupport>
        <!-- NOTE: If Matlab support is enabled, MatlabDir (below) needs to be
         set to the root of your Matlab installation. -->
        <MatlabSupport>true</MatlabSupport>
        <CudaDependencies></CudaDependencies>

        <!-- Set CUDA architecture suitable for your GPU.
         Setting proper architecture is important to mimize your run and compile time. -->
        <CudaArchitecture>compute_30,sm_30;compute_35,sm_35;compute_50,sm_50</CudaArchitecture>

        <!-- CuDNN 4 and 5 are supported -->
        <CuDnnPath></CuDnnPath>

I left empty but I unpacked the CuDNNv4 downloaded zip to the %CUDA_PATH% location (in my case C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v7.5).

I have not done any of the deep_image_analogy build steps:

  • Edit deep_image_analogy.vcxproj under windows/deep_image_analogy to make the CUDA version in it match yours .
  • Open solution Caffe and add deep_image_analogy project.
  • Build project deep_image_analogy.

When executing the provided pre-built executable file:

deep_image_analogy.exe ../models/ ../demo/content.png ../demo/style.png ../demo/output/ 0 0.5 2 0

It results in the following error:

[libprotobuf WARNING ..\src\google\protobuf\io\coded_stream.cc:537] Reading dangerously large protocol message. If the message turns out to be larger than 2147483647 bytes, parsing will be halted for security reasons. To increase the limit (or to disable these warnings), see CodedInputStream::SetTotalBytesLimit() in google/protobuf/io/coded_stream.h.
[libprotobuf WARNING ..\src\google\protobuf\io\coded_stream.cc:78] The total number of bytes read was 574671192
[libprotobuf WARNING ..\src\google\protobuf\io\coded_stream.cc:537] Reading dangerously large protocol message. If the message turns out to be larger than 2147483647 bytes, parsing will be halted for security reasons. To increase the limit (or to disable these warnings), see CodedInputStream::SetTotalBytesLimit() in google/protobuf/io/coded_stream.h.
[libprotobuf WARNING ..\src\google\protobuf\io\coded_stream.cc:78] The total number of bytes read was 574671192
F1005 13:11:47.450531 6872 pooling_layer.cu:212] Check failed: error == cudaSuccess (8 vs. 0) invalid device function
*** Check failure stack trace: ***

I'm running CUDA 7.5, cuDNN 4, Visual Studio 2013, MATLAB R2014b and Windows 10 with GeForce GTX 770 GPU.

From what I've read invalid device function indicates a CUDA / GPU incompatibility.

The GeForce GTX 770 GPU has compute capability 3.0 https://developer.nvidia.com/cuda-gpus, so when building Caffe, setting <CudaArchitecture>compute_30,sm_30;compute_35,sm_35;compute_52,sm_52</CudaArchitecture> should be correct, no?

Any info or assistance resolving this would be greatly appreciated.

@jason061938
Copy link
Author

Update:

I've gone ahead and built the deep_image_analogy project myself and the generated executable does work for me but only at ratios 0.3 or lower.

@enhulu
Copy link

enhulu commented Oct 24, 2017

Hi, Jason, I have the same issue, could you please share how you solved the issue? Or building the project solves it?

@jason061938
Copy link
Author

Yes, by building the project myself I was able to get the executable working. For the higher ratios though you need a card with a lot of memory.

@enhulu
Copy link

enhulu commented Oct 25, 2017

@jason061938 Thanks Jason, I guess my GTX960 is too old for this project :(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants