HomePhabricator

[mlir][tosa] Fix tosa.avg_pool2d lowering to normalize correctly

Authored by rsuderman on May 17 2021, 10:00 AM.

Description

[mlir][tosa] Fix tosa.avg_pool2d lowering to normalize correctly

Initial version of pooling assumed normalization was accross all elements
equally. TOSA actually requires the noramalization is perform by how
many elements were summed (edges are not artifically dimmer). Updated
the lowering to reflect this change with corresponding tests.

Reviewed By: NatashaKnk

Differential Revision: https://reviews.llvm.org/D102540