Skip to content

Commit 14bce8f

Browse files
committed
Merge remote-tracking branch 'origin/master' into snnn/cibuildwheel
2 parents 457123d + 20ec481 commit 14bce8f

File tree

999 files changed

+104886
-8041
lines changed

Some content is hidden

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

999 files changed

+104886
-8041
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,3 +58,4 @@ onnxruntime/python/version_info.py
5858
# direnv, posh-direnv
5959
.envrc
6060
.psenvrc
61+
*.csproj.user

cgmanifests/README.md

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,27 @@
11
# CGManifest Files
22
This directory contains CGManifest (cgmanifest.json) files.
3-
See here for details: https://docs.opensource.microsoft.com/tools/cg/cgmanifest.html
3+
See [here](https://docs.opensource.microsoft.com/tools/cg/cgmanifest.html) for details.
44

5-
`cgmanifests/cgmanifest.json` contains entries that don't belong in more specific categories (e.g., git submodules).
5+
## `cgmanifests/generated/cgmanifest.json`
6+
This file contains generated CGManifest entries.
67

7-
## Git Submodules
8-
`cgmanifests/submodules/cgmanifest.json` contains entries for git submodules.
9-
It can be generated like this:
8+
It covers these dependencies:
9+
- git submodules
10+
- dependencies from the Dockerfile `tools/ci_build/github/linux/docker/Dockerfile.manylinux2014_cuda11`
1011

12+
If any of these dependencies change, this file should be updated.
13+
**When updating, please regenerate instead of editing manually.**
14+
15+
### How to Generate
1116
1. Change to the repository root directory.
12-
2. Ensure the submodules are checked out. For example, with:
17+
2. Ensure the git submodules are checked out and up to date. For example, with:
1318
```
1419
$ git submodule update --init --recursive
1520
```
1621
3. Run the generator script:
1722
```
18-
$ python cgmanifests/submodules/generate_submodule_cgmanifest.py > cgmanifests/submodules/cgmanifest.json
23+
$ python cgmanifests/generate_cgmanifest.py
1924
```
2025
21-
Please update this cgmanifest.json file when any git submodules change.
26+
## `cgmanifests/cgmanifest.json`
27+
This file contains non-generated CGManifest entries. Please edit directly as needed.

cgmanifests/cgmanifest.json

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,19 @@
11
{
22
"Registrations": [
3+
{
4+
"component": {
5+
"Type": "maven",
6+
"maven": { "GroupId": "org.junit.platform", "ArtifactId": "junit-platform-console-standalone", "Version": "1.6.2" },
7+
"DevelopmentDependency": true
8+
}
9+
},
10+
{
11+
"component": {
12+
"Type": "maven",
13+
"maven": { "GroupId": "com.google.protobuf", "ArtifactId": "protobuf-java", "Version": "3.9.2" },
14+
"DevelopmentDependency": true
15+
}
16+
},
317
{
418
"component": {
519
"type": "git",

cgmanifests/submodules/generate_submodule_cgmanifest.py renamed to cgmanifests/generate_cgmanifest.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22

33
import json
44
import os
5+
import re
56
import subprocess
67
import sys
7-
import re
88

99
SCRIPT_DIR = os.path.dirname(os.path.realpath(__file__))
10-
REPO_DIR = os.path.normpath(os.path.join(SCRIPT_DIR, "..", ".."))
10+
REPO_DIR = os.path.normpath(os.path.join(SCRIPT_DIR, ".."))
1111

1212
package_name = None
1313
package_filename = None
@@ -16,7 +16,7 @@
1616
registrations = []
1717

1818
with open(os.path.join(REPO_DIR, 'tools', 'ci_build', 'github', 'linux', 'docker', 'Dockerfile.manylinux2014_cuda11'),
19-
"r") as f:
19+
mode="r") as f:
2020
for line in f:
2121
if not line.strip():
2222
package_name = None
@@ -95,4 +95,5 @@ def normalize_path_separators(path):
9595

9696
cgmanifest = {"Version": 1, "Registrations": registrations}
9797

98-
print(json.dumps(cgmanifest, indent=2))
98+
with open(os.path.join(SCRIPT_DIR, "generated", "cgmanifest.json"), mode="w") as generated_cgmanifest_file:
99+
print(json.dumps(cgmanifest, indent=2), file=generated_cgmanifest_file)

cgmanifests/generated/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
`cgmanifests/generated/cgmanifest.json` is a generated file. Please do not edit it directly.
2+
More info [here](../README.md).

cgmanifests/submodules/cgmanifest.json renamed to cgmanifests/generated/cgmanifest.json

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@
1717
"Type": "other",
1818
"other": {
1919
"Name": "automake",
20-
"Version": "1.16.4",
21-
"DownloadUrl": "http://ftp.gnu.org/gnu/automake/automake-1.16.4.tar.gz"
20+
"Version": "1.16.5",
21+
"DownloadUrl": "http://ftp.gnu.org/gnu/automake/automake-1.16.5.tar.gz"
2222
},
2323
"comments": "manylinux dependency"
2424
}
@@ -50,8 +50,8 @@
5050
"Type": "other",
5151
"other": {
5252
"Name": "libxcrypt",
53-
"Version": "4.4.23",
54-
"DownloadUrl": "https://github.com/besser82/libxcrypt/archive/v4.4.23.tar.gz"
53+
"Version": "4.4.26",
54+
"DownloadUrl": "https://github.com/besser82/libxcrypt/archive/v4.4.26.tar.gz"
5555
},
5656
"comments": "manylinux dependency"
5757
}
@@ -61,8 +61,8 @@
6161
"Type": "other",
6262
"other": {
6363
"Name": "git",
64-
"Version": "2.32.0",
65-
"DownloadUrl": "https://www.kernel.org/pub/software/scm/git/git-2.32.0.tar.gz"
64+
"Version": "2.33.1",
65+
"DownloadUrl": "https://www.kernel.org/pub/software/scm/git/git-2.33.1.tar.gz"
6666
},
6767
"comments": "manylinux dependency"
6868
}
@@ -94,8 +94,8 @@
9494
"Type": "other",
9595
"other": {
9696
"Name": "openssl",
97-
"Version": "1.1.1k",
98-
"DownloadUrl": "https://www.openssl.org/source/openssl-1.1.1k.tar.gz"
97+
"Version": "1.1.1l",
98+
"DownloadUrl": "https://www.openssl.org/source/openssl-1.1.1l.tar.gz"
9999
},
100100
"comments": "manylinux dependency"
101101
}
@@ -264,7 +264,7 @@
264264
"component": {
265265
"type": "git",
266266
"git": {
267-
"commitHash": "1f63dcb7fcc3a8bf5c3c8e326867ecd6f5c43f35",
267+
"commitHash": "be76ca7148396176784ba8733133b9fb1186ea0d",
268268
"repositoryUrl": "https://github.com/onnx/onnx"
269269
},
270270
"comments": "git submodule at cmake/external/onnx"

cmake/CMakeLists.txt

Lines changed: 53 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
# Copyright (c) Microsoft Corporation. All rights reserved.
32
# Licensed under the MIT License.
43

@@ -18,7 +17,7 @@ cmake_policy(SET CMP0104 OLD)
1817
# Project
1918
project(onnxruntime C CXX)
2019
# Needed for Java
21-
set (CMAKE_C_STANDARD 99)
20+
set(CMAKE_C_STANDARD 99)
2221

2322
include(CheckCXXCompilerFlag)
2423
include(CheckLanguage)
@@ -108,17 +107,18 @@ option(onnxruntime_USE_ROCM "Build with AMD GPU support" OFF)
108107
option(onnxruntime_DISABLE_CONTRIB_OPS "Disable contrib ops" OFF)
109108
option(onnxruntime_DISABLE_ML_OPS "Disable traditional ML ops" OFF)
110109
option(onnxruntime_DISABLE_SPARSE_TENSORS "Disable sparse tensors data types" OFF)
111-
cmake_dependent_option(onnxruntime_DISABLE_RTTI "Disable RTTI" ON "onnxruntime_MINIMAL_BUILD;NOT onnxruntime_ENABLE_PYTHON" OFF)
112-
# For now onnxruntime_DISABLE_EXCEPTIONS will only work with onnxruntime_MINIMAL_BUILD, more changes (ONNX, non-CPU EP, ...) are required to run this standalone
113-
option(onnxruntime_DISABLE_EXCEPTIONS "Disable exception handling. Requires onnxruntime_MINIMAL_BUILD currently." OFF)
114110
option(onnxruntime_MINIMAL_BUILD "Exclude as much as possible from the build. Support ORT format models. No support for ONNX format models." OFF)
111+
cmake_dependent_option(onnxruntime_DISABLE_RTTI "Disable RTTI" ON "NOT onnxruntime_ENABLE_PYTHON" OFF)
112+
# For now onnxruntime_DISABLE_EXCEPTIONS will only work with onnxruntime_MINIMAL_BUILD, more changes (ONNX, non-CPU EP, ...) are required to run this standalone
113+
cmake_dependent_option(onnxruntime_DISABLE_EXCEPTIONS "Disable exception handling. Requires onnxruntime_MINIMAL_BUILD currently." ON "onnxruntime_MINIMAL_BUILD;NOT onnxruntime_ENABLE_PYTHON" OFF)
114+
115115
option(onnxruntime_EXTENDED_MINIMAL_BUILD "onnxruntime_MINIMAL_BUILD with support for execution providers that compile kernels." OFF)
116116
option(onnxruntime_MINIMAL_BUILD_CUSTOM_OPS "Add custom operator kernels support to a minimal build." OFF)
117117
option(onnxruntime_REDUCED_OPS_BUILD "Reduced set of kernels are registered in build via modification of the kernel registration source files." OFF)
118-
option(onnxruntime_DISABLE_ORT_FORMAT_LOAD "Disable loading an ORT format model when onnxruntime_MINIMAL_BUILD=OFF (i.e. in a full build)." OFF)
119118
option(onnxruntime_DISABLE_EXTERNAL_INITIALIZERS "Don't allow models to load external data" OFF)
120-
cmake_dependent_option(onnxruntime_ENABLE_ORT_FORMAT_RUNTIME_GRAPH_OPTIMIZATION "Enable runtime graph optimization of ORT format models." ON
121-
"NOT onnxruntime_MINIMAL_BUILD OR onnxruntime_EXTENDED_MINIMAL_BUILD" OFF)
119+
cmake_dependent_option(onnxruntime_ENABLE_ORT_FORMAT_RUNTIME_GRAPH_OPTIMIZATION
120+
"Enable runtime graph optimization of ORT format models. Warning: Not yet ready for general use."
121+
OFF "NOT onnxruntime_MINIMAL_BUILD OR onnxruntime_EXTENDED_MINIMAL_BUILD" OFF)
122122

123123
#A special option just for debugging and sanitize check. Please do not enable in option in retail builds.
124124
#The option has no effect on Windows.
@@ -170,6 +170,13 @@ set(ONNX_CUSTOM_PROTOC_EXECUTABLE "" CACHE STRING "Specify custom protoc executa
170170
# pre-build python path
171171
option(onnxruntime_PREBUILT_PYTORCH_PATH "Path to pytorch installation dir")
172172

173+
# external transformer src path
174+
option(onnxruntime_EXTERNAL_TRANSFORMER_SRC_PATH "Path to external transformer src dir")
175+
176+
if (onnxruntime_USE_CUDA)
177+
set(onnxruntime_DISABLE_RTTI OFF)
178+
endif()
179+
173180
if (APPLE)
174181
if (NOT CMAKE_OSX_ARCHITECTURES)
175182
message("Building ONNX Runtime for ${CMAKE_HOST_SYSTEM_PROCESSOR}")
@@ -179,7 +186,7 @@ elseif (NOT WIN32 AND NOT APPLE)
179186
endif()
180187

181188
# Single output director for all binaries
182-
set (RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin CACHE PATH "Single output directory for all binaries.")
189+
set(RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin CACHE PATH "Single output directory for all binaries.")
183190

184191
function(set_msvc_c_cpp_compiler_warning_level warning_level)
185192
if (NOT "${warning_level}" MATCHES "^[0-4]$")
@@ -282,8 +289,8 @@ endif()
282289
if (onnxruntime_USE_OPENMP)
283290
find_package(OpenMP)
284291
if (OPENMP_FOUND)
285-
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}")
286-
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
292+
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}")
293+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
287294
include_directories(${OpenMP_CXX_INCLUDE_DIR})
288295
else()
289296
message(WARNING "Flag --use_openmp is specified, but OpenMP is not found in current build environment. Setting it to OFF.")
@@ -329,10 +336,13 @@ if (onnxruntime_BUILD_WEBASSEMBLY)
329336
endif()
330337
endif()
331338

339+
if (onnxruntime_EXTERNAL_TRANSFORMER_SRC_PATH)
340+
add_definitions(-DORT_TRAINING_EXTERNAL_GRAPH_TRANSFORMERS=1)
341+
endif()
342+
332343
# ORT build with as much excluded as possible. Supports ORT flatbuffers models only.
333344
if (onnxruntime_MINIMAL_BUILD)
334345
add_compile_definitions(ORT_MINIMAL_BUILD)
335-
add_compile_definitions(ENABLE_ORT_FORMAT_LOAD)
336346

337347
if (onnxruntime_EXTENDED_MINIMAL_BUILD)
338348
# enable EPs that compile kernels at runtime
@@ -345,15 +355,10 @@ if (onnxruntime_MINIMAL_BUILD)
345355

346356
set(onnxruntime_REDUCED_OPS_BUILD ON)
347357

348-
if (NOT onnxruntime_ENABLE_PYTHON)
349-
# Python bindings use typeid so can't automatically disable RTTI in that case
350-
set(onnxruntime_DISABLE_RTTI ON)
351-
endif()
352-
353358
if (MSVC)
354359
# turn on LTO (which adds some compiler flags and turns on LTCG) unless it's a Debug build to minimize binary size
355360
if (NOT CMAKE_BUILD_TYPE STREQUAL "Debug")
356-
set (onnxruntime_ENABLE_LTO ON)
361+
set(onnxruntime_ENABLE_LTO ON)
357362
endif()
358363

359364
# undocumented internal flag to allow analysis of a minimal build binary size
@@ -374,11 +379,6 @@ if (onnxruntime_MINIMAL_BUILD)
374379
string(APPEND CMAKE_C_FLAGS " -g")
375380
endif()
376381
endif()
377-
else()
378-
# support ORT format model loading unless onnxruntime_DISABLE_ORT_FORMAT_LOAD is set
379-
if (NOT onnxruntime_DISABLE_ORT_FORMAT_LOAD)
380-
add_compile_definitions(ENABLE_ORT_FORMAT_LOAD)
381-
endif()
382382
endif()
383383

384384
if (onnxruntime_ENABLE_ORT_FORMAT_RUNTIME_GRAPH_OPTIMIZATION)
@@ -392,7 +392,7 @@ if (onnxruntime_ENABLE_LTO)
392392
message(WARNING "IPO is not supported by this compiler")
393393
set(onnxruntime_ENABLE_LTO OFF)
394394
else()
395-
set (CMAKE_INTERPROCEDURAL_OPTIMIZATION ON)
395+
set(CMAKE_INTERPROCEDURAL_OPTIMIZATION ON)
396396
endif()
397397
endif()
398398

@@ -405,7 +405,7 @@ if (onnxruntime_DISABLE_EXTERNAL_INITIALIZERS)
405405
endif()
406406

407407
if (onnxruntime_DISABLE_RTTI)
408-
add_compile_definitions(ORT_NO_RTTI GOOGLE_PROTOBUF_NO_RTTI)
408+
add_compile_definitions(ORT_NO_RTTI)
409409
if (MSVC)
410410
# Disable RTTI and turn usage of dynamic_cast and typeid into errors
411411
add_compile_options("$<$<COMPILE_LANGUAGE:CXX>:/GR->" "$<$<COMPILE_LANGUAGE:CXX>:/we4541>")
@@ -427,6 +427,10 @@ if (onnxruntime_DISABLE_EXCEPTIONS)
427427
message(FATAL_ERROR "onnxruntime_MINIMAL_BUILD required for onnxruntime_DISABLE_EXCEPTIONS")
428428
endif()
429429

430+
if (onnxruntime_ENABLE_PYTHON)
431+
# pybind11 highly depends on C++ exceptions.
432+
message(FATAL_ERROR "onnxruntime_ENABLE_PYTHON must be disabled for onnxruntime_DISABLE_EXCEPTIONS")
433+
endif()
430434
add_compile_definitions("ORT_NO_EXCEPTIONS")
431435
add_compile_definitions("MLAS_NO_EXCEPTION")
432436
add_compile_definitions("ONNX_NO_EXCEPTIONS")
@@ -552,30 +556,30 @@ if (MSVC)
552556
endif()
553557

554558
if (onnxruntime_ENABLE_LTO AND NOT onnxruntime_USE_CUDA)
555-
SET (CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /Gw /GL")
556-
SET (CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} /Gw /GL")
557-
SET (CMAKE_CXX_FLAGS_MINSIZEREL "${CMAKE_CXX_FLAGS_MINSIZEREL} /Gw /GL")
559+
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /Gw /GL")
560+
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} /Gw /GL")
561+
set(CMAKE_CXX_FLAGS_MINSIZEREL "${CMAKE_CXX_FLAGS_MINSIZEREL} /Gw /GL")
558562
endif()
559563

560564
# The WinML build tool chain builds ARM/ARM64, and the internal tool chain does not have folders for spectre mitigation libs.
561565
# WinML performs spectre mitigation differently.
562566
if (NOT DEFINED onnxruntime_DISABLE_QSPECTRE_CHECK)
563567
check_cxx_compiler_flag(-Qspectre HAS_QSPECTRE)
564568
if (HAS_QSPECTRE)
565-
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /Qspectre")
566-
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /Qspectre")
569+
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /Qspectre")
570+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /Qspectre")
567571
endif()
568572
endif()
569-
SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /DYNAMICBASE")
573+
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /DYNAMICBASE")
570574
check_cxx_compiler_flag(-guard:cf HAS_GUARD_CF)
571575
if (HAS_GUARD_CF)
572-
SET(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} /guard:cf")
573-
SET(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /guard:cf")
574-
SET(CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELWITHDEBINFO} /guard:cf")
575-
SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} /guard:cf")
576-
SET(CMAKE_C_FLAGS_MINSIZEREL "${CMAKE_C_FLAGS_MINSIZEREL} /guard:cf")
577-
SET(CMAKE_CXX_FLAGS_MINSIZEREL "${CMAKE_CXX_FLAGS_MINSIZEREL} /guard:cf")
578-
SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /guard:cf")
576+
set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} /guard:cf")
577+
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /guard:cf")
578+
set(CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELWITHDEBINFO} /guard:cf")
579+
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} /guard:cf")
580+
set(CMAKE_C_FLAGS_MINSIZEREL "${CMAKE_C_FLAGS_MINSIZEREL} /guard:cf")
581+
set(CMAKE_CXX_FLAGS_MINSIZEREL "${CMAKE_CXX_FLAGS_MINSIZEREL} /guard:cf")
582+
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /guard:cf")
579583
endif()
580584
else()
581585
if (NOT APPLE)
@@ -630,7 +634,7 @@ endif()
630634
if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
631635
#For Mac compliance
632636
message("Adding flags for Mac builds")
633-
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fstack-protector-strong")
637+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fstack-protector-strong")
634638
endif()
635639

636640
#Dependencies begin
@@ -736,7 +740,7 @@ else()
736740
set(protobuf_WITH_ZLIB OFF CACHE BOOL "Build with zlib support" FORCE)
737741
endif()
738742
if (onnxruntime_DISABLE_RTTI)
739-
set(protobuf_DISABLE_RTTI OFF CACHE BOOL "Remove runtime type information in the binaries" FORCE)
743+
set(protobuf_DISABLE_RTTI ON CACHE BOOL "Remove runtime type information in the binaries" FORCE)
740744
endif()
741745
add_subdirectory(${PROJECT_SOURCE_DIR}/external/protobuf/cmake EXCLUDE_FROM_ALL)
742746

@@ -931,11 +935,15 @@ if (WIN32)
931935
list(APPEND ORT_WARNING_FLAGS "/wd4251")
932936
# issued by thrust nonstandard extension used: nameless struct/union
933937
list(APPEND ORT_WARNING_FLAGS "/wd4201")
938+
# warning C4800: Implicit conversion from 'X' to bool. Possible information loss
939+
list(APPEND ORT_WARNING_FLAGS "/w34800")
934940
if (onnxruntime_USE_OPENMP)
935941
list(APPEND ORT_WARNING_FLAGS "/wd6993") # Code analysis ignores OpenMP constructs
936942
endif()
937943
# operator 'operator-name': deprecated between enumerations of different types
938944
list(APPEND ORT_WARNING_FLAGS "/wd5054")
945+
# Enable warning: data member 'member' will be initialized after data member 'member2' / base class 'base_class'
946+
list(APPEND ORT_WARNING_FLAGS "/w15038")
939947
# Treat warning as error if onnxruntime_DEV_MODE is ON
940948
# For cross-compiled ARM64 binaries, there are too many warnings to fix, hence ignore warnings for now
941949
if (onnxruntime_DEV_MODE AND NOT CMAKE_CROSSCOMPILING)
@@ -1503,6 +1511,11 @@ if (onnxruntime_USE_OPENVINO)
15031511
add_definitions(-DDEVICE_NAME="${onnxruntime_USE_OPENVINO_DEVICE}")
15041512
endif()
15051513

1514+
if(onnxruntime_USE_OPENVINO_AUTO)
1515+
add_definitions(-DOPENVINO_CONFIG_AUTO=1)
1516+
add_definitions(-DDEVICE_NAME="${onnxruntime_USE_OPENVINO_DEVICE}")
1517+
endif()
1518+
15061519
endif()
15071520

15081521
if (onnxruntime_USE_VITISAI)

cmake/external/onnx

Submodule onnx updated 156 files

0 commit comments

Comments
 (0)