pytorch
0a694dba - [inductor] fix avg_pool2d accuracy problem in lowering (#101789)

Commit
2 years ago
[inductor] fix avg_pool2d accuracy problem in lowering (#101789) Fixes #100987 In the current `avg_pool2d` lowering of inductor when `count_include_pad`, the mean of each window is calculated by dividing a fixing value, i.e. `kernel_size[0] * kernel_size[1]`. However for ceil mode, the amount of number in a window on the border could be less than `kernel_size[0] * kernel_size[1]`. This PR fixes the issue. Pull Request resolved: https://github.com/pytorch/pytorch/pull/101789 Approved by: https://github.com/jgong5, https://github.com/jansel, https://github.com/EikanWang
Author
Committer
Parents
Loading