Skip to content

Commit

Permalink
Merge branch 'develop' into paco/ci_build_67bc9438d
Browse files Browse the repository at this point in the history
  • Loading branch information
pacowong committed Oct 16, 2024
2 parents 775daca + 9ab613a commit e442185
Showing 1 changed file with 3 additions and 12 deletions.
15 changes: 3 additions & 12 deletions onnxruntime/core/mlas/lib/mlasi.h
Original file line number Diff line number Diff line change
Expand Up @@ -2479,21 +2479,12 @@ MlasReadTimeStampCounter(void)
// Aligned buffer for GEMM packing, etc.
//

#ifdef MLAS_THREAD_LOCAL
#error MLAS_THREAD_LOCAL was previously defined
#endif
#if defined(_MSC_VER)
#define MLAS_THREAD_LOCAL __declspec(thread)
#else
#define MLAS_THREAD_LOCAL
#endif

constexpr size_t ThreadedBufAlignment = 64;
extern MLAS_THREAD_LOCAL size_t ThreadedBufSize;
extern thread_local size_t ThreadedBufSize;
#ifdef _MSC_VER
extern MLAS_THREAD_LOCAL std::unique_ptr<uint8_t, decltype(&_aligned_free)> ThreadedBufHolder;
extern thread_local std::unique_ptr<uint8_t, decltype(&_aligned_free)> ThreadedBufHolder;
#else
extern MLAS_THREAD_LOCAL std::unique_ptr<uint8_t, decltype(&free)> ThreadedBufHolder;
extern thread_local std::unique_ptr<uint8_t, decltype(&free)> ThreadedBufHolder;
#endif

MLAS_FORCEINLINE
Expand Down

0 comments on commit e442185

Please sign in to comment.