Samsung / ONE

On-device Neural Engine
Other
414 stars 144 forks source link

[CFe] Fix ForwardTransposeOpPass with mixed 3D, 4D #13222

Closed seanshpark closed 1 week ago

seanshpark commented 1 month ago

There's a problem with mixed rank of 3 and 4 with ForwardTransposeOpPass

image

seanshpark commented 1 month ago

This looks like Transpose should not go forward to Reshape as rank is different. --> actually we should not forward Transpose with different I/O ranks.

shs-park commented 1 month ago

Could you explain a little bit more about mixed rank from the captured image? I could't understand the image, because the input and output of the Transpose op have same rank 3 vs 3. (128x8x64 vs 8x128x64). 🥲

seanshpark commented 1 month ago

Problem is Reshape, I:3D -> O:4D. If we move Transpose forward, Transpose has to be changed from 3D to 4D and it's perm too, which depends on reshape shape, which looks quite complicated.

seanshpark commented 1 week ago

done