diff --git a/onnxruntime/core/mlas/lib/platform.cpp b/onnxruntime/core/mlas/lib/platform.cpp index 75c874bd16dcb..72eb35c894094 100644 --- a/onnxruntime/core/mlas/lib/platform.cpp +++ b/onnxruntime/core/mlas/lib/platform.cpp @@ -677,9 +677,9 @@ MlasPlatformU8S8Overflow( #endif -MLAS_THREAD_LOCAL size_t ThreadedBufSize = 0; +thread_local size_t ThreadedBufSize = 0; #ifdef _MSC_VER -MLAS_THREAD_LOCAL std::unique_ptr ThreadedBufHolder(nullptr, &_aligned_free); +thread_local std::unique_ptr ThreadedBufHolder(nullptr, &_aligned_free); #else -MLAS_THREAD_LOCAL std::unique_ptr ThreadedBufHolder(nullptr, &free); +thread_local std::unique_ptr ThreadedBufHolder(nullptr, &free); #endif