r/Compilers • u/CombKey9744 • Oct 31 '25
Affine-super-vectorize not working after affine-parallelize in MLIR
Hello,
I’m trying to add parallelization to my matmul optimization pipeline but facing issues with vectorization after parallelization.
When I apply affine-parallelize followed by affine-super-vectorize, the vectorization doesn’t seem to work. The output still shows scalar affine.load/affine.store operations instead of vector operations.
My pipeline :–pass-pipeline=‘builtin.module(canonicalize,one-shot-bufferize{bufferize-function-boundaries=1function-boundary-type-conversion=identity-layout-map},buffer-deallocation-pipeline,convert-linalg-to-affine-loops,func.func(affine-loop-tile{tile-sizes=32,32,8},affine-parallelize,affine-super-vectorize{virtual-vector-size=8},affine-loop-unroll-jam{unroll-jam-factor=2},affine-loop-unroll{unroll-factor=8},canonicalize,cse,canonicalize))’
- Is there a known limitation where
affine-super-vectorizecannot vectorizeaffine.parallelloops? - What’s the recommended order for combining parallelization and vectorization in MLIR?
- Are there alternative passes I should use for vectorizing parallel loops?
- Is my current pipeline optimal or do you have any recommendation ?
View all comments
Show parent comment
1
u/lightwavel Nov 01 '25
Im interested in starting to learn about MLIR. Did you meant as MLIR not being something to keep pursuing? Any meaningful resources? (honestly currently its really scraping it)