[PATCH] D78541: [MLIR] Ensure `gpu.func` must be inside a `gpu.module`.
River Riddle via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Apr 21 01:02:58 PDT 2020
rriddle added inline comments.
================
Comment at: mlir/test/lib/Transforms/TestGpuMemoryPromotion.cpp:28
: public PassWrapper<TestGpuMemoryPromotionPass,
- OperationPass<gpu::GPUFuncOp>> {
+ OperationPass<gpu::GPUModuleOp>> {
void runOnOperation() override {
----------------
Can you just change the pipeline specification in the tests instead of changing this pass?
================
Comment at: mlir/test/lib/Transforms/TestGpuMemoryPromotion.cpp:30
void runOnOperation() override {
- gpu::GPUFuncOp op = getOperation();
- for (unsigned i = 0, e = op.getNumArguments(); i < e; ++i) {
- if (op.getArgAttrOfType<UnitAttr>(i, "gpu.test_promote_workgroup"))
- promoteToWorkgroupMemory(op, i);
- }
+ gpu::GPUModuleOp gpu_module = getOperation();
+ gpu_module.walk([](Operation *operation) {
----------------
MLIR uses camelCase for variable names.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D78541/new/
https://reviews.llvm.org/D78541
More information about the llvm-commits
mailing list