Skip to content

Commit 2f12704

Browse files
committed
update
1 parent fa9fcb5 commit 2f12704

File tree

68 files changed

+1506
-865
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

68 files changed

+1506
-865
lines changed

Release/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
If you wonder why this folder exists, please see the discussions in https://github.com/pypa/cibuildwheel/issues/794

Release/pyproject.toml

Whitespace-only changes.

cgmanifests/submodules/cgmanifest.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@
194194
"component": {
195195
"type": "git",
196196
"git": {
197-
"commitHash": "1f4c0311cda3403999b702c996898af5707973a9",
197+
"commitHash": "d10b27fe37736d2944630ecd7557cefa95cf87c9",
198198
"repositoryUrl": "https://gitlab.com/libeigen/eigen.git"
199199
},
200200
"comments": "git submodule at cmake/external/eigen"
@@ -454,7 +454,7 @@
454454
"component": {
455455
"type": "git",
456456
"git": {
457-
"commitHash": "eab844a87298d500f1924f8a7cadb4cbee426093",
457+
"commitHash": "a1241a967ec7920310a696a6c22ae2426752e135",
458458
"repositoryUrl": "https://github.com/microsoft/onnxruntime-tvm.git"
459459
},
460460
"comments": "git submodule at cmake/external/tvm"

cmake/CMakeLists.txt

Lines changed: 16 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,6 @@ option(onnxruntime_USE_NUPHAR "Build with Nuphar" OFF)
7575
option(onnxruntime_USE_VITISAI "Build with Vitis-AI" OFF)
7676
option(onnxruntime_USE_TENSORRT "Build with TensorRT support" OFF)
7777
option(onnxruntime_ENABLE_LTO "Enable link time optimization" OFF)
78-
option(onnxruntime_CROSS_COMPILING "Cross compiling onnx runtime" OFF)
7978
option(onnxruntime_GCOV_COVERAGE "Compile with options necessary to run code coverage" OFF)
8079

8180
#It's preferred to turn it OFF when onnxruntime is dynamically linked to PROTOBUF. But Tensort always required the full version of protobuf.
@@ -466,15 +465,6 @@ if(MSVC)
466465
-DEIGEN_STRONG_INLINE=inline)
467466
endif()
468467

469-
if(onnxruntime_CROSS_COMPILING)
470-
set(CMAKE_CROSSCOMPILING ON)
471-
check_cxx_compiler_flag(-Wno-error HAS_NOERROR)
472-
if(HAS_NOERROR)
473-
string(APPEND CMAKE_CXX_FLAGS " -Wno-error=attributes")
474-
string(APPEND CMAKE_C_FLAGS " -Wno-error=attributes")
475-
endif()
476-
endif()
477-
478468
# Mark symbols to be invisible, for macOS/iOS target only
479469
# Due to many dependencies have different symbol visibility settings, set global compile flags here.
480470
if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin|iOS")
@@ -600,16 +590,6 @@ if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
600590
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fstack-protector-strong")
601591
endif()
602592

603-
if (${CMAKE_SYSTEM_NAME} MATCHES "iOSCross")
604-
#For ios compliance
605-
message("Adding flags for ios builds")
606-
if (CMAKE_OSX_ARCHITECTURES STREQUAL "arm64")
607-
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -target arm64-apple-darwin-macho")
608-
elseif (CMAKE_OSX_ARCHITECTURES STREQUAL "arm")
609-
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -target armv7a-apple-darwin-macho")
610-
endif()
611-
endif()
612-
613593
#Dependencies begin
614594
if (onnxruntime_BUILD_UNIT_TESTS)
615595
if(onnxruntime_PREFER_SYSTEM_LIB)
@@ -644,10 +624,6 @@ set(ENABLE_DATE_TESTING OFF CACHE BOOL "" FORCE)
644624
set(USE_SYSTEM_TZ_DB ON CACHE BOOL "" FORCE)
645625
set(RE2_BUILD_TESTING OFF CACHE BOOL "" FORCE)
646626

647-
if(CMAKE_CROSSCOMPILING)
648-
message("Doing crosscompiling")
649-
endif()
650-
651627
#Need python to generate def file
652628
if(onnxruntime_BUILD_SHARED_LIB OR onnxruntime_ENABLE_PYTHON)
653629
if(onnxruntime_ENABLE_PYTHON)
@@ -729,6 +705,17 @@ else()
729705
endif()
730706
if(TARGET protoc)
731707
set_target_properties(protoc PROPERTIES FOLDER "External/Protobuf")
708+
get_target_property(PROTOC_OSX_ARCH protoc OSX_ARCHITECTURES)
709+
if(PROTOC_OSX_ARCH)
710+
if (${CMAKE_HOST_SYSTEM_PROCESSOR} IN_LIST PROTOC_OSX_ARCH)
711+
message("protoc can run")
712+
else()
713+
list(APPEND PROTOC_OSX_ARCH ${CMAKE_HOST_SYSTEM_PROCESSOR})
714+
set_target_properties(protoc PROPERTIES OSX_ARCHITECTURES "${CMAKE_HOST_SYSTEM_PROCESSOR}")
715+
set_target_properties(libprotoc PROPERTIES OSX_ARCHITECTURES "${PROTOC_OSX_ARCH}")
716+
set_target_properties(libprotobuf PROPERTIES OSX_ARCHITECTURES "${PROTOC_OSX_ARCH}")
717+
endif()
718+
endif()
732719
endif()
733720
if (onnxruntime_USE_FULL_PROTOBUF)
734721
set(PROTOBUF_LIB libprotobuf)
@@ -801,9 +788,8 @@ endif()
801788

802789
# Adding pytorch CPU info library
803790
# TODO!! need a better way to find out the supported architectures
804-
set(TARGET_ARCH "${CMAKE_SYSTEM_PROCESSOR}")
805-
if (NOT DEFINED TARGET_ARCH OR "${TARGET_ARCH}" STREQUAL "")
806-
set(TARGET_ARCH "${CMAKE_OSX_ARCHITECTURES}")
791+
if(NOT APPLE)
792+
set(TARGET_ARCH "${CMAKE_SYSTEM_PROCESSOR}")
807793
endif()
808794

809795
set(CPUINFO_SUPPORTED TRUE)
@@ -829,12 +815,7 @@ if(CPUINFO_SUPPORTED)
829815
set(CPUINFO_BUILD_TOOLS OFF CACHE INTERNAL "")
830816
set(CPUINFO_BUILD_UNIT_TESTS OFF CACHE INTERNAL "")
831817
set(CPUINFO_BUILD_MOCK_TESTS OFF CACHE INTERNAL "")
832-
set(CPUINFO_BUILD_BENCHMARKS OFF CACHE INTERNAL "")
833-
834-
if (CMAKE_SYSTEM_NAME STREQUAL "iOS")
835-
set(IOS ON CACHE INTERNAL "")
836-
set(IOS_ARCH "${CMAKE_OSX_ARCHITECTURES}" CACHE INTERNAL "")
837-
endif()
818+
set(CPUINFO_BUILD_BENCHMARKS OFF CACHE INTERNAL "")
838819

839820
string(APPEND CMAKE_CXX_FLAGS " -DCPUINFO_SUPPORTED")
840821
add_subdirectory(external/pytorch_cpuinfo EXCLUDE_FROM_ALL)
@@ -1085,10 +1066,7 @@ function(onnxruntime_set_compile_flags target_name)
10851066
target_compile_options(${target_name} PRIVATE "$<$<COMPILE_LANGUAGE:CUDA>:SHELL:--compiler-options -Werror>" "$<$<NOT:$<COMPILE_LANGUAGE:CUDA>>:-Werror>")
10861067
endif()
10871068

1088-
target_compile_definitions(${target_name} PUBLIC -DNSYNC_ATOMIC_CPP11)
1089-
if(APPLE AND NOT ${CMAKE_SYSTEM_NAME} MATCHES "iOSCross" AND NOT ${CMAKE_SYSTEM_NAME} MATCHES "iOS")
1090-
target_compile_definitions(${target_name} PUBLIC -Doptional_CONFIG_SELECT_OPTIONAL=optional_OPTIONAL_NONSTD)
1091-
endif()
1069+
target_compile_definitions(${target_name} PUBLIC -DNSYNC_ATOMIC_CPP11)
10921070
target_include_directories(${target_name} PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/external/nsync/public")
10931071
endif()
10941072
foreach(ORT_FLAG ${ORT_PROVIDER_FLAGS})
@@ -1141,7 +1119,7 @@ endfunction()
11411119

11421120
#For plugins that are not linked into other targets but may be loaded dynamically at runtime using dlopen-like functionality.
11431121
function(onnxruntime_add_shared_library_module target_name)
1144-
if ((${CMAKE_SYSTEM_NAME} MATCHES "Darwin") OR (${CMAKE_SYSTEM_NAME} MATCHES "iOSCross") OR (${CMAKE_SYSTEM_NAME} MATCHES "iOS"))
1122+
if ((${CMAKE_SYSTEM_NAME} MATCHES "Darwin") OR (${CMAKE_SYSTEM_NAME} MATCHES "iOS"))
11451123
add_library(${target_name} SHARED ${ARGN})
11461124
else()
11471125
#On Windows, this target shouldn't generate an import lib, but I don't know how to disable it.
@@ -1152,9 +1130,6 @@ function(onnxruntime_add_shared_library_module target_name)
11521130
endfunction()
11531131

11541132
function(onnxruntime_add_executable target_name)
1155-
if(${CMAKE_SYSTEM_NAME} MATCHES "iOSCross")
1156-
message(FATAL_ERROR "iOS doesn't support commmand line tool")
1157-
endif()
11581133
add_executable(${target_name} ${ARGN})
11591134
onnxruntime_configure_target(${target_name})
11601135
endfunction()

cmake/external/eigen

Submodule eigen updated from 1f4c031 to d10b27f

cmake/onnxruntime.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,8 +174,8 @@ set(onnxruntime_INTERNAL_LIBRARIES
174174
${onnxruntime_tvm_libs}
175175
onnxruntime_framework
176176
onnxruntime_graph
177+
${ONNXRUNTIME_MLAS_LIBS}
177178
onnxruntime_common
178-
onnxruntime_mlas
179179
onnxruntime_flatbuffers
180180
)
181181

cmake/onnxruntime_common.cmake

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -185,18 +185,7 @@ if(MSVC)
185185
elseif(onnxruntime_target_platform STREQUAL "x86")
186186
set(X86 TRUE)
187187
endif()
188-
elseif(NOT onnxruntime_BUILD_WEBASSEMBLY)
189-
if (CMAKE_OSX_ARCHITECTURES STREQUAL "arm64")
190-
set(ARM64 TRUE)
191-
elseif (CMAKE_OSX_ARCHITECTURES STREQUAL "arm64e")
192-
set(ARM64 TRUE)
193-
elseif (CMAKE_OSX_ARCHITECTURES STREQUAL "arm")
194-
set(ARM TRUE)
195-
elseif (CMAKE_OSX_ARCHITECTURES STREQUAL "x86_64")
196-
set(X86_64 TRUE)
197-
elseif (CMAKE_OSX_ARCHITECTURES STREQUAL "i386")
198-
set(X86 TRUE)
199-
endif()
188+
elseif(NOT onnxruntime_BUILD_WEBASSEMBLY AND NOT APPLE)
200189
if (CMAKE_SYSTEM_NAME STREQUAL "Android")
201190
if (CMAKE_ANDROID_ARCH_ABI STREQUAL "armeabi-v7a")
202191
set(ARM TRUE)

0 commit comments

Comments
 (0)