Commit 31016256 authored by Franck Dary's avatar Franck Dary
Browse files

Disable parralelism

parent 73971f7c
...@@ -129,7 +129,7 @@ int MacaonDecode::main() ...@@ -129,7 +129,7 @@ int MacaonDecode::main()
{ {
NeuralNetworkImpl::setDevice(torch::kCPU); NeuralNetworkImpl::setDevice(torch::kCPU);
machine.to(NeuralNetworkImpl::getDevice()); machine.to(NeuralNetworkImpl::getDevice());
std::for_each(std::execution::par, configs.begin(), configs.end(), std::for_each(std::execution::seq, configs.begin(), configs.end(),
[&decoder, debug, printAdvancement, beamSize, beamThreshold](BaseConfig & config) [&decoder, debug, printAdvancement, beamSize, beamThreshold](BaseConfig & config)
{ {
decoder.decode(config, beamSize, beamThreshold, debug, printAdvancement); decoder.decode(config, beamSize, beamThreshold, debug, printAdvancement);
......
...@@ -329,7 +329,7 @@ int MacaonTrain::main() ...@@ -329,7 +329,7 @@ int MacaonTrain::main()
{ {
NeuralNetworkImpl::setDevice(torch::kCPU); NeuralNetworkImpl::setDevice(torch::kCPU);
machine.to(NeuralNetworkImpl::getDevice()); machine.to(NeuralNetworkImpl::getDevice());
std::for_each(std::execution::par, devConfigs.begin(), devConfigs.end(), std::for_each(std::execution::seq, devConfigs.begin(), devConfigs.end(),
[&decoder, debug, printAdvancement](BaseConfig & devConfig) [&decoder, debug, printAdvancement](BaseConfig & devConfig)
{ {
decoder.decode(devConfig, 1, 0.0, debug, printAdvancement); decoder.decode(devConfig, 1, 0.0, debug, printAdvancement);
......
...@@ -55,7 +55,7 @@ void Trainer::extractExamples(std::vector<SubConfig> & configs, bool debug, std: ...@@ -55,7 +55,7 @@ void Trainer::extractExamples(std::vector<SubConfig> & configs, bool debug, std:
NeuralNetworkImpl::setDevice(torch::kCPU); NeuralNetworkImpl::setDevice(torch::kCPU);
machine.to(NeuralNetworkImpl::getDevice()); machine.to(NeuralNetworkImpl::getDevice());
std::for_each(std::execution::par, configs.begin(), configs.end(), std::for_each(std::execution::seq, configs.begin(), configs.end(),
[this, maxNbExamplesPerFile, &examplesPerState, &totalNbExamples, debug, memcheck, dynamicOracle, explorationThreshold, dir, epoch, &examplesMutex](SubConfig & config) [this, maxNbExamplesPerFile, &examplesPerState, &totalNbExamples, debug, memcheck, dynamicOracle, explorationThreshold, dir, epoch, &examplesMutex](SubConfig & config)
{ {
config.addPredicted(machine.getPredicted()); config.addPredicted(machine.getPredicted());
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment