feature: accelerate 2D width-tiled conv and depthwise on CMSIS-NN and ESP-NN - #39
Merged
Conversation
asteinh
force-pushed
the
feature/2d-width-accel
branch
from
August 17, 2026 20:27
fdf286d to
e01736a
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
2D (width) tiles - where a single output row exceeds the fast budget so TiGrIS partitions width
as well as height - fell back to s8_ref on the accelerated backends. This teaches the CMSIS-NN and
ESP-NN Conv/Depthwise adapters to honor the packed-width tile. Third and final substep of Phase
1.5 (native tile-contract acceleration).
Stacked on #38 (1.5b); the base retargets to
developafter #38 merges.Change
tigris_accel_try_s8_ref(tigris_kernels_s8.c): a width-tiled conv/depthwise now proceeds tothe vendor adapter; every other width-tiled op still routes to s8_ref.
width_tiled, readtile.in_w/out_w/pad_leftin additionto the height tile context. CMSIS and the ESP depthwise use implicit right-pad clipping (columns
at or past IW clip to the input zero-point), mirroring the implicit bottom pad from 1.5a. The ESP
conv folds
tile.pad_left/pad_rightinto its existing asymmetric pre-pad bounce(
exec_stage_tiled_2dsets all four tile pads).test_accel_routing.c: a width-tiled conv/depthwise routes to the adapter; a width-tiled max-poolstill routes to reference.
Testing
across 12 rows so the tiling is genuinely 2D; instrumentation confirmed the CMSIS width block
executes with per-tile
in_w/out_w/pad_left, e.g. edge tilein_w=5 out_w=4 pl=1):max_abs_diff=0(bit-exact) vs reference. The 1.5a plain-height and 1.5b rolled-chaindifferentials still pass.
validated on-device (SiliconRig) separately.
Follow-up
With all three substeps landed, the accelerated multi-board bench rerun (the Phase 1 capstone) can
run without any tiled conv/depthwise silently dropping to s8_ref. The persistent CI differentials
(tiled/rolled/2D cases in
tigris-benchhost-validation + acore-versions.jsonre-pin) land afterthese merge.