PyTorch semantic of Expand operation requires Abs operation for translation which is usually a no-op.
partial value and symbol propagation for Abs operation
optimize out the Abs with nonnegative input
for this case Abs(Concat([Gather(ShapeOf), -1, 1, -1])) pulls Abs and tries to const-fold it. Resulting in Concat([Abs(Gather(ShapeOf)), 1, 1, 1]). Applies (2) to the graph and gets Concat([Gather(ShapeOf), 1, 1, 1]) because ShapeOf's lower bound is 0.
Details:
PyTorch semantic of Expand operation requires Abs operation for translation which is usually a no-op.
Tickets:
UPD: Current PR unraveled the issue in pass::Manager -- here is a WA: https://github.com/openvinotoolkit/openvino/pull/24604, ticket: CVS-141764