Skip to content

Commit

Permalink
fix memory leak (#4811)
Browse files Browse the repository at this point in the history
  • Loading branch information
icemelon authored Feb 4, 2020
1 parent d279991 commit 60c52e1
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions src/runtime/thread_pool.cc
Original file line number Diff line number Diff line change
Expand Up @@ -412,12 +412,6 @@ int TVMBackendParallelLaunch(
{
TVMParallelGroupEnv env;
env.num_task = num_task;
std::atomic<int32_t>* sync_counter = new std::atomic<int>[num_task * tvm::runtime::kSyncStride];
for (int i = 0; i < num_task; ++i) {
sync_counter[i * tvm::runtime::kSyncStride].store(
0, std::memory_order_relaxed);
}
env.sync_handle = sync_counter;
(*flambda)(omp_get_thread_num(), &env, cdata);
}
return 0;
Expand Down

0 comments on commit 60c52e1

Please sign in to comment.