You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Method getLayoutSizeBytes returns incorrect memory usage for L1 Interleaved layouts.
Let's say we have a LayoutAttr showed in the image below that was created as a default DRAM layout for tensor<1x1024xbf16>:
Now, in LegalGridAnalysis we construct L1 Interleaved layout for this tensor:
It seems that we get an incorrect representation for this layout. It is expected to get memref<1x1x!tt.tile<32x32, bf16> instead of memref<1x4x!tt.tile<32x32, bf16>.
The problem appears to be in withGrid method that relies on calculateLogicalShardShape. Furthermore, we use the same withGrid method for both sharding layouts and L1 Interleaved layout. It seems that in the current implementation we are handling L1 Interleaved layouts as Block sharded layouts.
Therefore, method getLayoutSizeBytes used for calculating L1 usage doesn't work properly for L1 Interleaved layouts. In the mentioned case, it returns 8192 bytes while the actual L1 usage is 2048 bytes.
The text was updated successfully, but these errors were encountered:
Method
getLayoutSizeBytes
returns incorrect memory usage for L1 Interleaved layouts.Let's say we have a
LayoutAttr
showed in the image below that was created as a default DRAM layout fortensor<1x1024xbf16>
:Now, in LegalGridAnalysis we construct L1 Interleaved layout for this tensor:
It seems that we get an incorrect representation for this layout. It is expected to get
memref<1x1x!tt.tile<32x32, bf16>
instead ofmemref<1x4x!tt.tile<32x32, bf16>
.The problem appears to be in
withGrid
method that relies oncalculateLogicalShardShape
. Furthermore, we use the samewithGrid
method for both sharding layouts and L1 Interleaved layout. It seems that in the current implementation we are handling L1 Interleaved layouts as Block sharded layouts.Therefore, method
getLayoutSizeBytes
used for calculating L1 usage doesn't work properly for L1 Interleaved layouts. In the mentioned case, it returns8192
bytes while the actual L1 usage is2048
bytes.The text was updated successfully, but these errors were encountered: