[NFC] Add StrategyTilingLevel enum class to clear tiling level meaning.#8633
Conversation
The codegen used to use TilingLevel::L1Tiles and TilingLevel::VectorTiles. This is confusing in strategy approach because they are not targeting tiling sizes for L1 and vector. They are actually the tiling sizes for parallel dims and reduction dims. Correct the variable name to make confusion less.
MaheshRavishankar
left a comment
There was a problem hiding this comment.
Looks good. Just one comment, stamping anyway
| NumTileLevels = 3 | ||
| }; | ||
|
|
||
| enum class StrategyTilingLevel : unsigned { |
There was a problem hiding this comment.
Doesnt that replace the TilingLevel class above?
There was a problem hiding this comment.
The TilingLevel is still used in ARM CPU pipeline. I think it's still meaningful for mmt4d and CPUTileFuseAndVectorize approach.
|
LGTM! Just missing a bit of context: the implementation seems to imply that the last dimension will always be a reduction. Is that always the case? |
I don't follow the question. Do you mean the last enum value (i.e., ReductionTiles)? The enum class provides the meaning of each tiling sizes. The last dimension of the loop can be a parallel loop. E.g., say that we have a 2D element-wise op. A valid configuration could be |
To provide some context, The tile sizes that are decided go hand-in hand with the pipeline used. The pipeline might use these values in any way. So there is no set meaning in the attribute itself. It just carries the payload to be used later on during code-generation. The enums added here provide that meaning. First level is for distribution to workgroups, second level is for next level tile + fuse that can only tile the parallel loops, and finally the tiling for the reduction loops. |
|
Thanks for the clarifications! It makes sense to me now! |
The codegen used to use TilingLevel::L1Tiles and
TilingLevel::VectorTiles. This is confusing in strategy approach because
they are not targeting tiling sizes for L1 and vector. They are actually
the tiling sizes for parallel dims and reduction dims. Correct the
variable name to make confusion less.