Merge branch 'master' of https://github.com/Microsoft/CNTK into amitaga/gradAggStateResetFix
This commit is contained in:
Коммит
9c65189d32
|
@ -112,7 +112,7 @@ TIMIT*.statelist text
|
||||||
TIMIT*.tfsa text
|
TIMIT*.tfsa text
|
||||||
TIMIT*.transitions text
|
TIMIT*.transitions text
|
||||||
|
|
||||||
Examples/Text/ATIS/data/ATIS.* text
|
Examples/Text/ATIS/Data/ATIS.* text
|
||||||
|
|
||||||
Examples/SequenceToSequence/CMUDict/Data/cmudict-0.7b* text
|
Examples/SequenceToSequence/CMUDict/Data/cmudict-0.7b* text
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
The ATIS corpus was converted to CTF format with these commands (tcsh):
|
The ATIS corpus was converted to CTF format with these commands (tcsh):
|
||||||
|
|
||||||
# convert third column into the IOB format
|
# convert third column into the IOB format
|
||||||
cd Examples/Text/ATIS/data
|
cd Examples/Text/ATIS/Data
|
||||||
foreach f (atis.test atis.train)
|
foreach f (atis.test atis.train)
|
||||||
cat $f.tsv \
|
cat $f.tsv \
|
||||||
| awk -F '\t' '{print $3}' $f.tsv \
|
| awk -F '\t' '{print $3}' $f.tsv \
|
||||||
|
|
|
@ -205,10 +205,10 @@ __m256i r3b0g = _mm256_load_si256((__m256i*)(currA + 480));\
|
||||||
__m256i r3b0h = _mm256_load_si256((__m256i*)(currA + 496));\
|
__m256i r3b0h = _mm256_load_si256((__m256i*)(currA + 496));\
|
||||||
|
|
||||||
#define LOADAVX_64x4 \
|
#define LOADAVX_64x4 \
|
||||||
__m256i r0b0a = _mm256_load_si256((__m256i*)currA); \
|
__m256i r0b0a = _mm256_load_si256((__m256i*)currA);\
|
||||||
__m256i r0b0b = _mm256_load_si256((__m256i*)currA + 1); \
|
__m256i r0b0b = _mm256_load_si256((__m256i*)currA + 1);\
|
||||||
__m256i r0b0c = _mm256_load_si256((__m256i*)currA + 2); \
|
__m256i r0b0c = _mm256_load_si256((__m256i*)currA + 2);\
|
||||||
__m256i r0b0d = _mm256_load_si256((__m256i*)currA + 3); \
|
__m256i r0b0d = _mm256_load_si256((__m256i*)currA + 3);\
|
||||||
\
|
\
|
||||||
__m256i r1b0a = _mm256_load_si256((__m256i*)currA + 4);\
|
__m256i r1b0a = _mm256_load_si256((__m256i*)currA + 4);\
|
||||||
__m256i r1b0b = _mm256_load_si256((__m256i*)currA + 5);\
|
__m256i r1b0b = _mm256_load_si256((__m256i*)currA + 5);\
|
||||||
|
@ -252,7 +252,7 @@ __m256i r0b0b = _mm256_load_si256((__m256i*)currA + 1);
|
||||||
|
|
||||||
|
|
||||||
#define LOADAVX_16x4 \
|
#define LOADAVX_16x4 \
|
||||||
__m256i r0b0a = _mm256_load_si256((__m256i*)currA); \
|
__m256i r0b0a = _mm256_load_si256((__m256i*)currA);\
|
||||||
__m256i r1b0a = _mm256_load_si256((__m256i*)currA + 1);\
|
__m256i r1b0a = _mm256_load_si256((__m256i*)currA + 1);\
|
||||||
__m256i r2b0a = _mm256_load_si256((__m256i*)currA + 2);\
|
__m256i r2b0a = _mm256_load_si256((__m256i*)currA + 2);\
|
||||||
__m256i r3b0a = _mm256_load_si256((__m256i*)currA + 3);\
|
__m256i r3b0a = _mm256_load_si256((__m256i*)currA + 3);\
|
||||||
|
|
|
@ -24,10 +24,6 @@
|
||||||
#pragma warning(disable : 4239) // nonstandard extension; triggered by this pattern: "auto& second = transposeB ? b.m_GPUMatrix->Transpose() : *b.m_GPUMatrix;"
|
#pragma warning(disable : 4239) // nonstandard extension; triggered by this pattern: "auto& second = transposeB ? b.m_GPUMatrix->Transpose() : *b.m_GPUMatrix;"
|
||||||
#pragma warning(disable : 4702) // unreachable code; triggered for unknown reasons
|
#pragma warning(disable : 4702) // unreachable code; triggered for unknown reasons
|
||||||
|
|
||||||
#ifndef min
|
|
||||||
#define min(a, b) (((a) < (b)) ? (a) : (b))
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// Helper to dispath matrix calls to the 4 underlying matrix libraries (CPU,GPU) x (DENSE,SPARSE)
|
// Helper to dispath matrix calls to the 4 underlying matrix libraries (CPU,GPU) x (DENSE,SPARSE)
|
||||||
// 'MatrixPointerToCheck' determines where the operation takes place.
|
// 'MatrixPointerToCheck' determines where the operation takes place.
|
||||||
// 'MatrixPointerToSetFlag' is the output. If not null and its location is BOTH, we collapse it to one.
|
// 'MatrixPointerToSetFlag' is the output. If not null and its location is BOTH, we collapse it to one.
|
||||||
|
|
|
@ -2672,8 +2672,9 @@ SGDParams::SGDParams(const ConfigRecordType& configSGD, size_t sizeofElemType)
|
||||||
size_t numMPIWorkers = pMPI->NumNodesInUse();
|
size_t numMPIWorkers = pMPI->NumNodesInUse();
|
||||||
const ConfigRecordType& configParallelTrain(configSGD(L"ParallelTrain", ConfigRecordType::Record()));
|
const ConfigRecordType& configParallelTrain(configSGD(L"ParallelTrain", ConfigRecordType::Record()));
|
||||||
m_parallelizationMethod = ParseParallelizationMethod(configParallelTrain(L"parallelizationMethod", L"none"));
|
m_parallelizationMethod = ParseParallelizationMethod(configParallelTrain(L"parallelizationMethod", L"none"));
|
||||||
m_parallelizationStartEpochNum = configParallelTrain(L"parallelizationStartEpoch", (int) 1) - 1; // Epoch numbers internally are 0 based
|
m_parallelizationStartEpochNum = configParallelTrain(L"parallelizationStartEpoch", (int) 1) - 1; // Internally, epoch numbers are 0-based
|
||||||
if (m_parallelizationStartEpochNum < 0 /* sic */)
|
if (m_parallelizationStartEpochNum < 0 /* sic */)
|
||||||
|
// Be explicit that user-facing epoch numbers are 1-based
|
||||||
InvalidArgument("parallelizationStartEpoch must be greater or equal to 1");
|
InvalidArgument("parallelizationStartEpoch must be greater or equal to 1");
|
||||||
m_enableDistributedMBReading = configParallelTrain(L"distributedMBReading", false);
|
m_enableDistributedMBReading = configParallelTrain(L"distributedMBReading", false);
|
||||||
m_syncStatsTrace = configParallelTrain(L"syncPerfStats", (int) 0);
|
m_syncStatsTrace = configParallelTrain(L"syncPerfStats", (int) 0);
|
||||||
|
|
|
@ -166,5 +166,7 @@ void TrainResNetCifarClassifer(const DeviceDescriptor& device, bool testSaveAndR
|
||||||
|
|
||||||
void TestCifarResnet()
|
void TestCifarResnet()
|
||||||
{
|
{
|
||||||
|
#ifndef CPUONLY
|
||||||
TrainResNetCifarClassifer(DeviceDescriptor::GPUDevice(0), true /*testSaveAndReLoad*/);
|
TrainResNetCifarClassifer(DeviceDescriptor::GPUDevice(0), true /*testSaveAndReLoad*/);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
|
@ -347,10 +347,14 @@ void TestRecurrentFunctionCloning()
|
||||||
void FunctionTests()
|
void FunctionTests()
|
||||||
{
|
{
|
||||||
TestSlice(DeviceDescriptor::CPUDevice());
|
TestSlice(DeviceDescriptor::CPUDevice());
|
||||||
|
#ifndef CPUONLY
|
||||||
TestSlice(DeviceDescriptor::GPUDevice(0));
|
TestSlice(DeviceDescriptor::GPUDevice(0));
|
||||||
|
#endif
|
||||||
|
|
||||||
TestReduceSum(DeviceDescriptor::CPUDevice());
|
TestReduceSum(DeviceDescriptor::CPUDevice());
|
||||||
|
#ifndef CPUONLY
|
||||||
TestReduceSum(DeviceDescriptor::GPUDevice(0));
|
TestReduceSum(DeviceDescriptor::GPUDevice(0));
|
||||||
|
#endif
|
||||||
|
|
||||||
TestRecurrentFunctionCloning();
|
TestRecurrentFunctionCloning();
|
||||||
}
|
}
|
||||||
|
|
|
@ -179,6 +179,8 @@ void TrainSequenceToSequenceTranslator(const DeviceDescriptor& device, bool useS
|
||||||
void TrainSequenceToSequenceTranslator()
|
void TrainSequenceToSequenceTranslator()
|
||||||
{
|
{
|
||||||
// TODO: Also test with sparse input variables in the graph
|
// TODO: Also test with sparse input variables in the graph
|
||||||
|
#ifndef CPUONLY
|
||||||
TrainSequenceToSequenceTranslator(DeviceDescriptor::GPUDevice(0), false, false, true, false);
|
TrainSequenceToSequenceTranslator(DeviceDescriptor::GPUDevice(0), false, false, true, false);
|
||||||
|
#endif
|
||||||
TrainSequenceToSequenceTranslator(DeviceDescriptor::CPUDevice(), false, true, false, true);
|
TrainSequenceToSequenceTranslator(DeviceDescriptor::CPUDevice(), false, true, false, true);
|
||||||
}
|
}
|
||||||
|
|
|
@ -78,6 +78,8 @@ void TrainLSTMSequenceClassifer(const DeviceDescriptor& device, bool testSaveAnd
|
||||||
|
|
||||||
void TrainLSTMSequenceClassifer()
|
void TrainLSTMSequenceClassifer()
|
||||||
{
|
{
|
||||||
|
#ifndef CPUONLY
|
||||||
TrainLSTMSequenceClassifer(DeviceDescriptor::GPUDevice(0), true);
|
TrainLSTMSequenceClassifer(DeviceDescriptor::GPUDevice(0), true);
|
||||||
|
#endif
|
||||||
TrainLSTMSequenceClassifer(DeviceDescriptor::CPUDevice(), false);
|
TrainLSTMSequenceClassifer(DeviceDescriptor::CPUDevice(), false);
|
||||||
}
|
}
|
||||||
|
|
|
@ -124,5 +124,7 @@ void TrainMNISTClassifier(const DeviceDescriptor& device)
|
||||||
void TrainerTests()
|
void TrainerTests()
|
||||||
{
|
{
|
||||||
TrainSimpleFeedForwardClassifer(DeviceDescriptor::CPUDevice());
|
TrainSimpleFeedForwardClassifer(DeviceDescriptor::CPUDevice());
|
||||||
|
#ifndef CPUONLY
|
||||||
TrainMNISTClassifier(DeviceDescriptor::GPUDevice(0));
|
TrainMNISTClassifier(DeviceDescriptor::GPUDevice(0));
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,47 @@
|
||||||
|
#!/bin/bash
|
||||||
|
# vim:set expandtab shiftwidth=2 tabstop=2:
|
||||||
|
|
||||||
|
errorCount=0
|
||||||
|
|
||||||
|
gitTree=HEAD
|
||||||
|
|
||||||
|
checkEmptyStdout()
|
||||||
|
{
|
||||||
|
local cmd=$1
|
||||||
|
local message=$2
|
||||||
|
local output=$(bash -c "$cmd")
|
||||||
|
if [ ! -z "$output" ]
|
||||||
|
then
|
||||||
|
echo "=============================================================================="
|
||||||
|
echo "Error: $message:"
|
||||||
|
echo "------------------------------------------------------------------------------"
|
||||||
|
echo "$output"
|
||||||
|
errorCount=$((errorCount + 1))
|
||||||
|
fi
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
# TODO switch to something without extra command quoting
|
||||||
|
|
||||||
|
checkEmptyStdout \
|
||||||
|
"git ls-tree -r -t --name-only $gitTree | tr '[:upper:]' '[:lower:]' | sort | uniq --repeated" \
|
||||||
|
"git ls-tree: path names that only differ in case:"
|
||||||
|
|
||||||
|
checkEmptyStdout \
|
||||||
|
"git grep -l \$'\t' $gitTree -- *.cpp *.h *.cu *.bat *.bs | cut -d: -f2-" \
|
||||||
|
"files with hard tabs encountered"
|
||||||
|
|
||||||
|
checkEmptyStdout \
|
||||||
|
"for i in .gitattributes .gitignore .gitmodules LICENSE.md; do test -z \$(git ls-tree --name-only $gitTree \"\$i\") && echo \"\$i\"; done" \
|
||||||
|
"Critical file(s) missing"
|
||||||
|
|
||||||
|
# TODO line ending checks
|
||||||
|
# TODO byte order mark and non-ASCII
|
||||||
|
|
||||||
|
if [ $errorCount -ne 0 ]
|
||||||
|
then
|
||||||
|
echo "=============================================================================="
|
||||||
|
echo FATAL: $errorCount error\(s\)
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
exit 0
|
Загрузка…
Ссылка в новой задаче