Skip to content

2.0.6

Choose a tag to compare

@PINTO0309 PINTO0309 released this 11 Feb 04:34
· 2173 commits to main since this release
9833eb5

2.0.6

Summary

flatbuffer introduces an opt-in direct TFLite generation backend and related tooling.

1) New backend and integration points

  • Add tflite_backend switch with tf_converter (default) and flatbuffer_direct
  • Keep existing TensorFlow-based path as default while enabling direct path incrementally
  • Wire direct backend into CLI/API entry points

2) Direct FlatBuffer builder implementation

  • Add new onnx2tf/tflite_builder/ module tree (IR, lowering, op dispatch/builders, model writer)
  • Implement direct export path for float32/float16 .tflite
  • Add schema loader with pinned LiteRT schema.fbs tag handling

3) Quantization, evaluation, and splitting features

  • Add staged quantization support in direct path:
    • dynamic range quantization controls
    • integer/full-integer variants including int16-activation variants
  • Add ONNX-vs-TFLite accuracy evaluation reports
  • Add size-based auto split planning/output and split accuracy evaluation

4) Coverage diagnostics and custom-op policy

  • Add op registry + coverage report generation (*_op_coverage_report.json)
  • Add policy matrix and reason-code based unsupported diagnostics
  • Add custom-op candidate flow with allowlist controls
  • Add fallback option --flatbuffer_direct_fallback_to_tf_converter

5) Direct preprocess pipeline and migration from TF-path optimizations

  • Add preprocess pipeline foundation and rules:
    • pattern fusion
    • pseudo-op rewrites
    • attribute normalization
    • limited constant folding
  • Expand direct builtin support incrementally (including reductions/index/norm and selected activations)

6) Tests and docs

  • Add focused test suites for direct builder, preprocess, split planner, and op coverage snapshots
  • Update README and migration guide with:
    • supported/unsupported policy visibility
    • TF vs direct behavior differences
    • rollout and troubleshooting guidance
    • explicit note that flatbuffer_direct is experimental

Diff summary

  • Commits ahead of main: 67
  • Major additions include onnx2tf/tflite_builder/** and new direct-path test suites

Notes

  • This PR does not change the default backend (tf_converter remains default).

What's Changed

  • Plan by @PINTO0309 in #838
  • Step 1: Add staged tflite_backend switch and flatbuffer_direct stub by @PINTO0309 in #839
  • Step 10-12: Add limited dynamic-range quantization for flatbuffer_direct by @PINTO0309 in #840
  • Step 13: Expand dynamic-range quantization targets in flatbuffer_direct by @PINTO0309 in #841
  • Step 14: Wire quant_type into flatbuffer_direct dynamic-range quantization by @PINTO0309 in #842
  • Step 15: Add limited integer quantization support for flatbuffer_direct by @PINTO0309 in #843
  • Step 16-17: Improve quantization precision controls and add int16-act direct outputs by @PINTO0309 in #844
  • Step 18: Finalize concrete specs for evaluation/splitting/full-op rollout by @PINTO0309 in #845
  • Step 19: ONNX vs TFLite accuracy report foundation by @PINTO0309 in #846
  • Step 20: Operationalize ONNX-TFLite evaluation for CLI/CI by @PINTO0309 in #847
  • Step 21: Add TFLite split size estimation and partition planning by @PINTO0309 in #848
  • Step 22: Implement split outputs and manifest generation by @PINTO0309 in #849
  • Step 23: Add split-model accuracy evaluation and reporting by @PINTO0309 in #850
  • Step 24: OPレジストリ化とカバレッジレポート導入 by @PINTO0309 in #851
  • Step 25: Wave1 high-frequency unary op support by @PINTO0309 in #852
  • Step 26: Wave2 reduce/index/norm support by @PINTO0309 in #853
  • Step 27: establish custom-op policy and diagnostics by @PINTO0309 in #854
  • Step 29: auto split size option with KB/MB/GB and split-target linkage by @PINTO0309 in #855
  • Step 30: document flatbuffer_direct ONNX op support matrix by @PINTO0309 in #856
  • Step 31: add direct optimization migration plan by @PINTO0309 in #857
  • Step A1: 棚卸し結果とカバレッジ運用ルールを反映 by @PINTO0309 in #858
  • Step A2: direct 共通プリパス基盤の導入 by @PINTO0309 in #859
  • Step A3: 擬似OP置換ルール(Wave1)移植 by @PINTO0309 in #860
  • Step A4: 複合パターン吸収(Wave2)移植 by @PINTO0309 in #861
  • Step A5: 属性・shape 正規化の強化 by @PINTO0309 in #862
  • Step A6: custom-op candidate 縮小フェーズ(Einsum builtin優先) by @PINTO0309 in #863
  • Step A7: テスト・回帰固定(coverage key/reason_code snapshot) by @PINTO0309 in #864
  • Step A8: 文書化・運用導線整備と experimental 明示 by @PINTO0309 in #865
  • Merge flatbuffer: add direct TFLite FlatBuffer backend and tooling by @PINTO0309 in #866

Full Changelog: 2.0.5...2.0.6