Skip to content

Reduce DataTypeImpl binary size#9783

Merged
skottmckay merged 4 commits intomasterfrom
skottmckay/DataTypesBinarySizeReductions
Nov 19, 2021
Merged

Reduce DataTypeImpl binary size#9783
skottmckay merged 4 commits intomasterfrom
skottmckay/DataTypesBinarySizeReductions

Conversation

@skottmckay
Copy link
Copy Markdown
Contributor

Description:
Reduce the number of virtual methods in DataTypeImpl to reduce binary size.
Refactor some helpers to reduce the amount of templatized code.

Motivation and Context
Counter binary size increases from new types.

./build.bat --config MinSizeRel --build_dir "build\Android\arm64.static\1711.NoOps" --android --android_sdk_path D:\Android --android_ndk_path D:\Android\ndk\21.1.6352462\ --android_abi arm64-v8a --android_api 29 --cmake_generator Ninja --disable_ml_ops --disable_exceptions --build_shared_lib --skip_tests --minimal_build --include_ops_by_config .\no_ops.config --cmake_extra_defines onnxruntime_DISABLE_SPARSE_TENSORS=ON onnxruntime_ENABLE_ORT_FORMAT_RUNTIME_GRAPH_OPTIMIZATION=OFF

master: 1,212,232
with changes:1,183,560

reduction: 28KB

… size.

Refactor some helpers to reduce the amount of templatized code.
edgchen1
edgchen1 previously approved these changes Nov 18, 2021
@skottmckay skottmckay merged commit dc1724b into master Nov 19, 2021
@skottmckay skottmckay deleted the skottmckay/DataTypesBinarySizeReductions branch November 19, 2021 00:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants