split all CUDA-specific code off from CNTKMath into a separate project CNTKMathCUDA, with the final goal that the Math project can compile without the (1 GB large) CUDA SDK installed;

renamed GPUDummy.cpp to NoGPU.cpp;
TODO: two test projects currently fail, and CNTKMath still depends on CUDA, to be fixed next
This commit is contained in:
Frank Seide 2014-11-04 08:38:32 -08:00
Родитель 5a30a55daa
Коммит 80e740aac6
6 изменённых файлов: 550 добавлений и 562 удалений

Просмотреть файл

@ -4,6 +4,9 @@ Microsoft Visual Studio Solution File, Format Version 12.00
VisualStudioVersion = 12.0.21005.1
MinimumVisualStudioVersion = 10.0.40219.1
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "CNTKMath", "..\Math\Math\Math.vcxproj", "{60BDB847-D0C4-4FD3-A947-0C15C08BCDB5}"
ProjectSection(ProjectDependencies) = postProject
{B3DD765E-694E-4494-BAD7-37BBF2942517} = {B3DD765E-694E-4494-BAD7-37BBF2942517}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cn", "..\MachineLearning\cn\cn.vcxproj", "{E6F26F9A-FF64-4F0A-B749-CD309EE357EE}"
ProjectSection(ProjectDependencies) = postProject
@ -62,6 +65,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Reader Plugins", "Reader Pl
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "CNTK", "CNTK", "{DD043083-71A4-409A-AA91-F9C548DCF7EC}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "CNTKMathCUDA", "..\Math\Math\CNTKMathCUDA.vcxproj", "{B3DD765E-694E-4494-BAD7-37BBF2942517}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|x64 = Debug|x64
@ -109,6 +114,10 @@ Global
{0F30EBCF-09F3-4EED-BF54-4214BCE53FEC}.Debug|x64.ActiveCfg = Debug|x64
{0F30EBCF-09F3-4EED-BF54-4214BCE53FEC}.Debug|x64.Build.0 = Debug|x64
{0F30EBCF-09F3-4EED-BF54-4214BCE53FEC}.Release|x64.ActiveCfg = Release|x64
{B3DD765E-694E-4494-BAD7-37BBF2942517}.Debug|x64.ActiveCfg = Debug|x64
{B3DD765E-694E-4494-BAD7-37BBF2942517}.Debug|x64.Build.0 = Debug|x64
{B3DD765E-694E-4494-BAD7-37BBF2942517}.Release|x64.ActiveCfg = Release|x64
{B3DD765E-694E-4494-BAD7-37BBF2942517}.Release|x64.Build.0 = Release|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@ -117,6 +126,7 @@ Global
{E6F26F9A-FF64-4F0A-B749-CD309EE357EE} = {DD043083-71A4-409A-AA91-F9C548DCF7EC}
{482999D1-B7E2-466E-9F8D-2119F93EAFD9} = {DD043083-71A4-409A-AA91-F9C548DCF7EC}
{60BDB847-D0C4-4FD3-A947-0C15C08BCDB5} = {DD043083-71A4-409A-AA91-F9C548DCF7EC}
{B3DD765E-694E-4494-BAD7-37BBF2942517} = {DD043083-71A4-409A-AA91-F9C548DCF7EC}
{6CEE834A-8104-46A8-8902-64C81BD7928F} = {D45DF403-6781-444E-B654-A96868C5BE68}
{668BEED5-AC07-4F35-B3AE-EE65A7F9C976} = {D45DF403-6781-444E-B654-A96868C5BE68}
{0F30EBCF-09F3-4EED-BF54-4214BCE53FEC} = {D45DF403-6781-444E-B654-A96868C5BE68}

Просмотреть файл

@ -14,6 +14,10 @@
#include "Helpers.h"
#include "CommonMatrix.h"
#ifndef CPUONLY
#pragma comment (lib, "CNTKMathCUDA.lib") // built by CNTKMathCUDA
#endif
// predeclare cublasHandle_t
struct cublasContext;
typedef struct cublasContext *cublasHandle_t;
@ -376,4 +380,3 @@ namespace Microsoft { namespace MSR { namespace CNTK {
typedef GPUMatrix<float> GPUSingleMatrix;
}}}

Просмотреть файл

@ -178,23 +178,12 @@
</PrecompiledHeader>
</ClCompile>
<ClCompile Include="CPUMatrix.cpp" />
<CudaCompile Include="GPUSparseMatrix.cu" />
<CudaCompile Include="GPUWatcher.cu">
<FileType>CppCode</FileType>
</CudaCompile>
<ClCompile Include="GPUDummy.cpp" />
<ClCompile Include="NoGPU.cpp" />
<ClCompile Include="Matrix.cpp" />
<ClCompile Include="stdafx.cpp">
<PrecompiledHeader>Create</PrecompiledHeader>
</ClCompile>
</ItemGroup>
<ItemGroup>
<CudaCompile Include="GPUMatrix.cu" />
<CudaCompile Include="GPUMatrixCUDAKernels.cu">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
</CudaCompile>
</ItemGroup>
<ItemGroup>
<None Include="GPUMatrix.h" />
</ItemGroup>

Просмотреть файл

@ -1,19 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<CudaCompile Include="GPUMatrix.cu">
<Filter>GPU</Filter>
</CudaCompile>
<CudaCompile Include="GPUMatrixCUDAKernels.cu">
<Filter>GPU</Filter>
</CudaCompile>
<CudaCompile Include="GPUSparseMatrix.cu">
<Filter>GPU</Filter>
</CudaCompile>
<CudaCompile Include="GPUWatcher.cu">
<Filter>GPU</Filter>
</CudaCompile>
</ItemGroup>
<ItemGroup>
<ClCompile Include="dllmain.cpp" />
<ClCompile Include="Matrix.cpp" />
@ -30,7 +16,7 @@
<ClCompile Include="CPUSparseMatrix.cpp">
<Filter>CPU</Filter>
</ClCompile>
<ClCompile Include="GPUDummy.cpp">
<ClCompile Include="NoGPU.cpp">
<Filter>GPU</Filter>
</ClCompile>
</ItemGroup>

Просмотреть файл

@ -1,5 +1,5 @@
//
// <copyright file="GPUDummy.cu" company="Microsoft">
// <copyright file="NoGPU.cpp" company="Microsoft">
// Copyright (c) Microsoft Corporation. All rights reserved.
// </copyright>
//