mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-06-14 00:38:20 +02:00
The destriding lowering hard-coded a special case for weight_width == 5 with a fallback "+1" branch that was only correct for 3x3 kernels. Replace it with formulas derived from TFLite's SAME-padding rule for stride 2: The half-resolution expansion applied to the reshuffle output and to the strided_to_normal() input is: weight_width / 2 which gives 1 for 3x3, 2 for 5x5, and 3 for 7x7 kernels. The reshuffle window start offset is: (weight_width + input_width % 2 - 2) / 2 This folds the previous odd-input fixup into the same expression preserves the existing 3x3 and 5x5 behavior while extending the lowering to wider odd kernels such as 7x7. Fixes Models.Op/inception_000, which uses Inception V1's Conv2d_1a_7x7, in the Teflon test suite. Signed-off-by: Maíra Canal <mairacanal@riseup.net> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41774> |
||
|---|---|---|
| .. | ||
| ci | ||
| common | ||
| drm | ||
| drm-shim | ||
| hw | ||
| hwdb | ||
| isa | ||
| meson.build | ||