Added pass optimizes MLProgram global operations by reducing to only
the minimal load/store operations for global tensors. This avoids
unnecessary global operations throughout a program and potentially
improves operation gusion.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
mlir/include/mlir/Dialect/MLProgram/Transforms/Passes.td | ||
---|---|---|
16 | Could you expand the description a bit? | |
mlir/lib/Dialect/MLProgram/IR/MLProgramOps.cpp | ||
186 | Why not have this in the for loop construct itself? | |
mlir/lib/Dialect/MLProgram/Transforms/PipelineGlobalOps.cpp | ||
53 | Could we just check for interrupted ? | |
111 | Elide trivial braces please | |
185 | inside | |
191 | Could we avoid recursion? | |
mlir/test/Dialect/MLProgram/pipeline-globals.mlir | ||
8 | Shouldn't we have a CHECK-NOT too to verify only 1? |
mlir/lib/Dialect/MLProgram/IR/MLProgramOps.cpp | ||
---|---|---|
186 | I just disliked it being on multiple lines. Updated. | |
mlir/lib/Dialect/MLProgram/Transforms/PipelineGlobalOps.cpp | ||
53 | I decided to not use it because I did not know it existed :). Updated. | |
191 | I do not think so. It is technically possible to process each block to get the list of manipulations then add the block to a worklist, however if there are sub-blocks they would also need to be iterated on. I can rework if we are concerned but it will not simplify. | |
mlir/test/Dialect/MLProgram/pipeline-globals.mlir | ||
8 | Probably a good idea. Added. |
Could you expand the description a bit?