SIGN IN SIGN UP

Adjust pad value to meet the strict convolution shape calculation (#2059)

Summary:
torch.nn.Conv2d does not require the result of
`(input_size + 2 * pad - dilation * (kernel_size - 1) - 1) / stride` must be an integer, but tosa currently strictly require this property. Add a simple function to adjust the pad value to meet the requirement.

Pull Request resolved: https://github.com/pytorch/executorch/pull/2059

Reviewed By: mcr229

Differential Revision: D54214138

Pulled By: digantdesai

fbshipit-source-id: 8ae0d3a0aabe47c61767c7ba6afa6d525054a566
T
TatWai Chong committed
24bd94e191e465114e17dec35398b7ae1b9be646
Parent: f327e53
Committed by Facebook GitHub Bot <facebook-github-bot@users.noreply.github.com> on 2/27/2024, 7:50:40 PM