Skip to content

Commit 189e673

Browse files
authored
[MLAS] Fix SVE enabled pipeline break (#26203)
### Description The `MLAS_USE_SVE` macro was missing for some unittests/benchmark targets. In the original PR, it was scoped down to just the mlas target and this resulted in different mlas platform struct definitions across targets. ### Motivation and Context Fix pipeline crash and unblock daily pipeline run #25238 (change that introduced the issue)
1 parent 3ec8829 commit 189e673

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

cmake/onnxruntime_unittests.cmake

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1325,6 +1325,9 @@ if (NOT onnxruntime_ENABLE_TRAINING_TORCH_INTEROP)
13251325
${BENCHMARK_DIR}/layer_normalization.cc)
13261326
target_include_directories(onnxruntime_benchmark PRIVATE ${ONNXRUNTIME_ROOT} ${onnxruntime_graph_header} ${ONNXRUNTIME_ROOT}/core/mlas/inc)
13271327
target_compile_definitions(onnxruntime_benchmark PRIVATE BENCHMARK_STATIC_DEFINE)
1328+
if (onnxruntime_USE_SVE)
1329+
target_compile_definitions(onnxruntime_benchmark PRIVATE MLAS_USE_SVE)
1330+
endif()
13281331
if(WIN32)
13291332
target_compile_options(onnxruntime_benchmark PRIVATE "$<$<COMPILE_LANGUAGE:CUDA>:SHELL:--compiler-options /wd4141>"
13301333
"$<$<NOT:$<COMPILE_LANGUAGE:CUDA>>:/wd4141>")
@@ -1352,6 +1355,9 @@ if (NOT onnxruntime_ENABLE_TRAINING_TORCH_INTEROP)
13521355
target_include_directories(onnxruntime_mlas_benchmark PRIVATE ${ONNXRUNTIME_ROOT}/core/mlas/inc)
13531356
target_link_libraries(onnxruntime_mlas_benchmark PRIVATE benchmark::benchmark onnxruntime_util ${ONNXRUNTIME_MLAS_LIBS} onnxruntime_common ${CMAKE_DL_LIBS})
13541357
target_compile_definitions(onnxruntime_mlas_benchmark PRIVATE BENCHMARK_STATIC_DEFINE)
1358+
if (onnxruntime_USE_SVE)
1359+
target_compile_definitions(onnxruntime_mlas_benchmark PRIVATE MLAS_USE_SVE)
1360+
endif()
13551361
if(WIN32)
13561362
target_link_libraries(onnxruntime_mlas_benchmark PRIVATE debug Dbghelp)
13571363
# Avoid using new and delete. But this is a benchmark program, it's ok if it has a chance to leak.
@@ -1649,6 +1655,9 @@ endif()
16491655
XCODE_ATTRIBUTE_CODE_SIGNING_ALLOWED "NO"
16501656
)
16511657
endif()
1658+
if (onnxruntime_USE_SVE)
1659+
target_compile_definitions(onnxruntime_mlas_test PRIVATE MLAS_USE_SVE)
1660+
endif()
16521661
target_include_directories(onnxruntime_mlas_test PRIVATE ${ONNXRUNTIME_ROOT}/core/mlas/inc ${ONNXRUNTIME_ROOT}
16531662
${CMAKE_CURRENT_BINARY_DIR})
16541663
target_link_libraries(onnxruntime_mlas_test PRIVATE GTest::gtest GTest::gmock ${ONNXRUNTIME_MLAS_LIBS} onnxruntime_common)

0 commit comments

Comments
 (0)