Describe the bug
ttnn.max op throws Tensor rank is not 4 error when reducing 3d input tensor along batch dimension.
Additional Note:
When testing the ttnn.max op with 3d input tensor of shape (2, 32, 64) and dim = 0, it goes into if (dim[0] == rank - 3) in reduce_impl in the ttnn/cpp/ttnn/operations/reduction/generic/generic_reductions.cpp file but looks like the condition is specifically made for rank = 4.
For more context, here is the exact error message
E RuntimeError: TT_FATAL @ ../ttnn/cpp/ttnn/operations/data_movement/pad/pad.cpp:41: rank == 4
E info:
E Tensor rank is not 4
Describe the bug ttnn.max op throws
Tensor rank is not 4
error when reducing 3d input tensor along batch dimension. Additional Note: When testing the ttnn.max op with 3d input tensor of shape (2, 32, 64) and dim = 0, it goes intoif (dim[0] == rank - 3)
in reduce_impl in thettnn/cpp/ttnn/operations/reduction/generic/generic_reductions.cpp
file but looks like the condition is specifically made for rank = 4.For more context, here is the exact error message
To Reproduce Run the following test:
Expected behavior It reduces along the batch dimension for the 3d input tensor.