diff --git a/decoder/src/MacaonDecode.cpp b/decoder/src/MacaonDecode.cpp index 2c42868900473cfa5ff8bcddafc5d0280568a854..39a92937b3fc4820a08a353cf32c16e11c75307a 100644 --- a/decoder/src/MacaonDecode.cpp +++ b/decoder/src/MacaonDecode.cpp @@ -73,6 +73,8 @@ int MacaonDecode::main() bool debug = variables.count("debug") == 0 ? false : true; bool printAdvancement = !debug && variables.count("silent") == 0 ? true : false; + torch::globalContext().setBenchmarkCuDNN(true); + if (dictPaths.empty()) util::error(fmt::format("no '{}' files were found, and none were given. Has the model been trained yet ?", fmt::format(ReadingMachine::defaultDictFilename, ""))); if (modelPaths.empty()) diff --git a/trainer/src/MacaonTrain.cpp b/trainer/src/MacaonTrain.cpp index 72ff7432e2e354b7adb9e4c5dd7b9477cb27e868..85c049d0aa92dfa605e9d7f1e92c32ce7c102b56 100644 --- a/trainer/src/MacaonTrain.cpp +++ b/trainer/src/MacaonTrain.cpp @@ -101,6 +101,8 @@ int MacaonTrain::main() bool computeDevScore = variables.count("devScore") == 0 ? false : true; auto machineContent = variables["machine"].as<std::string>(); + torch::globalContext().setBenchmarkCuDNN(true); + if (!machineContent.empty()) { std::FILE * file = fopen(machinePath.c_str(), "w");