adding warring for Windows build
This commit is contained in:
Родитель
4286c6e9bc
Коммит
af52a3cf57
|
@ -42,6 +42,10 @@
|
||||||
|
|
||||||
<UseZip>false</UseZip>
|
<UseZip>false</UseZip>
|
||||||
<UseZip Condition="Exists('$(ZLIB_PATH)')">true</UseZip>
|
<UseZip Condition="Exists('$(ZLIB_PATH)')">true</UseZip>
|
||||||
|
|
||||||
|
<HasMultiverso>false</HasMultiverso>
|
||||||
|
<HasMultiverso Condition="Exists('$(SolutionDir)\Source\Multiverso\include\multiverso')">true</HasMultiverso>
|
||||||
|
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
|
|
|
@ -425,7 +425,7 @@ void SGD<ElemType>::TrainOrAdaptModel(int startEpoch, ComputationNetworkPtr net,
|
||||||
{
|
{
|
||||||
// Synchronize all ranks before proceeding to ensure that
|
// Synchronize all ranks before proceeding to ensure that
|
||||||
// rank 0 has finished writing the previous model file
|
// rank 0 has finished writing the previous model file
|
||||||
BarrierWorkers();
|
SynchronizeWorkers();
|
||||||
|
|
||||||
// (re-)initialize 1-bit SGD
|
// (re-)initialize 1-bit SGD
|
||||||
if (GetParallelizationMethod() == ParallelizationMethod::dataParallelSGD &&
|
if (GetParallelizationMethod() == ParallelizationMethod::dataParallelSGD &&
|
||||||
|
@ -728,7 +728,7 @@ void SGD<ElemType>::TrainOrAdaptModel(int startEpoch, ComputationNetworkPtr net,
|
||||||
// Synchronize all ranks before proceeding to ensure that
|
// Synchronize all ranks before proceeding to ensure that
|
||||||
// nobody tries reading the checkpoint file at the same time
|
// nobody tries reading the checkpoint file at the same time
|
||||||
// as rank 0 deleting it below
|
// as rank 0 deleting it below
|
||||||
BarrierWorkers();
|
SynchronizeWorkers();
|
||||||
|
|
||||||
// Persist model and check-point info
|
// Persist model and check-point info
|
||||||
if ((m_mpi == nullptr) || m_mpi->IsMainNode())
|
if ((m_mpi == nullptr) || m_mpi->IsMainNode())
|
||||||
|
@ -797,7 +797,7 @@ void SGD<ElemType>::TrainOrAdaptModel(int startEpoch, ComputationNetworkPtr net,
|
||||||
// Synchronize all ranks before proceeding to ensure that
|
// Synchronize all ranks before proceeding to ensure that
|
||||||
// rank 0 has finished writing the model file
|
// rank 0 has finished writing the model file
|
||||||
// TODO[DataASGD]: should othet other rank waiting in async-mode
|
// TODO[DataASGD]: should othet other rank waiting in async-mode
|
||||||
BarrierWorkers();
|
SynchronizeWorkers();
|
||||||
|
|
||||||
// progress tracing for compute cluster management
|
// progress tracing for compute cluster management
|
||||||
ProgressTracing::TraceProgressPercentage(m_maxEpochs, 0.0, true);
|
ProgressTracing::TraceProgressPercentage(m_maxEpochs, 0.0, true);
|
||||||
|
|
|
@ -597,7 +597,7 @@ private:
|
||||||
return UsingGradientAggregation(epochNumber) || UsingModelAggregation(epochNumber) || UsingAsyncGradientAggregation(epochNumber);
|
return UsingGradientAggregation(epochNumber) || UsingModelAggregation(epochNumber) || UsingAsyncGradientAggregation(epochNumber);
|
||||||
}
|
}
|
||||||
|
|
||||||
void BarrierWorkers()
|
void SynchronizeWorkers()
|
||||||
{
|
{
|
||||||
if (m_mpi != nullptr && GetParallelizationMethod() != ParallelizationMethod::dataParallelASGD)
|
if (m_mpi != nullptr && GetParallelizationMethod() != ParallelizationMethod::dataParallelASGD)
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
<Project DefaultTargets="Build" InitialTargets="CheckDependencies" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
<ItemGroup Label="ProjectConfigurations">
|
<ItemGroup Label="ProjectConfigurations">
|
||||||
<ProjectConfiguration Include="Debug|x64">
|
<ProjectConfiguration Include="Debug|x64">
|
||||||
<Configuration>Debug</Configuration>
|
<Configuration>Debug</Configuration>
|
||||||
|
@ -149,4 +149,7 @@
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||||
<ImportGroup Label="ExtensionTargets" />
|
<ImportGroup Label="ExtensionTargets" />
|
||||||
|
<Target Name="CheckDependencies">
|
||||||
|
<Error Condition="!$(HasMultiverso) And '$(CNTK_ENABLE_ASGD)'!='false'" Text="CNTK requires Multiverso to build, Please see https://github.com/Microsoft/CNTK/wiki/Setup-CNTK-on-Windows#getting-cntk-source-code for installation instructions." />
|
||||||
|
</Target>
|
||||||
</Project>
|
</Project>
|
Загрузка…
Ссылка в новой задаче