tenstorrent / tt-metal

:metal: TT-NN operator library, and TT-Metalium low level kernel programming model.
Apache License 2.0
463 stars 70 forks source link

Runtime Error: :Permute throws valid_page_size issue #12431

Open punithsekar opened 1 month ago

punithsekar commented 1 month ago

Describe the bug When we try to permute(0,2,1,3) on shape [19,7,19,7] as the dimension value is not divisible by 2.

To Reproduce Steps to reproduce the behavior:

  1. Run the following code snippet.
    
    import torch
    import ttnn
    import pytest 

@pytest.mark.parametrize("device_params", [{"l1_small_size": 32768}], indirect=True) def test_permute(device): input_a=torch.randn(19,7,19,7) tt_input_a=ttnn.from_torch(input_a,dtype=ttnn.bfloat16,layout=ttnn.TILE_LAYOUT,device=device) tt_input_a=ttnn.permute(tt_input_a,(0, 2, 1, 3))


**Expected behavior**
To do permute op without any issue

**Screenshots**

E RuntimeError: TT_FATAL @ ../tt_metal/impl/buffers/buffer.cpp:38: valid_page_size E info: E For valid non-interleaved buffers page size 14 must equal buffer size 35376. For interleaved-buffers page size should be divisible by buffer size



**Please complete the following environment information:**
-  Ubuntu 20.04
- Device: WH-n150
punithsekar commented 1 month ago

Will try with padding the tensor and permuting it.

punithsekar commented 1 month ago

fyi @saichandax