Repository navigation
2.1.3
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
ADDchaining. - 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-352style chains identified during debugging).
Net effect:
- fewer unnecessary
TRANSPOSEops, - simpler graphs,
- better chance of preserving accuracy and runtime efficiency.
4) Evaluation / OP-error helper stability
- Improved
flatbuffer_directevaluation-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_convolutionis applied in bothtf_converterandflatbuffer_directflows.
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