mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-05-19 21:32:23 +00:00
* Add ability to generate configuration that includes required types for individual operators, to allow build size reduction based on that.
- Add python bindings for ORT format models
- Add script to update bindings and help info
- Add parsing of ORT format models
- Add ability to enable type reduction to config generation
- Update build.py to only allow operator/type reduction via config
- simpler to require config to be generated first
- can't mix a type aware (ORT format model only) and non-type aware config as that may result in insufficient types being enabled
- Add script to create reduced build config
- Update CIs
23 lines
994 B
CMake
23 lines
994 B
CMake
# Copyright (c) Microsoft Corporation. All rights reserved.
|
|
# Licensed under the MIT License.
|
|
|
|
file(GLOB onnxruntime_flatbuffers_srcs CONFIGURE_DEPENDS
|
|
"${ONNXRUNTIME_ROOT}/core/flatbuffers/*.h"
|
|
"${ONNXRUNTIME_ROOT}/core/flatbuffers/*.cc"
|
|
)
|
|
|
|
source_group(TREE ${REPO_ROOT} FILES ${onnxruntime_flatbuffers_srcs})
|
|
|
|
add_library(onnxruntime_flatbuffers ${onnxruntime_flatbuffers_srcs})
|
|
onnxruntime_add_include_to_target(onnxruntime_flatbuffers onnx flatbuffers)
|
|
if(onnxruntime_ENABLE_INSTRUMENT)
|
|
target_compile_definitions(onnxruntime_flatbuffers PUBLIC ONNXRUNTIME_ENABLE_INSTRUMENT)
|
|
endif()
|
|
target_include_directories(onnxruntime_flatbuffers PRIVATE ${ONNXRUNTIME_ROOT})
|
|
add_dependencies(onnxruntime_flatbuffers ${onnxruntime_EXTERNAL_DEPENDENCIES})
|
|
set_target_properties(onnxruntime_flatbuffers PROPERTIES FOLDER "ONNXRuntime")
|
|
|
|
# Add dependency so the flatbuffers compiler is built if enabled
|
|
if (FLATBUFFERS_BUILD_FLATC)
|
|
add_dependencies(onnxruntime_flatbuffers flatc)
|
|
endif()
|