Skip to content

Commit

Permalink
[onnxruntime] disable executable targets in iOS build
Browse files Browse the repository at this point in the history
  • Loading branch information
luncliff committed Sep 16, 2024
1 parent 05d2a61 commit 7859e1e
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 8 deletions.
14 changes: 14 additions & 0 deletions ports/onnxruntime/fix-cmake.patch
Original file line number Diff line number Diff line change
Expand Up @@ -79,3 +79,17 @@ index 0c1e5e9..2418f9d 100644

#
# onnxruntime_ir_graph test data
diff --git a/cmake/onnxruntime_mlas.cmake b/cmake/onnxruntime_mlas.cmake
index d888f80..b6b12c5 100644
--- a/cmake/onnxruntime_mlas.cmake
+++ b/cmake/onnxruntime_mlas.cmake
@@ -725,8 +725,7 @@ block()
endblock()


-if (NOT onnxruntime_ORT_MINIMAL_BUILD)
-
+if (NOT onnxruntime_ORT_MINIMAL_BUILD AND NOT (CMAKE_SYSTEM_NAME STREQUAL "iOS"))
#
# Command line tool for quantization and de-quantization of 2-D fp32 tensors
# based on block-wise quantization of int4
16 changes: 9 additions & 7 deletions ports/onnxruntime/portfile.cmake
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY)
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" BUILD_SHARED)

set(ORT_GIT_COMMIT "26250ae74d2c9a3c6860625ba4a147ddfb936907")
set(ORT_GIT_BRANCH "v${VERSION}")
Expand Down Expand Up @@ -62,8 +61,6 @@ vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
python onnxruntime_ENABLE_PYTHON
training onnxruntime_ENABLE_TRAINING
training onnxruntime_ENABLE_TRAINING_APIS
# training onnxruntime_ENABLE_TRAINING_OPS
# training onnxruntime_ENABLE_TRAINING_TORCH_INTEROP
cuda onnxruntime_USE_CUDA
cuda onnxruntime_USE_CUDA_NHWC_OPS
openvino onnxruntime_USE_OPENVINO
Expand Down Expand Up @@ -122,6 +119,12 @@ if("coreml" IN_LIST FEATURES)
)
endif()

# see vcpkg_check_linkage above ...
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" BUILD_SHARED)

# future works?
# onnxruntime_ORT_MINIMAL_BUILD=${BUILD_MINIMAL}

# see tools/ci_build/build.py
vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}/cmake"
Expand All @@ -143,17 +146,16 @@ vcpkg_cmake_configure(
-Donnxruntime_ENABLE_BITCODE=${VCPKG_TARGET_IS_IOS}
-Donnxruntime_ENABLE_PYTHON=OFF
-Donnxruntime_ENABLE_EXTERNAL_CUSTOM_OP_SCHEMAS=OFF
-Donnxruntime_ENABLE_MEMORY_PROFILE=OFF
-Donnxruntime_ENABLE_LAZY_TENSOR=OFF
-Donnxruntime_NVCC_THREADS=1 # parallel compilation
"-DCMAKE_CUDA_FLAGS=-Xcudafe --diag_suppress=2803" # too much warnings about attribute
-Donnxruntime_DISABLE_RTTI=OFF
-Donnxruntime_DISABLE_ABSEIL=OFF
-Donnxruntime_USE_NEURAL_SPEED=OFF
-DUSE_NEURAL_SPEED=OFF
# for ORT_BUILD_INFO
-DORT_GIT_COMMIT=${ORT_GIT_COMMIT}
-DORT_GIT_BRANCH=${ORT_GIT_BRANCH}
# some other customizations ...
--compile-no-warning-as-error
"-DCMAKE_CUDA_FLAGS=-Xcudafe --diag_suppress=2803" # too much warnings about attribute
OPTIONS_DEBUG
-Donnxruntime_ENABLE_MEMLEAK_CHECKER=OFF
-Donnxruntime_ENABLE_MEMORY_PROFILE=OFF
Expand Down
2 changes: 1 addition & 1 deletion versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@
},
"onnxruntime": {
"baseline": "1.19.0",
"port-version": 1
"port-version": 2
},
"opencl": {
"baseline": "v2024.05.08",
Expand Down
5 changes: 5 additions & 0 deletions versions/o-/onnxruntime.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "dd8ac14e4e6b194e37cebd098b030fa7d554fdc1",
"version-semver": "1.19.0",
"port-version": 2
},
{
"git-tree": "9eb55d7729512170d6b61045036bba2ac0d8aa91",
"version-semver": "1.19.0",
Expand Down

0 comments on commit 7859e1e

Please sign in to comment.