Repository navigation
Enable dispatching linalg.generic ops into workgroups and set tiling paramters for LLVM backend - #5573
Conversation
| return workgroupTileSizes; | ||
| } | ||
| // TODO(ataei): Set the parameters when we enable vectorization. | ||
| case TilingLevel::Level1Tiles: |
There was a problem hiding this comment.
So does this mean we are still relying on LLVM auto-vectorizer :)
There was a problem hiding this comment.
For now yes, a follow up PR will change that soon :)
| // CHECK-NEXT: %[[ARG4:[a-zA-Z0-9_]+]]: !flow.dispatch.tensor<readonly:i32> | ||
| // CHECK-SAME: %[[ARG5:[a-zA-Z0-9_]+]]: !flow.dispatch.tensor<readonly:1x?xf32> | ||
| // CHECK-SAME: %[[ARG6:[a-zA-Z0-9_]+]]: !flow.dispatch.tensor<readonly:?xf32> | ||
| // CHECK-NEXT: %[[ARG4:[a-zA-Z0-9_]+]]: !flow.dispatch.tensor<readonly:1x?xf32> |
There was a problem hiding this comment.
Thats annoying. Wish there was CHECK-SAME-DAG
There was a problem hiding this comment.
yeah toke me some time to rearrange the args :/
| "Enable fusing operand producers during dispatch region formation"), | ||
| llvm::cl::init(false)); | ||
|
|
||
| // TODO(#5045): Tile and distribute on CPU causes performance regressions. This |
paramters for LLVM backend
2b5b2dd to
d92cb44
Compare
| switch (tilingLevel) { | ||
| case TilingLevel::WorkGroupTiles: { | ||
| llvm::SmallVector<int64_t, 4> workgroupTileSizes; | ||
| int iterationRank = linalgOp.iterator_types().size(); |
There was a problem hiding this comment.
Can you just do iterationRank = getNumOuterParallelLoops(linalgOp); this way you don't pick up the reduction dimensions? Also I'm guessing you only want to tile outer parallel loops to match what is done in flow?
There was a problem hiding this comment.
Right! I want to tile outer parallel loop and also skip inner reduction ones.
|
@asaadaldien forgot to mention. You will have to drop these flags from the mako configurations too |
|
Nice to see this option gone and elementwise tiling and distribution reenabled! Thanks for fixing this, Ahmed! |
|
Interesting... this seems to make a big regression on Mobilebert for CPU, so the BuildKite tests timeout. I disable the batch mode and found that it takes 11838 ms for Mobilebert on Pixel4 CPU. |
Strange! there was no regression when this was landed. looking into it now. |
|
mmm, I can't repro this locally I am still getting ~ |
Fix #5045