Cuda cusolver can't link in Visual studio 2013

后端 未结 1 885
无人共我
无人共我 2021-01-16 16:59

I have tried basically everything and I can\'t get vs2013 to compile and link against the cusolver library. I have tried all the sample projects that came with the cuda inst

相关标签:
1条回答
  • 2021-01-16 17:39

    I've just tested this on Windows 7 64-bit, Visual Studio 2013 Community, CUDA 7.

    1. start by opening the vectorAdd cuda sample code. Be sure you can build this code correctly. (It should be a x64 project. CUDA 7 does not support 32-bit projects or operating systems on windows.) If you can't build this correctly, your issue has nothing to do with cusolver

    2. Add the following header file at the top of vectorAdd.cu:

      #include <cusolverDn.h>
      
    3. Add the following two lines to the beginning of the main routine:

      cusolverDnHandle_t my_handle;
      cusolverDnCreate(&my_handle);
      
    4. Go to Project...vectorAdd Properties...Linker...Input...Additional Dependencies. In this field you should already find a number of libraries including cudart_static.lib. Click in this field, then click on the drop-down menu arrow on the right, then click on <Edit...> At the bottom of the list of libraries in the edit window, add cusolver.lib on its own line.

    5. Rebuild the project.

    0 讨论(0)
提交回复
热议问题