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

Setting cudann bench to true

parent e4e9d906
No related branches found
No related tags found
No related merge requests found
......@@ -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())
......
......@@ -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");
......
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