Current transformation expects module op to be two level higher, however, it is not always the case. This work searches module op in a while loop.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
mlir/lib/Conversion/NVGPUToNVVM/NVGPUToNVVM.cpp | ||
---|---|---|
757 | you could if (auto moduleOp = mOp->getParentOfType<gpu::GPUModuleOp>()) global = ... else if (auto moduleOp = mOp->getParentOfType<ModuleOp>()) global = ... else return op->emitError()... yes there would be 2 potential traversals in the worst case but I'd err towards legibility and avoid handrolling our own while |
you could
yes there would be 2 potential traversals in the worst case but I'd err towards legibility and avoid handrolling our own while