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

feat: model compression draft for review #2767

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

rkuester
Copy link
Contributor

This draft PR exists for reviewing the complete model compression feature. It and its series of commits are not designed to be merged into main; it comes from a branch that is a mostly-squashed snapshot of the feature.

Add a feature-complete draft of the model compression feature in
a single commit. This commit isn't intended for merging into
mainline; it exists solely for reviewers and testers to take an
early look.
@ddavis-2015
Copy link
Member

ddavis-2015 commented Nov 14, 2024

Regarding the changes to .c and .h files:

  • Header files
tensorflow/lite/micro/micro_interpreter_context.h
tensorflow/lite/micro/micro_context.h
tensorflow/lite/micro/micro_allocator.h
tensorflow/lite/micro/kernels/kernel_util.h
tensorflow/lite/micro/compression/metadata_saved.h
tensorflow/lite/micro/compression.h
  • Unit testing framework
tensorflow/lite/micro/test_helper_custom_ops.cc
tensorflow/lite/micro/test_helper_custom_ops.h
tensorflow/lite/micro/test_helpers.cc
tensorflow/lite/micro/test_helpers.h
tensorflow/lite/micro/micro_utils.h
  • Kernel unit tests
tensorflow/lite/micro/kernels/transpose_conv_test.cc
tensorflow/lite/micro/kernels/fully_connected_test.cc
tensorflow/lite/micro/kernels/depthwise_conv_test.cc
tensorflow/lite/micro/kernels/conv_test_common.cc
tensorflow/lite/micro/kernels/conv_test.h
tensorflow/lite/micro/kernels/conv_test.cc
tensorflow/lite/micro/kernels/concatenation_test.cc

  • Other unit tests
tensorflow/lite/micro/recording_micro_allocator_test.cc
tensorflow/lite/micro/micro_resource_variable_test.cc
tensorflow/lite/micro/micro_interpreter_test.cc
  • Reference kernels
tensorflow/lite/micro/micro_resource_variable.cc
tensorflow/lite/micro/micro_resource_variable.h
tensorflow/lite/micro/kernels/transpose_conv.h
tensorflow/lite/micro/kernels/transpose_conv.cc
tensorflow/lite/micro/kernels/fully_connected.h
tensorflow/lite/micro/kernels/fully_connected.cc
tensorflow/lite/micro/kernels/depthwise_conv_common.cc
tensorflow/lite/micro/kernels/depthwise_conv.cc
tensorflow/lite/micro/kernels/conv_common.cc
tensorflow/lite/micro/kernels/conv.h
tensorflow/lite/micro/kernels/conv.cc
tensorflow/lite/micro/kernels/concatenation.cc
tensorflow/lite/micro/kernels/assign_variable.cc
  • Xtensa kernels
tensorflow/lite/micro/kernels/xtensa/conv.cc
tensorflow/lite/micro/kernels/xtensa/conv_hifi.cc
tensorflow/lite/micro/kernels/xtensa/conv_int16_reference.cc
tensorflow/lite/micro/kernels/xtensa/conv_int8_reference.cc
tensorflow/lite/micro/kernels/xtensa/conv_vision.cc
tensorflow/lite/micro/kernels/xtensa/depthwise_conv.cc
tensorflow/lite/micro/kernels/xtensa/depthwise_conv_hifi.cc
tensorflow/lite/micro/kernels/xtensa/depthwise_conv_vision.cc
tensorflow/lite/micro/kernels/xtensa/fully_connected.cc
tensorflow/lite/micro/kernels/xtensa/fully_connected_common_xtensa.cc
tensorflow/lite/micro/kernels/xtensa/fully_connected_int8.cc
tensorflow/lite/micro/kernels/xtensa/fully_connected_vision.cc
tensorflow/lite/micro/kernels/xtensa/transpose_conv.cc
  • Reference decompression code
tensorflow/lite/micro/kernels/decompress_test.cc
tensorflow/lite/micro/kernels/decompress_common.cc
tensorflow/lite/micro/kernels/decompress.h
tensorflow/lite/micro/kernels/decompress.cc
  • Xtensa decompression code
tensorflow/lite/micro/kernels/xtensa/decompress.cc
  • MicroInterpreter/MicroContext compression support
tensorflow/lite/micro/micro_interpreter_context.cc
tensorflow/lite/micro/micro_context.cc
tensorflow/lite/micro/micro_allocator.cc
  • Generic Benchmark application
tensorflow/lite/micro/tools/benchmarking/generic_model_benchmark.cc
tensorflow/lite/micro/tools/benchmarking/metrics.cc
tensorflow/lite/micro/tools/benchmarking/show_meta_data.cc.template
tensorflow/lite/micro/recording_micro_allocator.cc
tensorflow/lite/micro/recording_micro_allocator.h
  • CI test failure due to strict arena size
tensorflow/lite/micro/examples/micro_speech/micro_speech_test.cc
tensorflow/lite/micro/memory_arena_threshold_test.cc
  • Improved debug output
tensorflow/lite/micro/memory_planner/greedy_memory_planner.cc

commit 300751d
Author: ddavis-2015 <[email protected]>
Date:   Wed Nov 20 12:03:16 2024 -0800

    Update to latest Cadence code.  Int8 any bitwidth on normal quant axis updated.

commit 0a49b2a
Author: ddavis-2015 <[email protected]>
Date:   Wed Nov 20 10:50:30 2024 -0800

    Add input tensor CRC to Generic Benchmark application.
    Only use -O3 -LNO:simd with the xtensa decompress.cc target.

commit 83dafce
Author: ddavis-2015 <[email protected]>
Date:   Mon Nov 18 17:23:58 2024 -0800

    cleanup

commit 2f8cead
Author: ddavis-2015 <[email protected]>
Date:   Mon Nov 18 13:29:33 2024 -0800

    Revert FakeMicroContext changes for alternate profiler.
    Add default alternate profiler implementation to MicroContext.

commit fddf003
Author: ddavis-2015 <[email protected]>
Date:   Mon Nov 18 12:29:26 2024 -0800

    Fix typo.

commit ae6a207
Author: ddavis-2015 <[email protected]>
Date:   Mon Nov 18 12:29:06 2024 -0800

    Implement alternate profiler for MicroInterpreter.
    Enable use of alternate profiler by decompression code.
    Enable use of alternate profiler by Generic Benchmark application.

commit 5e1a1c9
Author: ddavis-2015 <[email protected]>
Date:   Sun Nov 10 18:24:02 2024 -0800

    changes to make the memory planner debug output easier to interpret

commit f651c88
Author: ddavis-2015 <[email protected]>
Date:   Sun Nov 10 04:27:29 2024 -0800

    single pending ops queue
    process pending ops recursively

commit cfd9890
Author: ddavis-2015 <[email protected]>
Date:   Sun Nov 10 00:26:14 2024 -0800

    expand model_facade
    redo var handle tracking

commit 7776cda
Author: ddavis-2015 <[email protected]>
Date:   Tue Nov 5 13:24:58 2024 -0800

    remove [[maybe_unused]]

commit 40e7530
Author: ddavis-2015 <[email protected]>
Date:   Mon Nov 4 11:17:43 2024 -0800

    fix arena

commit 0d889e0
Author: ddavis-2015 <[email protected]>
Date:   Sat Nov 2 14:18:55 2024 -0700

    Fix MicroProfiler bug with ClearEvents().
    Add pre-inference profiling to the Generic Benchmark.
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