Skip to content
Snippets Groups Projects
Commit e1288dc4 authored by Franck Dary's avatar Franck Dary
Browse files

Changed execution policy from par_unseq to par

parent b495167c
No related branches found
No related tags found
No related merge requests found
...@@ -129,7 +129,7 @@ int MacaonDecode::main() ...@@ -129,7 +129,7 @@ int MacaonDecode::main()
{ {
NeuralNetworkImpl::device = torch::kCPU; NeuralNetworkImpl::device = torch::kCPU;
machine.to(NeuralNetworkImpl::device); machine.to(NeuralNetworkImpl::device);
std::for_each(std::execution::par_unseq, configs.begin(), configs.end(), std::for_each(std::execution::par, 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);
......
...@@ -327,7 +327,7 @@ int MacaonTrain::main() ...@@ -327,7 +327,7 @@ int MacaonTrain::main()
{ {
NeuralNetworkImpl::device = torch::kCPU; NeuralNetworkImpl::device = torch::kCPU;
machine.to(NeuralNetworkImpl::device); machine.to(NeuralNetworkImpl::device);
std::for_each(std::execution::par_unseq, devConfigs.begin(), devConfigs.end(), std::for_each(std::execution::par, 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);
......
...@@ -52,7 +52,7 @@ void Trainer::extractExamples(std::vector<SubConfig> & configs, bool debug, std: ...@@ -52,7 +52,7 @@ void Trainer::extractExamples(std::vector<SubConfig> & configs, bool debug, std:
NeuralNetworkImpl::device = torch::kCPU; NeuralNetworkImpl::device = torch::kCPU;
machine.to(NeuralNetworkImpl::device); machine.to(NeuralNetworkImpl::device);
std::for_each(std::execution::par_unseq, configs.begin(), configs.end(), std::for_each(std::execution::par, configs.begin(), configs.end(),
[this, maxNbExamplesPerFile, &examplesPerState, &totalNbExamples, debug, dynamicOracle, explorationThreshold, dir, epoch, &examplesMutex](SubConfig & config) [this, maxNbExamplesPerFile, &examplesPerState, &totalNbExamples, debug, dynamicOracle, explorationThreshold, dir, epoch, &examplesMutex](SubConfig & config)
{ {
config.addPredicted(machine.getPredicted()); config.addPredicted(machine.getPredicted());
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment