Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/Microsoft/CNTK into dongy…
Browse files Browse the repository at this point in the history
…u/bookedit
  • Loading branch information
Dong Yu committed Jan 22, 2016
2 parents 2374adc + 89a2b0d commit 3e651e0
Show file tree
Hide file tree
Showing 57 changed files with 6,260 additions and 6,158 deletions.
20 changes: 10 additions & 10 deletions CppCntk.vssettings
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<PropertyValue name="ShowVerticalScrollBar">true</PropertyValue>
<PropertyValue name="InsertTabs">false</PropertyValue>
<PropertyValue name="WordWrapGlyphs">true</PropertyValue>
<PropertyValue name="EnableLeftClickForURLs">true</PropertyValue>
<PropertyValue name="EnableLeftClickForURLs">false</PropertyValue>
<PropertyValue name="ShowErrors">true</PropertyValue>
<PropertyValue name="OverviewWidth">58</PropertyValue>
<PropertyValue name="ShowLineNumbers">false</PropertyValue>
Expand All @@ -35,21 +35,21 @@
<PropertyValue name="NewlineFunctionBrace">0</PropertyValue>
<PropertyValue name="IndentBlockContents">true</PropertyValue>
<PropertyValue name="DisableAggressiveMemberList">false</PropertyValue>
<PropertyValue name="MaximumCachedTranslationUnits">7</PropertyValue>
<PropertyValue name="MaximumCachedTranslationUnits">15</PropertyValue>
<PropertyValue name="SpaceBeforeInitListBrace">false</PropertyValue>
<PropertyValue name="SpaceWithinCastParentheses">false</PropertyValue>
<PropertyValue name="NewlineInitListBrace">0</PropertyValue>
<PropertyValue name="IndentCaseContents">true</PropertyValue>
<PropertyValue name="RecreateDatabase">false</PropertyValue>
<PropertyValue name="SpaceAroundConditionalOperator">2</PropertyValue>
<PropertyValue name="SpaceWithinInitListBraces">true</PropertyValue>
<PropertyValue name="SpaceWithinInitListBraces">false</PropertyValue>
<PropertyValue name="SpaceBeforeLambdaParenthesis">false</PropertyValue>
<PropertyValue name="NewlineEmptyFunctionCloseBrace">true</PropertyValue>
<PropertyValue name="NewlineEmptyFunctionCloseBrace">false</PropertyValue>
<PropertyValue name="DisablePreLoadNavigateToCache">false</PropertyValue>
<PropertyValue name="EnterOutliningModeWhenFilesOpen">true</PropertyValue>
<PropertyValue name="PreserveBlock">1</PropertyValue>
<PropertyValue name="PreserveBlock">0</PropertyValue>
<PropertyValue name="SpaceBeforeConstructorColon">true</PropertyValue>
<PropertyValue name="NewlineKeywordWhile">false</PropertyValue>
<PropertyValue name="NewlineKeywordWhile">true</PropertyValue>
<PropertyValue name="NewlineLambdaBrace">0</PropertyValue>
<PropertyValue name="DisableSharedIntelliSense">false</PropertyValue>
<PropertyValue name="AddSemicolonForClassTypes">true</PropertyValue>
Expand All @@ -58,7 +58,7 @@
<PropertyValue name="DoNotWarnIfFallbackLocationUsed">false</PropertyValue>
<PropertyValue name="DisableDatabaseImplicitAutoCleanup">false</PropertyValue>
<PropertyValue name="SpaceBeforeFunctionParenthesis">false</PropertyValue>
<PropertyValue name="NewlineNamespaceBrace">0</PropertyValue>
<PropertyValue name="NewlineNamespaceBrace">1</PropertyValue>
<PropertyValue name="AutoFormatOnSemicolon">true</PropertyValue>
<PropertyValue name="AutoTuneMaximumCachedTranslationUnits">true</PropertyValue>
<PropertyValue name="UseForwardSlashForIncludeAutoComplete">false</PropertyValue>
Expand All @@ -67,7 +67,7 @@
<PropertyValue name="DisableDatabaseUpdates">false</PropertyValue>
<PropertyValue name="DisableIntelliSenseUpdating">false</PropertyValue>
<PropertyValue name="NewlineControlBlockBrace">0</PropertyValue>
<PropertyValue name="IndentNamespaceContents">true</PropertyValue>
<PropertyValue name="IndentNamespaceContents">false</PropertyValue>
<PropertyValue name="CompleteSlashStar">true</PropertyValue>
<PropertyValue name="FallbackLocation"/>
<PropertyValue name="DisableErrorReporting">false</PropertyValue>
Expand Down Expand Up @@ -106,7 +106,7 @@
<PropertyValue name="DisableSquiggles">false</PropertyValue>
<PropertyValue name="EnableQuickInfoToolTips">true</PropertyValue>
<PropertyValue name="IndentCaseBraces">false</PropertyValue>
<PropertyValue name="AlignParameters">false</PropertyValue>
<PropertyValue name="AlignParameters">true</PropertyValue>
<PropertyValue name="AutoFormatOnBraceCompletion">true</PropertyValue>
<PropertyValue name="AutoFormatOnClosingBrace">true</PropertyValue>
<PropertyValue name="CompleteParensInRawString">true</PropertyValue>
Expand Down Expand Up @@ -134,7 +134,7 @@
<PropertyValue name="DisableDatabase">false</PropertyValue>
<PropertyValue name="SpaceBeforeBracket">false</PropertyValue>
<PropertyValue name="SpaceWithinFunctionParentheses">false</PropertyValue>
<PropertyValue name="NewlineEmptyTypeCloseBrace">true</PropertyValue>
<PropertyValue name="NewlineEmptyTypeCloseBrace">false</PropertyValue>
<PropertyValue name="DisableIncludeAutoComplete">false</PropertyValue>
<PropertyValue name="EnableLogging">false</PropertyValue>
</ToolsOptionsSubCategory>
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ endif
ifneq ("$(wildcard $(BUILD_TOP)/Config.make)","")
include $(BUILD_TOP)/Config.make
else
$(error Cannot find $(BUILD_TOP)/Config.make. Please see the README file for configuration instructions.)
$(error Cannot find $(BUILD_TOP)/Config.make. Please see CNTK Wiki at https://github.com/Microsoft/cntk/wiki for configuration instructions.)
endif

ifndef BUILDTYPE
Expand Down
5 changes: 5 additions & 0 deletions Source/CNTK/CNTK.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
#include "SynchronousExecutionEngine.h"
#include "ModelEditLanguage.h"
#include "CPUMatrix.h" // used for SetNumThreads()
#include "CommonMatrix.h"
#include "SGD.h"
#include "MPIWrapper.h"
#include "Config.h"
Expand Down Expand Up @@ -473,6 +474,8 @@ int wmainWithBS(int argc, wchar_t* argv[]) // called from wmain which is a wrapp

g_shareNodeValueMatrices = config(L"shareNodeValueMatrices", false);

TracingGPUMemoryAllocator::SetTraceLevel(config(L"traceGPUMemoryAllocations", 0));

// logging
wstring logpath = config(L"stderr", L"");
if (logpath != L"")
Expand Down Expand Up @@ -560,6 +563,8 @@ int wmainOldCNTKConfig(int argc, wchar_t* argv[]) // called from wmain which is

g_shareNodeValueMatrices = config(L"shareNodeValueMatrices", false);

TracingGPUMemoryAllocator::SetTraceLevel(config(L"traceGPUMemoryAllocations", 0));

if (logpath != L"")
{
for (int i = 0; i < command.size(); i++)
Expand Down
2 changes: 1 addition & 1 deletion Source/CNTK/ModelEditLanguage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ void MELScript<ElemType>::CallFunction(const std::string& p_name, const ConfigPa
std::wstring modelFormat = GetOptionalModelFormat(params, numFixedParams);

auto cn = make_shared<ComputationNetwork>(CPUDEVICE);
#if 1 // support for a specific kind of legacy format, for the sole purpose of allowing users to convert (=load & save) them
#if 1 // support for a specific kind of legacy format, for the sole purpose of allowing users to convert (=load & save) them
if (modelFormat == L"cntk_legacy_no_tensorlib")
{
cn->Read<ElemType>(params[1]);
Expand Down
4 changes: 1 addition & 3 deletions Source/CNTK/NDLUtil.h
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,4 @@ class NDLUtil

template class NDLUtil<float>;
template class NDLUtil<double>;
}
}
}
} } }
4 changes: 2 additions & 2 deletions Source/Common/BestGpu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -265,9 +265,9 @@ void BestGpu::Init()
// get the count of objects
cudaError_t err = cudaGetDeviceCount(&m_deviceCount);
if (err != cudaSuccess)
m_deviceCount = 0; // if this fails, we have no GPUs
m_deviceCount = 0; // if this fails, we have no GPUs

ProcessorData pdEmpty = { 0 };
ProcessorData pdEmpty = {0};
for (int i = 0; i < m_deviceCount; i++)
{
ProcessorData* data = new ProcessorData();
Expand Down
4 changes: 1 addition & 3 deletions Source/Common/Config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -304,6 +304,4 @@ void TrimQuotes(std::string& str)
if (str.front() == '"' && str.back() == '"')
str = str.substr(1, str.size() - 2);
}
}
}
}
} } }
4 changes: 1 addition & 3 deletions Source/Common/DebugUtil.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,4 @@ void DebugUtil::PrintCallStack()
free(symbolList);
#endif
}
}
}
}
} } }
1 change: 0 additions & 1 deletion Source/Common/Include/ProgressTracing.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ namespace Microsoft { namespace MSR { namespace CNTK {
} // wrap static state in an accessor, so we won't need a CPP file

public:

static bool IsEnabled()
{
return GetStaticInstance().m_enabled;
Expand Down
9 changes: 6 additions & 3 deletions Source/Common/Include/TensorShape.h
Original file line number Diff line number Diff line change
Expand Up @@ -383,7 +383,10 @@ struct TensorShape
{
return m_dims == other.m_dims;
}
bool operator!=(const TensorShape& other) const { return !operator==(other); } // duh!
bool operator!=(const TensorShape& other) const
{
return !operator==(other);
} // duh!

// verify that this refers to a dense matrix (no strides)
void VerifyIsDense() const
Expand Down Expand Up @@ -622,13 +625,13 @@ struct TensorShape
}

// compare two TensorShapes, whether they are compatible, considering padding and broadcasting
bool IsElementwiseCompatibleWith(const TensorShape & other) const
bool IsElementwiseCompatibleWith(const TensorShape& other) const
{
for (size_t i = 0; i < m_dims.size(); i++)
{
size_t dim = m_dims[i];
size_t otherDim = i < other.size() ? other[i] : 1;
if (dim != otherDim && dim != 1 && otherDim != 1) // dims mismatch, and neither is broadcasting
if (dim != otherDim && dim != 1 && otherDim != 1) // dims mismatch, and neither is broadcasting
return false;
}
return true;
Expand Down
3 changes: 1 addition & 2 deletions Source/Common/Include/latticesource.h
Original file line number Diff line number Diff line change
Expand Up @@ -76,5 +76,4 @@ class latticesource
denlattices.setverbosity(veb);
}
};
}
}
} }
Loading

0 comments on commit 3e651e0

Please sign in to comment.