How to achieve memref byte alignment?

Here is the code in c.

int an[10] __attribute__((aligned(4)))

If I want memref byte alignment, how should I do it?If anyone can help me, I would appreciate it.Thanks!

Hi,
you can specify that using the alignment attribute of the mlir::memref::AllocOp and mlir::memref::AllocaOp.

1 Like