Skip to content

Commit

Permalink
added compilation for compute 5.2,6.0 and 6.1
Browse files Browse the repository at this point in the history
  • Loading branch information
wolfma61 committed Jul 13, 2017
1 parent bd48812 commit bfc662d
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 7 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
*.orig
\#*
.\#*
.vscode

# Local build configuration
Config.make
Expand Down
6 changes: 6 additions & 0 deletions CNTK.Cpp.props
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,12 @@
<NvmlLibPath Condition="'$(CudaVersion)' == '7.5'">"c:\Program Files\NVIDIA Corporation\GDK\gdk_win7_amd64_release\nvml\lib"</NvmlLibPath>
<NvmlLibPath Condition="'$(CudaVersion)' == '8.0'" />

<NvidiaCompute />
<!-- see http://docs.nvidia.com/cuda/pascal-compatibility-guide/index.html#building-applications-with-pascal-support -->
<NvidiaCompute Condition="$(DebugBuild)">compute_30,sm_30</NvidiaCompute>
<NvidiaCompute Condition="$(ReleaseBuild) And '$(CudaVersion)' == '7.5'">compute_30,sm_30;compute_35,sm_35;compute_50,sm_50;compute_52,sm_52;</NvidiaCompute>
<NvidiaCompute Condition="$(ReleaseBuild) And '$(CudaVersion)' == '8.0'">compute_30,sm_30;compute_35,sm_35;compute_50,sm_50;compute_52,sm_52;compute_61,sm_61;</NvidiaCompute>

<NvmlDll>%ProgramW6432%\NVIDIA Corporation\NVSMI\nvml.dll</NvmlDll>
<NvmlDll Condition="Exists('c:\local\bindrop\NVSMI\nvml.dll')">c:\local\bindrop\NVSMI\nvml.dll</NvmlDll>

Expand Down
6 changes: 5 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -214,9 +214,13 @@ endif
# Set up nvcc target architectures (will generate code to support them all, i.e. fat-binary, in release mode)
# In debug mode we will rely on JIT to create code "on the fly" for the underlying architecture
# see also http://docs.nvidia.com/cuda/pascal-compatibility-guide/index.html#building-applications-with-pascal-support
GENCODE_SM30 := -gencode arch=compute_30,code=\"sm_30,compute_30\"
GENCODE_SM35 := -gencode arch=compute_35,code=\"sm_35,compute_35\"
GENCODE_SM50 := -gencode arch=compute_50,code=\"sm_50,compute_50\"
GENCODE_SM52 := -gencode arch=compute_52,code=\"sm_52,compute_52\"
GENCODE_SM60 := -gencode arch=compute_60,code=\"sm_60,compute_60\"
GENCODE_SM61 := -gencode arch=compute_61,code=\"sm_61,compute_61\"
# Should we relocate *.gcno and *.gcda files using -fprofile-dir option?
# Use GCOV_PREFIX and GCOV_PREFIX_STRIP if relocating:
Expand Down Expand Up @@ -246,7 +250,7 @@ ifeq ("$(BUILDTYPE)","release")
ifdef CNTK_CUDA_CODEGEN_RELEASE
GENCODE_FLAGS := $(CNTK_CUDA_CODEGEN_RELEASE)
else
GENCODE_FLAGS := $(GENCODE_SM30) $(GENCODE_SM35) $(GENCODE_SM50)
GENCODE_FLAGS := $(GENCODE_SM30) $(GENCODE_SM35) $(GENCODE_SM50) $(GENCODE_SM52) $(GENCODE_SM60) $(GENCODE_SM61)
endif
CXXFLAGS += -g -O4
Expand Down
4 changes: 2 additions & 2 deletions Source/Math/Math.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@
</PostBuildEvent>
<CudaCompile>
<TargetMachinePlatform>64</TargetMachinePlatform>
<CodeGeneration>compute_30,sm_30;compute_35,sm_35;compute_50,sm_50;</CodeGeneration>
<CodeGeneration>$(NvidiaCompute);</CodeGeneration>
<CudaRuntime>None</CudaRuntime>
<NvccCompilation>compile</NvccCompilation>
<GenerateLineInfo>true</GenerateLineInfo>
Expand Down Expand Up @@ -124,7 +124,7 @@
<CudaCompile>
<FastMath>true</FastMath>
<TargetMachinePlatform>64</TargetMachinePlatform>
<CodeGeneration>compute_30,sm_30;compute_35,sm_35</CodeGeneration>
<CodeGeneration>compute_30,sm_30;compute_35,sm_35;$(NvidiaCompute)</CodeGeneration>
<GPUDebugInfo>true</GPUDebugInfo>
<GenerateLineInfo>true</GenerateLineInfo>
<HostDebugInfo>true</HostDebugInfo>
Expand Down
4 changes: 2 additions & 2 deletions Source/Math/MathCUDA.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,11 @@
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="$(DebugBuild)">
<CudaCodeGen>$(CNTK_CUDA_CODEGEN_DEBUG)</CudaCodeGen>
<CudaCodeGen Condition="'$(CudaCodeGen)'==''">compute_30,sm_30</CudaCodeGen>
<CudaCodeGen Condition="'$(CudaCodeGen)'==''">$(NvidiaCompute)</CudaCodeGen>
</PropertyGroup>
<PropertyGroup Condition="$(ReleaseBuild)">
<CudaCodeGen>$(CNTK_CUDA_CODEGEN_RELEASE)</CudaCodeGen>
<CudaCodeGen Condition="'$(CudaCodeGen)'==''">compute_30,sm_30;compute_35,sm_35;compute_50,sm_50;</CudaCodeGen>
<CudaCodeGen Condition="'$(CudaCodeGen)'==''">$(NvidiaCompute)</CudaCodeGen>
</PropertyGroup>
<PropertyGroup>
<TargetName>Cntk.Math.Cuda-$(CntkComponentVersion)</TargetName>
Expand Down
2 changes: 1 addition & 1 deletion Tests/UnitTests/EvalTests/EvalTests.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@
</Link>
<CudaCompile>
<TargetMachinePlatform>64</TargetMachinePlatform>
<CodeGeneration>compute_30,sm_30;%(CodeGeneration)</CodeGeneration>
<CodeGeneration>$(NvidiaCompute)</CodeGeneration>
</CudaCompile>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="$(ReleaseBuild)">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@
</Link>
<CudaCompile>
<TargetMachinePlatform>64</TargetMachinePlatform>
<CodeGeneration>compute_30,sm_30;%(CodeGeneration)</CodeGeneration>
<CodeGeneration>%(CodeGeneration)</CodeGeneration>
</CudaCompile>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="$(ReleaseBuild)">
Expand Down

0 comments on commit bfc662d

Please sign in to comment.