Describe the bug
The ttnn.upsample throws assertion error because of data mismatch between PyTorch and TTNN output when both height and width of input tensor are odd or when scalar factor = 4 or 8 . Shape mismatch between pytorch result of interpolation and TTNN output observed when scalar factor = 4 and atleast one of height and width are even. Also ttnn.upsample throws assertion error because of data mismatch between PyTorch and TTNN output when mode = Bilinear
To Reproduce
Steps to reproduce the behavior:
git checkout kkannan/upsample_issues
git submodule update --recursive
# test case 2 - both width and height is odd & scale factor = 2
pytest tests/ttnn/unit_tests/operations/test_upsample.py -k "odd" -svv
# test case 3 - scale factor = 4
pytest tests/ttnn/unit_tests/operations/test_upsample.py -k "sf4" -svv
# test case 4 - scale factor = 8
pytest tests/ttnn/unit_tests/operations/test_upsample.py -k "sf8" -svv
# test case 5 - mode = bilinear & atleast one of the width / height is even & scale factor = 2
pytest tests/ttnn/unit_tests/operations/test_upsample.py -k "single_core_bilinear" -svv
Expected behavior
The data mismatch between PyTorch and TTNN output & shape mismatch between pytorch result of interpolation and TTNN output should be resolved.
Describe the bug The ttnn.upsample throws assertion error because of data mismatch between PyTorch and TTNN output when both height and width of input tensor are odd or when scalar factor = 4 or 8 . Shape mismatch between pytorch result of interpolation and TTNN output observed when scalar factor = 4 and atleast one of height and width are even. Also ttnn.upsample throws assertion error because of data mismatch between PyTorch and TTNN output when mode = Bilinear
To Reproduce Steps to reproduce the behavior:
Expected behavior The data mismatch between PyTorch and TTNN output & shape mismatch between pytorch result of interpolation and TTNN output should be resolved.
Logs