From 60c52e137f3975fd7933dae486d6cb2790547640 Mon Sep 17 00:00:00 2001 From: Haichen Shen Date: Tue, 4 Feb 2020 13:14:15 -0800 Subject: [PATCH] fix memory leak (#4811) --- src/runtime/thread_pool.cc | 6 ------ 1 file changed, 6 deletions(-) diff --git a/src/runtime/thread_pool.cc b/src/runtime/thread_pool.cc index 15dd38157049..235892dbce0f 100644 --- a/src/runtime/thread_pool.cc +++ b/src/runtime/thread_pool.cc @@ -412,12 +412,6 @@ int TVMBackendParallelLaunch( { TVMParallelGroupEnv env; env.num_task = num_task; - std::atomic* sync_counter = new std::atomic[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;