Temporarily add the CNTK v2 library tests as an end-to-end test. This will be switched to the BOOST unit test framework later when the framework is setup for linux too.
This commit is contained in:
Родитель
e875771784
Коммит
a47c3d877f
39
CNTK.sln
39
CNTK.sln
|
@ -1131,10 +1131,7 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "CNTKv2LibraryDll", "Source\
|
|||
{DE3C54E5-D7D0-47AF-A783-DFDCE59E7937} = {DE3C54E5-D7D0-47AF-A783-DFDCE59E7937}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "LibraryTests", "Source\CNTKv2LibraryDll\LibraryTests\LibraryTests.vcxproj", "{F4CC3AB2-0DB2-4281-929A-2E68E30F0F6E}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{E5606ECE-48CA-4464-BB12-09D81D02B9EF} = {E5606ECE-48CA-4464-BB12-09D81D02B9EF}
|
||||
EndProjectSection
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "V2LibraryTests", "Tests\UnitTests\V2LibraryTests\V2LibraryTests.vcxproj", "{F4CC3AB2-0DB2-4281-929A-2E68E30F0F6E}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
|
@ -1382,22 +1379,6 @@ Global
|
|||
{82125DA1-1CD7-45B5-9281-E6AE7C287CB7}.Release_CpuOnly|x64.Build.0 = Release_CpuOnly|x64
|
||||
{82125DA1-1CD7-45B5-9281-E6AE7C287CB7}.Release|x64.ActiveCfg = Release|x64
|
||||
{82125DA1-1CD7-45B5-9281-E6AE7C287CB7}.Release|x64.Build.0 = Release|x64
|
||||
{E5606ECE-48CA-4464-BB12-09D81D02B9EF}.Debug_CpuOnly|x64.ActiveCfg = Debug_CpuOnly|x64
|
||||
{E5606ECE-48CA-4464-BB12-09D81D02B9EF}.Debug_CpuOnly|x64.Build.0 = Debug_CpuOnly|x64
|
||||
{E5606ECE-48CA-4464-BB12-09D81D02B9EF}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{E5606ECE-48CA-4464-BB12-09D81D02B9EF}.Debug|x64.Build.0 = Debug|x64
|
||||
{E5606ECE-48CA-4464-BB12-09D81D02B9EF}.Release_CpuOnly|x64.ActiveCfg = Release_CpuOnly|x64
|
||||
{E5606ECE-48CA-4464-BB12-09D81D02B9EF}.Release_CpuOnly|x64.Build.0 = Release_CpuOnly|x64
|
||||
{E5606ECE-48CA-4464-BB12-09D81D02B9EF}.Release|x64.ActiveCfg = Release|x64
|
||||
{E5606ECE-48CA-4464-BB12-09D81D02B9EF}.Release|x64.Build.0 = Release|x64
|
||||
{F4CC3AB2-0DB2-4281-929A-2E68E30F0F6E}.Debug_CpuOnly|x64.ActiveCfg = Debug|x64
|
||||
{F4CC3AB2-0DB2-4281-929A-2E68E30F0F6E}.Debug_CpuOnly|x64.Build.0 = Debug|x64
|
||||
{F4CC3AB2-0DB2-4281-929A-2E68E30F0F6E}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{F4CC3AB2-0DB2-4281-929A-2E68E30F0F6E}.Debug|x64.Build.0 = Debug|x64
|
||||
{F4CC3AB2-0DB2-4281-929A-2E68E30F0F6E}.Release_CpuOnly|x64.ActiveCfg = Release|x64
|
||||
{F4CC3AB2-0DB2-4281-929A-2E68E30F0F6E}.Release_CpuOnly|x64.Build.0 = Release|x64
|
||||
{F4CC3AB2-0DB2-4281-929A-2E68E30F0F6E}.Release|x64.ActiveCfg = Release|x64
|
||||
{F4CC3AB2-0DB2-4281-929A-2E68E30F0F6E}.Release|x64.Build.0 = Release|x64
|
||||
{731312A8-6DA3-4841-AFCD-57520BA1BF8E}.Debug_CpuOnly|x64.ActiveCfg = Debug_CpuOnly|x64
|
||||
{731312A8-6DA3-4841-AFCD-57520BA1BF8E}.Debug_CpuOnly|x64.Build.0 = Debug_CpuOnly|x64
|
||||
{731312A8-6DA3-4841-AFCD-57520BA1BF8E}.Debug|x64.ActiveCfg = Debug|x64
|
||||
|
@ -1406,6 +1387,22 @@ Global
|
|||
{731312A8-6DA3-4841-AFCD-57520BA1BF8E}.Release_CpuOnly|x64.Build.0 = Release_CpuOnly|x64
|
||||
{731312A8-6DA3-4841-AFCD-57520BA1BF8E}.Release|x64.ActiveCfg = Release|x64
|
||||
{731312A8-6DA3-4841-AFCD-57520BA1BF8E}.Release|x64.Build.0 = Release|x64
|
||||
{E5606ECE-48CA-4464-BB12-09D81D02B9EF}.Debug_CpuOnly|x64.ActiveCfg = Debug_CpuOnly|x64
|
||||
{E5606ECE-48CA-4464-BB12-09D81D02B9EF}.Debug_CpuOnly|x64.Build.0 = Debug_CpuOnly|x64
|
||||
{E5606ECE-48CA-4464-BB12-09D81D02B9EF}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{E5606ECE-48CA-4464-BB12-09D81D02B9EF}.Debug|x64.Build.0 = Debug|x64
|
||||
{E5606ECE-48CA-4464-BB12-09D81D02B9EF}.Release_CpuOnly|x64.ActiveCfg = Release_CpuOnly|x64
|
||||
{E5606ECE-48CA-4464-BB12-09D81D02B9EF}.Release_CpuOnly|x64.Build.0 = Release_CpuOnly|x64
|
||||
{E5606ECE-48CA-4464-BB12-09D81D02B9EF}.Release|x64.ActiveCfg = Release|x64
|
||||
{E5606ECE-48CA-4464-BB12-09D81D02B9EF}.Release|x64.Build.0 = Release|x64
|
||||
{F4CC3AB2-0DB2-4281-929A-2E68E30F0F6E}.Debug_CpuOnly|x64.ActiveCfg = Debug_CpuOnly|x64
|
||||
{F4CC3AB2-0DB2-4281-929A-2E68E30F0F6E}.Debug_CpuOnly|x64.Build.0 = Debug_CpuOnly|x64
|
||||
{F4CC3AB2-0DB2-4281-929A-2E68E30F0F6E}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{F4CC3AB2-0DB2-4281-929A-2E68E30F0F6E}.Debug|x64.Build.0 = Debug|x64
|
||||
{F4CC3AB2-0DB2-4281-929A-2E68E30F0F6E}.Release_CpuOnly|x64.ActiveCfg = Release_CpuOnly|x64
|
||||
{F4CC3AB2-0DB2-4281-929A-2E68E30F0F6E}.Release_CpuOnly|x64.Build.0 = Release_CpuOnly|x64
|
||||
{F4CC3AB2-0DB2-4281-929A-2E68E30F0F6E}.Release|x64.ActiveCfg = Release|x64
|
||||
{F4CC3AB2-0DB2-4281-929A-2E68E30F0F6E}.Release|x64.Build.0 = Release|x64
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
|
@ -1559,8 +1556,8 @@ Global
|
|||
{25E144C1-0B7C-4CD4-811A-2E9F4943120D} = {EC7298E3-AAA9-4672-941F-0B342C494CB3}
|
||||
{3F77BF79-E0D3-4D60-8685-5A449F164081} = {0141526B-F257-4574-8CBE-99634726FFCE}
|
||||
{82125DA1-1CD7-45B5-9281-E6AE7C287CB7} = {6F19321A-65E7-4829-B00C-3886CD6C6EDE}
|
||||
{731312A8-6DA3-4841-AFCD-57520BA1BF8E} = {6F19321A-65E7-4829-B00C-3886CD6C6EDE}
|
||||
{E5606ECE-48CA-4464-BB12-09D81D02B9EF} = {DD043083-71A4-409A-AA91-F9C548DCF7EC}
|
||||
{F4CC3AB2-0DB2-4281-929A-2E68E30F0F6E} = {6F19321A-65E7-4829-B00C-3886CD6C6EDE}
|
||||
{731312A8-6DA3-4841-AFCD-57520BA1BF8E} = {6F19321A-65E7-4829-B00C-3886CD6C6EDE}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
|
|
12
Makefile
12
Makefile
|
@ -379,13 +379,13 @@ $(CNTKLIBRARY_LIB): $(CNTKLIBRARY_OBJ) | $(CNTKMATH_LIB)
|
|||
########################################
|
||||
|
||||
CNTKLIBRARY_TESTS_SRC =\
|
||||
$(SOURCEDIR)/CNTKv2LibraryDll/LibraryTests/FeedForwardTests.cpp \
|
||||
$(SOURCEDIR)/CNTKv2LibraryDll/LibraryTests/Main.cpp \
|
||||
$(SOURCEDIR)/CNTKv2LibraryDll/LibraryTests/NDArrayViewTests.cpp \
|
||||
$(SOURCEDIR)/CNTKv2LibraryDll/LibraryTests/RecurrentFunctionTests.cpp \
|
||||
$(SOURCEDIR)/CNTKv2LibraryDll/LibraryTests/TensorTests.cpp \
|
||||
Tests/UnitTests/V2LibraryTests/FeedForwardTests.cpp \
|
||||
Tests/UnitTests/V2LibraryTests/Main.cpp \
|
||||
Tests/UnitTests/V2LibraryTests/NDArrayViewTests.cpp \
|
||||
Tests/UnitTests/V2LibraryTests/RecurrentFunctionTests.cpp \
|
||||
Tests/UnitTests/V2LibraryTests/TensorTests.cpp \
|
||||
|
||||
CNTKLIBRARY_TESTS:=$(BINDIR)/cntklibrarytests
|
||||
CNTKLIBRARY_TESTS:=$(BINDIR)/v2librarytests
|
||||
CNTKLIBRARY_TESTS_OBJ := $(patsubst %.cu, $(OBJDIR)/%.o, $(patsubst %.cpp, $(OBJDIR)/%.o, $(CNTKLIBRARY_TESTS_SRC)))
|
||||
|
||||
ALL+=$(CNTKLIBRARY_TESTS)
|
||||
|
|
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
|
@ -0,0 +1,7 @@
|
|||
#!/bin/bash
|
||||
|
||||
if [ "$OS" == "Windows_NT" ]; then
|
||||
$TEST_BIN_DIR/V2LibraryTests.exe || exit $?
|
||||
else
|
||||
$TEST_BIN_DIR/v2librarytests || exit $?
|
||||
fi
|
|
@ -0,0 +1,14 @@
|
|||
dataDir: .
|
||||
|
||||
tags:
|
||||
# Only run in 'gpu' mode since the test does not key off of device id and always runs on both gpu and cpu.
|
||||
# running on every BVT job in 'E' (Examples) leg, requires 1BitSGD.
|
||||
- bvt-e (build_sku == '1bitsgd') and device=='gpu'
|
||||
# running every Nightly job in 'E' (Examples) leg, requires 1BitSGD
|
||||
- nightly-e (build_sku == '1bitsgd') and device=='gpu'
|
||||
|
||||
testCases:
|
||||
Test run must be completed:
|
||||
patterns:
|
||||
- "CNTKv2Library tests: Passed"
|
||||
|
|
@ -265,6 +265,7 @@ class Test:
|
|||
os.environ["MPI_BINARY"] = "mpiexec"
|
||||
if not os.path.exists(os.environ["TEST_CNTK_BINARY"]):
|
||||
raise ValueError("the cntk executable does not exist at path '%s'"%os.environ["TEST_CNTK_BINARY"])
|
||||
os.environ["TEST_BIN_DIR"] = os.path.dirname(os.environ["TEST_CNTK_BINARY"])
|
||||
os.environ["TEST_DIR"] = self.testDir
|
||||
os.environ["TEST_DATA_DIR"] = self.dataDir
|
||||
os.environ["TEST_RUN_DIR"] = runDir
|
||||
|
|
|
@ -12,4 +12,7 @@ int main()
|
|||
TensorTests();
|
||||
FeedForwardTests();
|
||||
RecurrentFunctionTests();
|
||||
|
||||
fprintf(stderr, "\nCNTKv2Library tests: Passed\n");
|
||||
fflush(stderr);
|
||||
}
|
|
@ -9,12 +9,20 @@
|
|||
<Configuration>Release</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug_CpuOnly|x64">
|
||||
<Configuration>Debug_CpuOnly</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release_CpuOnly|x64">
|
||||
<Configuration>Release_CpuOnly</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>{F4CC3AB2-0DB2-4281-929A-2E68E30F0F6E}</ProjectGuid>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
<RootNamespace>LibraryTests</RootNamespace>
|
||||
<ProjectName>LibraryTests</ProjectName>
|
||||
<RootNamespace>V2LibraryTests</RootNamespace>
|
||||
<ProjectName>V2LibraryTests</ProjectName>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<Import Project="$(SolutionDir)\CNTK.Cpp.props" />
|
||||
|
@ -46,10 +54,10 @@
|
|||
</PropertyGroup>
|
||||
<ItemDefinitionGroup>
|
||||
<ClCompile>
|
||||
<AdditionalIncludeDirectories>..\API;</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>$(SolutionDir)Source\CNTKv2LibraryDll\API;</AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalLibraryDirectories>$(SolutionDir)$(Platform)\$(Configuration)</AdditionalLibraryDirectories>
|
||||
<AdditionalLibraryDirectories>$(OutDir);$(SolutionDir)$(Platform)\$(Configuration)</AdditionalLibraryDirectories>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="$(DebugBuild)">
|
||||
|
@ -88,7 +96,7 @@
|
|||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<AdditionalDependencies Condition="'$(Configuration)|$(Platform)'=='Release|x64'">CNTKLibrary-2.0.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies>CNTKLibrary-2.0.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
Загрузка…
Ссылка в новой задаче