tenstorrent / tt-metal

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

support 1D tensors in ttnn #8541

Closed davorchap closed 1 month ago

davorchap commented 4 months ago

User should be able to specify a 1D tensor shape , such as (10) , today it has to be specified as 2D (1,10)

arakhmati commented 4 months ago

We support 1D row-major tensors. Tilized tensors have to be 2D

davorchap commented 4 months ago

We support 1D row-major tensors. Tilized tensors have to be 2D

Thanks @arakhmati

Perhaps the original shape after tilizing+padding would still be 1D? We change the layout but the original would still be 1D

@razorback3 fyi

razorback3 commented 4 months ago

What our suggestion is: 1D row-major tensor after padding and tilizing -> 2D tensor But, if we call _shape_withoutpadding() it returns 1D tensor

blueblud7 commented 4 months ago

@davorchap Would you please share any update regarding @razorback3's comment?

davorchap commented 4 months ago

@davorchap Would you please share any update regarding @razorback3's comment?

Yes, 1D original tensor shape will be preserved.

@nsmithtt , @arakhmati and team are working through a proposal to uplift the Tensor class to support this cleanly

ayerofieiev-tt commented 2 months ago

@arakhmati @eyonland @yan-zaretskiy for vis for Tensor layout conversation

arakhmati commented 2 months ago

We can't change the dimensionality of the shape when calling shape_without_padding because it will be misleading in many other cases. And it really doesn't make sense to get tilized tensor's shape as 1D. I think Moreh should add a free function that does what's required and use it in appropriate places. This can't be a part of our infra as of right now