Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move mlas code to a separated repo #22546

Open
wants to merge 10 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion cmake/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1695,7 +1695,7 @@ endif()

#Now the 'onnxruntime_EXTERNAL_LIBRARIES' variable should be sealed. It will be used in onnxruntime.cmake which will be included in the next.
#The order of the following targets matters. Right depends on left. If target A appears before target B. Then A.cmake can not use variables defined in B.cmake.
set(ONNXRUNTIME_CMAKE_FILES onnxruntime_flatbuffers onnxruntime_common onnxruntime_mlas onnxruntime_graph onnxruntime_lora onnxruntime_framework onnxruntime_util onnxruntime_providers onnxruntime_optimizer onnxruntime_session ${ONNXRUNTIME_EAGER_CMAKE_FILE_NAME})
set(ONNXRUNTIME_CMAKE_FILES onnxruntime_flatbuffers onnxruntime_common onnxruntime_graph onnxruntime_lora onnxruntime_framework onnxruntime_util onnxruntime_providers onnxruntime_optimizer onnxruntime_session ${ONNXRUNTIME_EAGER_CMAKE_FILE_NAME})

if (onnxruntime_USE_WINML)
# WINML uses and depends on the shared lib. Note: You can build WINML without DML and you will get a
Expand Down
1 change: 1 addition & 0 deletions cmake/deps.txt
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ googlexnnpack;https://github.com/google/XNNPACK/archive/309b75c9e56e0a674bf78d59
json;https://github.com/nlohmann/json/archive/refs/tags/v3.10.5.zip;f257f8dc27c5b8c085dc887b40cddd18ae1f725c
microsoft_gsl;https://github.com/microsoft/GSL/archive/refs/tags/v4.0.0.zip;cf368104cd22a87b4dd0c80228919bb2df3e2a14
microsoft_wil;https://github.com/microsoft/wil/archive/refs/tags/v1.0.230629.1.zip;e4a542a323c070376f7c2d1973d0f7ddbc1d2fa5
microsoft_mlas;https://github.com/microsoft/mlas/archive/98eade39dc87f043c0406c216e31985768a7e1d4.zip;2f44f085b9e7b57f9d426d9f99c5c1ae82331ecf
mimalloc;https://github.com/microsoft/mimalloc/archive/refs/tags/v2.1.1.zip;d5ee7d34223d0567892db5179849939c8769dc41
mp11;https://github.com/boostorg/mp11/archive/refs/tags/boost-1.82.0.zip;9bc9e01dffb64d9e0773b2e44d2f22c51aace063
onnx;https://github.com/onnx/onnx/archive/refs/tags/v1.16.1.zip;2eb9198bb352757d5ff13977cbe0634898e0837c
Expand Down
1 change: 0 additions & 1 deletion cmake/external/onnxruntime_external_deps.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -575,7 +575,6 @@ if (onnxruntime_RUN_ONNX_TESTS)
add_definitions(-DORT_RUN_EXTERNAL_ONNX_TESTS)
endif()


if(onnxruntime_ENABLE_ATEN)
message(STATUS "Aten fallback is enabled.")
FetchContent_Declare(
Expand Down
1 change: 1 addition & 0 deletions cmake/linux_arm32_crosscompile_toolchain.cmake
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#This file is just a sample. You may need to modify it before using.
SET(CMAKE_SYSTEM_NAME Linux)
SET(CMAKE_SYSTEM_VERSION 1)
SET(CMAKE_SYSTEM_PROCESSOR armv7l)
SET(CMAKE_C_COMPILER arm-none-linux-gnueabihf-gcc)
SET(CMAKE_CXX_COMPILER arm-none-linux-gnueabihf-g++)
SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
Expand Down
1 change: 1 addition & 0 deletions cmake/linux_arm64_crosscompile_toolchain.cmake
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#This file is just a sample. You may need to modify it before using.
SET(CMAKE_SYSTEM_NAME Linux)
SET(CMAKE_SYSTEM_VERSION 1)
SET(CMAKE_SYSTEM_PROCESSOR aarch64)
SET(CMAKE_C_COMPILER aarch64-none-linux-gnu-gcc)
SET(CMAKE_CXX_COMPILER aarch64-none-linux-gnu-g++)
SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
Expand Down
21 changes: 21 additions & 0 deletions cmake/onnxruntime_common.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -224,3 +224,24 @@ if (NOT onnxruntime_BUILD_SHARED_LIB)
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
FRAMEWORK DESTINATION ${CMAKE_INSTALL_BINDIR})
endif()


set(MLAS_ENABLE_WEBASSEMBLY_THREADS ${onnxruntime_ENABLE_WEBASSEMBLY_THREADS})
set(MLAS_ENABLE_WEBASSEMBLY_EXCEPTION_CATCHING ${onnxruntime_ENABLE_WEBASSEMBLY_EXCEPTION_CATCHING})

FetchContent_Declare(
microsoft_mlas
URL ${DEP_URL_microsoft_mlas}
URL_HASH SHA1=${DEP_SHA1_microsoft_mlas}
)
onnxruntime_fetchcontent_makeavailable(microsoft_mlas)
include_directories(${microsoft_mlas_SOURCE_DIR}/include)

set(ONNXRUNTIME_MLAS_LIBS onnxruntime_mlas)
if(TARGET onnxruntime_mlas_arm64)
list(APPEND ONNXRUNTIME_MLAS_LIBS onnxruntime_mlas_arm64)
endif()
if(TARGET onnxruntime_mlas_x86_64)
list(APPEND ONNXRUNTIME_MLAS_LIBS onnxruntime_mlas_x86_64)
endif()
message("ONNXRUNTIME_MLAS_LIBS: ${ONNXRUNTIME_MLAS_LIBS}")
Loading
Loading