CNTK icon indicating copy to clipboard operation
CNTK copied to clipboard

Does cntk support cuda 7.5?

Open holmes2016 opened this issue 10 years ago • 12 comments

I would like to build cntk with cuda 7.5 and vs2013 on windows 10. However, the MathCUDA project cannot be loaded. The error message says, "The imported project "C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\BuildCustomizations\CUDA 7.0.props" was not found." I wonder if I have to install cuda 7.0 in order to build the solution. Thanks

holmes2016 avatar Jan 29 '16 21:01 holmes2016

Hello, CNTK currently supports 7.0 only but I think it should be easy to modify it to compile with 7.5 Try doing the following: open Source\Math\MathCUDA.vcxproj and change following lines:

  1. CUDA_PATH_V7_0 to CUDA_PATH_V7_5
  2. $(VCTargetsPath)\BuildCustomizations\CUDA 7.0.props to $(VCTargetsPath)\BuildCustomizations\CUDA 7.5.props
  3. $(VCTargetsPath)\BuildCustomizations\CUDA 7.0.targets to $(VCTargetsPath)\BuildCustomizations\CUDA 7.5.targets

Hope this helps, let me know if you still have problems compiling the code.

Alexey-Kamenev avatar Jan 29 '16 23:01 Alexey-Kamenev

Many thanks, Alexey, I got another problem. The EvaDll project cannot be loaded due to an error, "$(UsesCuda) evaluates to "" instead of a boolean". Do you have any idea about it? Thanks,

holmes2016 avatar Feb 03 '16 23:02 holmes2016

Hmm, I don't know what's the problem yet, however, if everything else builds fine, you can still run CNTK even without EvalDll (which is really just a sample demonstrating how to load trained models). I know it's not ideal but hopefully will unblock you for now.

Alexey-Kamenev avatar Feb 03 '16 23:02 Alexey-Kamenev

I built CNTK with CUDA 7.5. Here are the changes I made:

In ActionsLib.vcxproj, MathCUDA.vcxproj, and Math.vcxproj, there are a number of references to CUDA dll's, e.g. "cudart64_70.dll". Change the "70" version suffix to "75" , e.g. "cudart64_75.dll'

In MathCUDA.vcsproj, change the CudaPath attribute from "$(CUDA_PATH_V7_0)" to "$(CUDA_PATH_V7_5)". There is a reference to "CUDA 7.0.props" - change this to "CUDA 7.5.props". Similarly, change "CUDA 7.0.targets" to "CUDA 7.5.targets".

You can download a copy of my files here: https://www.dropbox.com/sh/7cbuxz2rde9gjxe/AADPaPS5UtovRuQFbBfnb3W7a?dl=0

deprecatedslocum avatar Feb 11 '16 23:02 deprecatedslocum

Great! Thanks a lot. Actually I haven't gotten a successful build yet. I have another mess - both vs2012 and vs2013 installed on my machine, where I also run theano. Not sure if the issue of having two compilers has been addressed.

holmes2016 avatar Feb 12 '16 22:02 holmes2016

I have VS 2013 and 2015 on my machine. I think I did the build with 2013? What problem are you having with your build?

On Feb 12, 2016, at 5:50 PM, holmes2016 [email protected] wrote:

Great! Thanks a lot. Actually I haven't gotten a successful build yet. I have another mess - both vs2012 and vs2013 installed on my machine, where I also run theano. Not sure if the issue of having two compilers has been addressed.

— Reply to this email directly or view it on GitHub.

deprecatedslocum avatar Feb 13 '16 00:02 deprecatedslocum

After applied the changes made in your project files, I still got the following when build math project: Error 1 error MSB4062: The "Nvda.Build.CudaTasks.SanitizePaths" task could not be loaded from the assembly C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\BuildCustomizations\Nvda.Build.CudaTasks.v7.5.dll. Could not load file or assembly 'Microsoft.Build.Utilities.v3.5, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified. Confirm that the declaration is correct, that the assembly and all its dependencies are available, and that the task contains a public class that implements Microsoft.Build.Framework.ITask. C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\BuildCustomizations\CUDA 7.5.targets 160 9 MathCUDA Error 2 error C2440: '' : cannot convert from 'initializer-list' to 'std::array<size_t,0x02>' (TensorView.cpp) c:\users\jlu\projects\cntk\source\math\TensorView.h 32 1 Math

holmes2016 avatar Feb 17 '16 17:02 holmes2016

Sorry, no idea what's going on there.

On Wed, Feb 17, 2016 at 9:12 AM, holmes2016 [email protected] wrote:

After applied the changes made in your project files, I still got the following when build math project: Error 1 error MSB4062: The "Nvda.Build.CudaTasks.SanitizePaths" task could not be loaded from the assembly C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\BuildCustomizations\Nvda.Build.CudaTasks.v7.5.dll. Could not load file or assembly 'Microsoft.Build.Utilities.v3.5, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified. Confirm that the declaration is correct, that the assembly and all its dependencies are available, and that the task contains a public class that implements Microsoft.Build.Framework.ITask. C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\BuildCustomizations\CUDA 7.5.targets 160 9 MathCUDA Error 2 error C2440: '' : cannot convert from 'initializer-list' to 'std::array' (TensorView.cpp) c:\users\jlu\projects\cntk\source\math\TensorView.h 32 1 Math

— Reply to this email directly or view it on GitHub https://github.com/Microsoft/CNTK/issues/61#issuecomment-185305588.

deprecatedslocum avatar Feb 17 '16 19:02 deprecatedslocum

No problem. I guess it is related to my VS and cuda setup. But my theano is able to run with cuda 7.5. Thanks

holmes2016 avatar Feb 17 '16 20:02 holmes2016

We will be adding support for CUDA 7.5 within the next month.

mradmila avatar Mar 14 '16 23:03 mradmila

Cool! Thanks

holmes2016 avatar Mar 17 '16 15:03 holmes2016

It seems like CUDA 7.5 support was added as of April 5th 2016. https://github.com/Microsoft/CNTK/wiki/News#april-2016

rold2007 avatar Apr 12 '16 01:04 rold2007