Skip to content
Snippets Groups Projects
Unverified Commit 44980dd6 authored by Daniel Povey's avatar Daniel Povey Committed by GitHub
Browse files

[src] Fix incorrect invocation of mutex in nnet-batch-compute code (#2932)

parent 78f01276
No related branches found
No related tags found
No related merge requests found
......@@ -135,7 +135,7 @@ NnetBatchComputer::GetHighestPriorityComputation(
int32 *minibatch_size_out,
std::vector<NnetInferenceTask*> *tasks) {
tasks->clear();
std::unique_lock<std::mutex>(mutex_);
std::unique_lock<std::mutex> lock(mutex_);
MapType::iterator iter = tasks_.begin(), end = tasks_.end(),
best_iter = tasks_.end();
double highest_priority = -std::numeric_limits<double>::infinity();
......
......@@ -119,7 +119,7 @@ class NnetComputer {
// Version of GetOutput that calls Swap(), destroying the output stored inside
// this object. You should probably not use this if you plan to call
// Backward() on the same NnetComputer object, or it's a recurret
// Backward() on the same NnetComputer object, or it's a recurrent
// computation-- it may lead to a crash.
void GetOutputDestructive(const std::string &output_name,
CuMatrix<BaseFloat> *output);
......
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