diff --git a/onnxruntime/core/mlas/lib/kleidiai/mlasi_kleidiai.h b/onnxruntime/core/mlas/lib/kleidiai/mlasi_kleidiai.h index 2e9c4574fd057..cd68a9d61a680 100644 --- a/onnxruntime/core/mlas/lib/kleidiai/mlasi_kleidiai.h +++ b/onnxruntime/core/mlas/lib/kleidiai/mlasi_kleidiai.h @@ -6,7 +6,7 @@ #pragma once -#include "mlasi.h" +#include "../mlasi.h" // Fix to ensure compatibility with MSVC build #if defined(_MSC_VER) diff --git a/onnxruntime/test/onnx/microbenchmark/tptest.cc b/onnxruntime/test/onnx/microbenchmark/tptest.cc index e51b12454294f..1c377f1a5fa96 100644 --- a/onnxruntime/test/onnx/microbenchmark/tptest.cc +++ b/onnxruntime/test/onnx/microbenchmark/tptest.cc @@ -37,7 +37,7 @@ BENCHMARK(BM_CreateThreadPool) void SimpleForLoop(ptrdiff_t first, ptrdiff_t last) { size_t sum = 0; for (; first != last; ++first) { - ++sum; + benchmark::DoNotOptimize(++sum); } } #ifdef _WIN32 @@ -102,7 +102,8 @@ static void BM_ThreadPoolSimpleParallelFor(benchmark::State& state) { for (auto _ : state) { for (int j = 0; j < 100; j++) { ThreadPool::TrySimpleParallelFor(tp.get(), len, [&](size_t) { - for (volatile size_t x = 0; x < body; x++) { + for (size_t x = 0; x < body; x++) { + benchmark::DoNotOptimize(x); } }); }