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
Add pass changing (un-)squeeze ops to view in TOSA lowering
Since squeeze ops are special cases of the view op it is enough to handle only view ops, removing the need for the squeeze/unsqueeze node visitors.
Change-Id: Ib00d05692fa3a5e48c21f52eb2234c4495ac169e
Transposes are needed for operators transforming the input to a different rank, as 4D-tensors are assumed to be in NHWC-format, whereas all other are in NCHW format.
201
178
This is relevant for the following cases:
202
-
- squeeze: 4D -> <4D
203
-
- unsqueeze: 3D -> 4D
204
179
- view: <4D -> 4D
205
180
- view: 4D -> <4D
206
181
Additionally, a 4D->4D view operation acting on the channel dimension currently needs to be performed in NCHW format, leadning to one extra input and output transpose for this case.
Replaces squeeze/unsqueeze operators with view. These are simply special cases of the view op, so removing them gives us less cases to handle in the node visitiors.
0 commit comments