diff --git a/paddle/fluid/operators/math/jit_kernel.cc b/paddle/fluid/operators/math/jit_kernel.cc index 54292cd7102c647e1eec193e9467dfac230074b2..68b708b345334bc63b5e2e88c308d20ca6378e6b 100644 --- a/paddle/fluid/operators/math/jit_kernel.cc +++ b/paddle/fluid/operators/math/jit_kernel.cc @@ -24,7 +24,7 @@ namespace jitkernel { namespace jit = platform::jit; KernelPool& KernelPool::Instance() { - static KernelPool g_jit_kernels; + static thread_local KernelPool g_jit_kernels; return g_jit_kernels; }