mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-03-12 06:50:32 +01:00
ethosu: Fix padding calculation
The subtractions in MAX2() can end up negative in which case we want to return 0 rather than the negative value as unsigned. Signed-off-by: Rob Herring (Arm) <robh@kernel.org> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40081>
This commit is contained in:
parent
7c6dbb099a
commit
6f417f4716
1 changed files with 1 additions and 1 deletions
|
|
@ -18,7 +18,7 @@ is_depthwise(const struct pipe_ml_operation *poperation)
|
|||
}
|
||||
|
||||
static unsigned
|
||||
needed_total_padding(unsigned input_size, unsigned stride, unsigned filter_size)
|
||||
needed_total_padding(int input_size, int stride, int filter_size)
|
||||
{
|
||||
if (input_size % stride == 0)
|
||||
return MAX2(filter_size - stride, 0);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue