pytorch/torch/testing
CaoE 7963aaac41 add Half support for AdaptiveAvgPool2d and AdaptiveMaxPool2d on CPU (#102079)
### Testing

Single core:

AdaptiveMaxPool2d:
shape | fp32 forward / ms | fp16 forward / ms | bf16 forward / ms | fp32 backward / ms | fp16 backward / ms | bf16 backward / ms
-- | -- | -- | -- | -- | -- | --
input size: (2, 56, 264, 264), output size: (100, 100)  | 71.5826 | 78.7460 | 85.7195 | 7.3925 | 6.0618 | 6.2596
input size: (2, 56, 264, 264), output size: (50, 50)  | 28.122 | 30.8572 | 36.6366 | 6.2645 | 3.4781 | 3.6628
input size: (32, 32, 100, 100), output size: (50, 50)  | 109.2978 | 115.0330 | 121.9500 | 13.4329 | 10.2769 | 12.1975
input size: (16, 4, 300, 300), output size: (100, 100) | 34.1849 | 36.5876 | 40.9862 | 4.7719 | 4.3362 | 4.1417

28 cores:

AdaptiveMaxPool2d:

shape | fp32 forward / ms | fp16 forward / ms | bf16 forward / ms | fp32 backward / ms | fp16 backward / ms | bf16 backward / ms
-- | -- | -- | -- | -- | -- | --
input size: (2, 56, 264, 264), output size: (100, 100)  | 3.1809 | 3.5057 | 3.6728 | 0.6657 | 0.3138 | 0.2934
input size: (2, 56, 264, 264), output size: (50, 50)  | 1.2779 | 1.3869 | 1.5238 | 0.4223 | 0.1775 | 0.1825
input size: (32, 32, 100, 100), output size: (50, 50)  | 4.7942 | 4.9670 | 5.2330 | 1.7146 | 0.6477 | 0.7001
input size: (16, 4, 300, 300), output size: (100, 100) | 1.9522 | 2.0879 | 2.3155 | 0.4370 | 0.3175 | 0.2828

Pull Request resolved: https://github.com/pytorch/pytorch/pull/102079
Approved by: https://github.com/jgong5, https://github.com/malfet
2023-11-20 03:01:00 +00:00
..
_internal add Half support for AdaptiveAvgPool2d and AdaptiveMaxPool2d on CPU (#102079) 2023-11-20 03:01:00 +00:00
__init__.py
_comparison.py [BE]: Update lintrunner mypy to 1.6.0 (#111375) 2023-10-17 01:22:06 +00:00
_creation.py Add meta func for scaled mm (#112609) 2023-11-03 03:44:22 +00:00