mirror of
https://github.com/marian-nmt/marian.git
synced 2024-09-11 06:15:56 +03:00
fixed build break due to MPI change in examples
This commit is contained in:
parent
d765d06f50
commit
9023bf8b90
0
src/examples/mnist/mnist_ffnn.cpp
Normal file → Executable file
0
src/examples/mnist/mnist_ffnn.cpp
Normal file → Executable file
7
src/examples/mnist/training.h
Normal file → Executable file
7
src/examples/mnist/training.h
Normal file → Executable file
@ -30,8 +30,11 @@ public:
|
||||
auto scheduler = New<Scheduler>(options_, trainState);
|
||||
scheduler->addValidator(New<AccuracyValidator>(options_));
|
||||
|
||||
// Multi-node training
|
||||
auto mpi = initMPI(/*multiThreaded=*/false);
|
||||
|
||||
// Prepare model
|
||||
auto model = New<ModelWrapper>(options_);
|
||||
auto model = New<ModelWrapper>(options_, mpi);
|
||||
model->setScheduler(scheduler);
|
||||
model->load();
|
||||
|
||||
@ -47,6 +50,8 @@ public:
|
||||
scheduler->increaseEpoch();
|
||||
}
|
||||
scheduler->finished();
|
||||
model = nullptr;
|
||||
finalizeMPI(std::move(mpi));
|
||||
}
|
||||
};
|
||||
} // namespace marian
|
||||
|
@ -563,6 +563,15 @@
|
||||
<ClCompile Include="..\src\data\corpus_nbest.cpp" />
|
||||
<ClCompile Include="..\src\data\text_input.cpp" />
|
||||
<ClCompile Include="..\src\3rd_party\cnpy\cnpy.cpp" />
|
||||
<ClCompile Include="..\src\examples\iris\helper.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\examples\iris\iris.cpp" />
|
||||
<ClCompile Include="..\src\examples\mnist\mnist_ffnn.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\layers\loss.cpp" />
|
||||
<ClCompile Include="..\src\layers\weight.cpp" />
|
||||
<ClCompile Include="..\src\microsoft\quicksand.cpp">
|
||||
@ -687,6 +696,11 @@
|
||||
<ClInclude Include="..\src\common\timer.h" />
|
||||
<ClInclude Include="..\src\common\types.h" />
|
||||
<ClInclude Include="..\src\common\version.h" />
|
||||
<ClInclude Include="..\src\examples\mnist\dataset.h" />
|
||||
<ClInclude Include="..\src\examples\mnist\model.h" />
|
||||
<ClInclude Include="..\src\examples\mnist\model_lenet.h" />
|
||||
<ClInclude Include="..\src\examples\mnist\training.h" />
|
||||
<ClInclude Include="..\src\examples\mnist\validator.h" />
|
||||
<ClInclude Include="..\src\layers\loss.h" />
|
||||
<ClInclude Include="..\src\layers\weight.h" />
|
||||
<ClInclude Include="..\src\marian.h" />
|
||||
@ -1049,6 +1063,11 @@
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
|
||||
</None>
|
||||
<None Include="..\src\examples\cmake_install.cmake" />
|
||||
<None Include="..\src\examples\iris\iris.data" />
|
||||
<None Include="..\src\examples\Makefile" />
|
||||
<None Include="..\src\examples\mnist\download.sh" />
|
||||
<None Include="..\src\examples\README.md" />
|
||||
<None Include="..\src\tensors\gpu\add.cu">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
|
||||
</None>
|
||||
@ -1097,6 +1116,7 @@
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
|
||||
</Text>
|
||||
<Text Include="..\src\examples\CMakeLists.txt" />
|
||||
<Text Include="..\src\tests\CMakeLists.txt" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
|
@ -472,6 +472,15 @@
|
||||
<ClCompile Include="..\src\tests\sqlite_test.cpp">
|
||||
<Filter>tests</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\examples\mnist\mnist_ffnn.cpp">
|
||||
<Filter>examples\mnist</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\examples\iris\helper.cpp">
|
||||
<Filter>examples\iris</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\src\examples\iris\iris.cpp">
|
||||
<Filter>examples\iris</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\src\marian.h" />
|
||||
@ -1493,6 +1502,21 @@
|
||||
<ClInclude Include="..\src\3rd_party\pathie-cpp\include\temp.hpp">
|
||||
<Filter>3rd_party\pathie-cpp\include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\examples\mnist\dataset.h">
|
||||
<Filter>examples\mnist</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\examples\mnist\model.h">
|
||||
<Filter>examples\mnist</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\examples\mnist\model_lenet.h">
|
||||
<Filter>examples\mnist</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\examples\mnist\training.h">
|
||||
<Filter>examples\mnist</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\src\examples\mnist\validator.h">
|
||||
<Filter>examples\mnist</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Filter Include="3rd_party">
|
||||
@ -1810,6 +1834,21 @@
|
||||
<None Include="..\src\tests\tensor_test.cu">
|
||||
<Filter>tests</Filter>
|
||||
</None>
|
||||
<None Include="..\src\examples\mnist\download.sh">
|
||||
<Filter>examples\mnist</Filter>
|
||||
</None>
|
||||
<None Include="..\src\examples\iris\iris.data">
|
||||
<Filter>examples\iris</Filter>
|
||||
</None>
|
||||
<None Include="..\src\examples\cmake_install.cmake">
|
||||
<Filter>examples</Filter>
|
||||
</None>
|
||||
<None Include="..\src\examples\Makefile">
|
||||
<Filter>examples</Filter>
|
||||
</None>
|
||||
<None Include="..\src\examples\README.md">
|
||||
<Filter>examples</Filter>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Text Include="..\src\3rd_party\sentencepiece\src\CMakeLists.txt">
|
||||
@ -1821,5 +1860,8 @@
|
||||
<Text Include="..\src\tests\CMakeLists.txt">
|
||||
<Filter>tests</Filter>
|
||||
</Text>
|
||||
<Text Include="..\src\examples\CMakeLists.txt">
|
||||
<Filter>examples</Filter>
|
||||
</Text>
|
||||
</ItemGroup>
|
||||
</Project>
|
Loading…
Reference in New Issue
Block a user