-
Notifications
You must be signed in to change notification settings - Fork 3k
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
[onnxruntime/build] Add new flag enable_generic_interface to build primary EPs by default #23342
base: main
Are you sure you want to change the base?
Conversation
… now a runtime error 'LoadLibrary failed with error 1114' when loading onnxruntime_providers_openvino.dll
when building onnxruntime.dll onnxruntime_shared.dll
by introducing EP specific Interface flags
@karim-vad please read the following Contributor License Agreement(CLA). If you agree with the CLA, please reply with the following information.
Contributor License AgreementContribution License AgreementThis Contribution License Agreement (“Agreement”) is agreed to by the party signing below (“You”),
|
Remove TODO[low] that are no longer applicable
@@ -255,6 +255,11 @@ option(onnxruntime_USE_AZURE "Build with azure inferencing support" OFF) | |||
option(onnxruntime_USE_LOCK_FREE_QUEUE "Build with lock-free task queue for threadpool." OFF) | |||
option(onnxruntime_FORCE_GENERIC_ALGORITHMS "Disable optimized arch-specific algorithms. Use only for testing and debugging generic algorithms." OFF) | |||
|
|||
option(onnxruntime_USE_TENSORRT_INTERFACE "Build ONNXRuntime shared lib which is compatible with TensorRT EP interface" OFF) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Misses onnxruntime_USE_CUDA_INTERFACE
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are onnxruntime_USE_TENSORRT_INTERFACE and onnxruntime_USE_TENSORRT exclusive? Could both of them be set?
@@ -1024,6 +1032,15 @@ def generate_build_tree( | |||
"-Donnxruntime_USE_TENSORRT=" + ("ON" if args.use_tensorrt else "OFF"), | |||
"-Donnxruntime_USE_TENSORRT_BUILTIN_PARSER=" | |||
+ ("ON" if args.use_tensorrt_builtin_parser and not args.use_tensorrt_oss_parser else "OFF"), | |||
# interface variables are used only for building onnxruntime/onnxruntime_shared.dll but not EPs |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Misses onnxruntime_USE_CUDA_INTERFACE.
@@ -997,6 +1003,8 @@ def generate_build_tree( | |||
disable_optional_type = "optional" in types_to_disable | |||
disable_sparse_tensors = "sparsetensor" in types_to_disable | |||
|
|||
enable_qnn_interface = bool((args.arm64 or args.arm or args.arm64ec) and (args.enable_generic_interface)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The --arm64, --args.arm and --args.arm64ec are for Windows only and for cross-compiling only.
For example, if you build the code on an ARM64 machine and also targets ARM64, you do not need to add any of these args. So, this condition needs to be changed.
@@ -682,6 +682,7 @@ if (onnxruntime_USE_WEBGPU) | |||
endif() | |||
|
|||
set(onnxruntime_LINK_DIRS) | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Whitespace only change?
@@ -0,0 +1,13 @@ | |||
# usage: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sample code are better to be put in https://github.com/microsoft/onnxruntime-inference-examples/ , so that they will be exempted from compliance requirements(because we do not ship the code)
#include <unordered_map> | ||
#include "core/session/onnxruntime_c_api.h" | ||
|
||
const OrtApi* g_ort = OrtGetApiBase()->GetApi(ORT_API_VERSION); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please check if the returned value is NULL.
Description
Motivation and Context
Changes in the build system required to evolve the repo to build the components independently while removing unnecessary dependencies