Skip to content

Commit

Permalink
fix memory leak (apache#4811)
Browse files Browse the repository at this point in the history
  • Loading branch information
icemelon authored and alexwong committed Feb 28, 2020
1 parent 2d6f6a5 commit d353f1b
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 d353f1b

Please sign in to comment.