tt-metal: Interleaved to sharded does not work correctly on BH when input sticks are 16 in ROW_MAJOR_LAYOUT
Isolated the issue to padded_offset_bytes = align(input_unit_size, input.buffer()->alignment()); in interleaved_to_sharded.
When input width is 16 (BFLOAT16, so 32b), in ROW_MAJOR_LAYOUT, the generated sharded output has alternating rows of 0s with the data, e.g.:
0: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
1: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
2: 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
3: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
4: 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
5: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
...
In this use case, the input unit size is 32b, and DRAM alignment on BH is 64b, so padded_offset_bytes is also 64, which is the increment value for the write ptr.
Branch: asarje/debug-halo-bh
Test: pytest "tests/ttnn/unit_tests/operations/test_maxpool2d.py::test_run_max_pool[dtype=DataType.BFLOAT16-dilation=(1, 1)-stride=(2, 2)-padding=(1, 1)-kernel_size=(3, 3)-act_shape=[1, 16, 1056, 160]-device_params={'l1_small_size': 24576}]"
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 16 (16 by maintainers)
Commits related to this issue
- #12184: Alignment fix for BH in I2S and S2I ### Ticket [Link to Github Issue](https://github.com/tenstorrent/tt-metal/issues/12184#event-15046053642) ### Problem description Alignment issue fo... — committed to tenstorrent/tt-metal by ntarafdar 2 years ago
- Revert "#12184: Alignment fix for BH in I2S and S2I " This reverts commit cf1c75e4a0106ef0081fb390f867f29a2616a21a. — committed to tenstorrent/tt-metal by tt-aho 2 years ago
- Revert "#12184: Alignment fix for BH in I2S and S2I" This reverts commit cf1c75e4a0106ef0081fb390f867f29a2616a21a. — committed to tenstorrent/tt-metal by ttmchiou 2 years ago
- Revert "#12184: Alignment fix for BH in I2S and S2I" This reverts commit cf1c75e4a0106ef0081fb390f867f29a2616a21a. — committed to tenstorrent/tt-metal by ttmchiou 2 years ago
- #12184: Alignment fix for BH on I2S and S2I (fix after revert) (#15055) ### Ticket [Link to Github Issue](https://github.com/tenstorrent/tt-metal/issues/12184#event-15046053642) ### Problem desc... — committed to tenstorrent/tt-metal by ntarafdar 2 years ago
I believe @ntarafdar (pls correct me if I’m wrong) will take over the alignment related issues.
Mid next week
On Thu, Sep 26, 2024 at 15:20 Abhinav Sarje @.***> wrote: