Skip to main content
Question

Nature of flatten operation

  • January 7, 2026
  • 1 reply
  • 12 views

Hello,

Following the question I had on running a GEMM only model, I have settled for a model that has Id Conv → Flatten → Gemm . I was wondering if the Flatten operation is just rearranging some pointer values or if it is doing a memory operation (like copying the tensor or something like that)?

Thank you very much,

1 reply

Spanner
Axelera Team
Forum|alt.badge.img+2
  • Axelera Team
  • January 7, 2026

Hi ​@MArio!,

Good question. Flatten is generally a "view" or "reshape" operation. to my knowledge. It changes how the tensor dimensions are interpreted. So the underlying data stays in the same order; only the logical shape changes.

Your pattern (Conv → Flatten → Gemm) is a supported configuration, so I don’t think you should see significant overhead from the Flatten itself, although I’d be very interested in seeing your results when you test this out.

Is there a specific performance concern you're tackling here?