Skip to content

2.1.3

Choose a tag to compare

@PINTO0309 PINTO0309 released this 04 Mar 03:44
· 2081 commits to main since this release
fd88e14

2.1.3

Summary

This PR focuses on functional improvements in the flatbuffer_direct backend: broader builtin-op conversion coverage, stronger layout optimization (transpose elimination), and more stable evaluation/reporting behavior.

The goal is to reduce CUSTOM-op fallbacks, improve conversion fidelity on real models, and keep output checks reliable.

Functional Improvements

1) Builtin-op coverage expansion (CUSTOM fallback reduction)

This PR adds and stabilizes several builtin conversion paths so models that previously required CUSTOM lowering can stay on builtin TFLite operators.

Highlights:

  • Einsum lowering improvements for practical attention-style patterns, with builtin decomposition paths.
  • Variadic Sum support via builtin ADD chaining.
  • Improved lowering behavior around complex conv/fused-conv paths and related shape/materialization logic, reducing unsupported cases and improving robustness for dynamic/placeholder shape scenarios.
  • Additional operator-registry and validator coverage so more models can remain on direct builtin lowering.

2) 3D GridSample support improvements

  • Added support/validation for rank-5 (3D) GridSample patterns.
  • Tightened validation behavior for acceptable/rejectable grid formats.

3) Aggressive redundant transpose cleanup (major runtime/size win)

  • Extended NHWC propagation and rewrite logic for difficult pre-concat subgraphs.
  • Added handling for deeper Split/Add cascade patterns and nested add-chain cases.
  • Eliminates transpose islands that were previously left in place in real workloads (including the best-352 style chains identified during debugging).

Net effect:

  • fewer unnecessary TRANSPOSE ops,
  • simpler graphs,
  • better chance of preserving accuracy and runtime efficiency.

4) Evaluation / OP-error helper stability

  • Improved flatbuffer_direct evaluation-helper behavior for edge cases in temporary input handling and intermediate comparison flow.
  • Improved reliability of op-error reporting flow in scenarios that previously produced unstable helper-side failures.

5) Behavior/docs alignment for -dgc

  • Documentation now reflects actual behavior: --disable_group_convolution is applied in both tf_converter and flatbuffer_direct flows.

What this means for users

  • More models convert with builtin ops only (or fewer CUSTOM fallbacks).
  • Better parity and stability when running -cotof -tb flatbuffer_direct.
  • Cleaner TFLite graphs due to stronger transpose-chain elimination.
  • More predictable debugging and op-level error analysis.

Validation

  • Added/expanded targeted tests for:
    • builtin-lowering behavior (including Einsum/Sum-related paths),
    • 3D GridSample validation,
    • transpose-chain optimization regressions,
    • op-error helper/reporting edge cases.
  • Local verification was performed on representative models used during regression debugging (including best-352) and output checks remained passing after optimization.

What's Changed

  • Improve flatbuffer_direct lowering, built-in coverage, and transpose cleanup by @PINTO0309 in #894

Full Changelog: 2.1.2...2.1.3