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

Make partitioning utils QDQ aware so it does not break up QDQ node units #19723

Merged
merged 16 commits into from
Mar 12, 2024
Merged
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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions cmake/external/onnxruntime_external_deps.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,13 @@ if (onnxruntime_BUILD_UNIT_TESTS)
set(gtest_disable_pthreads ON)
endif()
set(INSTALL_GTEST OFF CACHE BOOL "" FORCE)
if (CMAKE_SYSTEM_NAME STREQUAL "iOS")
# Needs to update onnxruntime/test/xctest/xcgtest.mm
if (IOS OR ANDROID)
# on mobile platforms the absl flags class dumps the flag names (assumably for binary size), which breaks passing
# any args to gtest executables, such as using --gtest_filter to debug a specific test.
# Processing of compile definitions:
# https://github.com/abseil/abseil-cpp/blob/8dc90ff07402cd027daec520bb77f46e51855889/absl/flags/config.h#L21
# If set, this code throws away the flag and does nothing on registration, which results in no flags being known:
# https://github.com/abseil/abseil-cpp/blob/8dc90ff07402cd027daec520bb77f46e51855889/absl/flags/flag.h#L205-L217
set(GTEST_HAS_ABSL OFF CACHE BOOL "" FORCE)
else()
set(GTEST_HAS_ABSL ON CACHE BOOL "" FORCE)
Expand Down
4 changes: 2 additions & 2 deletions cmake/onnxruntime_providers_coreml.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,8 @@ list(FILTER coreml_proto_generated_srcs INCLUDE REGEX "\.pb\.(h|cc)$")
source_group(TREE ${CMAKE_CURRENT_BINARY_DIR} PREFIX coreml_proto_generated FILES ${coreml_proto_generated_srcs})

# These are shared utils,
# TODO, move this to a separated lib when used by EPs other than NNAPI and CoreML
file(GLOB_RECURSE onnxruntime_providers_shared_utils_cc_srcs CONFIGURE_DEPENDS
# TODO, move this to a separate lib when used by EPs other than NNAPI and CoreML
file(GLOB onnxruntime_providers_shared_utils_cc_srcs CONFIGURE_DEPENDS
"${ONNXRUNTIME_ROOT}/core/providers/shared/utils/utils.h"
"${ONNXRUNTIME_ROOT}/core/providers/shared/utils/utils.cc"
)
Expand Down
6 changes: 2 additions & 4 deletions cmake/onnxruntime_providers_nnapi.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,10 @@
endif()

# These are shared utils,
# TODO, move this to a separated lib when used by EPs other than NNAPI and CoreML
# TODO, move this to a separate lib when used by EPs other than NNAPI and CoreML
list(APPEND onnxruntime_provider_nnapi_cc_src_patterns
"${ONNXRUNTIME_ROOT}/core/providers/shared/utils/utils.h"
"${ONNXRUNTIME_ROOT}/core/providers/shared/utils/utils.cc"
"${ONNXRUNTIME_ROOT}/core/providers/shared/node_unit/node_unit.h"
"${ONNXRUNTIME_ROOT}/core/providers/shared/node_unit/node_unit.cc"
)

file(GLOB onnxruntime_providers_nnapi_cc_srcs CONFIGURE_DEPENDS ${onnxruntime_provider_nnapi_cc_src_patterns})
Expand All @@ -81,4 +79,4 @@
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
FRAMEWORK DESTINATION ${CMAKE_INSTALL_BINDIR})
endif()
endif()
8 changes: 3 additions & 5 deletions cmake/onnxruntime_providers_qnn.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,10 @@
add_compile_definitions(USE_QNN=1)

# These are shared utils,
# TODO, move this to a separated lib when used by EPs other than QNN, NNAPI and CoreML
file(GLOB_RECURSE onnxruntime_providers_shared_utils_cc_srcs CONFIGURE_DEPENDS
# TODO, move to a separate lib when used by EPs other than QNN, NNAPI and CoreML
file(GLOB onnxruntime_providers_shared_utils_cc_srcs CONFIGURE_DEPENDS
"${ONNXRUNTIME_ROOT}/core/providers/shared/utils/utils.h"
"${ONNXRUNTIME_ROOT}/core/providers/shared/utils/utils.cc"
"${ONNXRUNTIME_ROOT}/core/providers/shared/node_unit/node_unit.h"
"${ONNXRUNTIME_ROOT}/core/providers/shared/node_unit/node_unit.cc"
)

file(GLOB_RECURSE
Expand Down Expand Up @@ -42,4 +40,4 @@
# ignore the warning unknown-pragmas on "pragma region"
if(NOT MSVC)
target_compile_options(onnxruntime_providers_qnn PRIVATE "-Wno-unknown-pragmas")
endif()
endif()
3 changes: 0 additions & 3 deletions cmake/onnxruntime_providers_xnnpack.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,6 @@
"${ONNXRUNTIME_INCLUDE_DIR}/core/providers/xnnpack/*.h"
"${ONNXRUNTIME_ROOT}/core/providers/xnnpack/*.h"
"${ONNXRUNTIME_ROOT}/core/providers/xnnpack/*.cc"
# utils for handling QDQ models
"${ONNXRUNTIME_ROOT}/core/providers/shared/node_unit/node_unit.h"
"${ONNXRUNTIME_ROOT}/core/providers/shared/node_unit/node_unit.cc"
)

source_group(TREE ${REPO_ROOT} FILES ${onnxruntime_providers_xnnpack_cc_srcs})
Expand Down
Loading
Loading