[PATCH] D73893: [MLIR][GPU] Implement initial mapping from loop.parallel to gpu.launch.

River Riddle via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 7 10:26:36 PST 2020


rriddle added inline comments.


================
Comment at: mlir/lib/Conversion/LoopsToGPU/LoopsToGPU.cpp:503
+
+std::tuple<unsigned, AffineMap, AffineMap>
+extractMapAndOperand(Attribute attribute) {
----------------
ftynse wrote:
> I would suggest creating a struct with named fields here for better readability. And document the function plz
Generally only classes should be within anonmyous namespaces. static functions should be in global scope and marked 'static'.


================
Comment at: mlir/lib/Conversion/LoopsToGPU/LoopsToGPU.cpp:552
+
+    if (processor < gpu::LaunchOp::kNumConfigOperands) {
+      // Use the corresponding thread/grid index as replacement for the loop iv.
----------------
This function is quite large. Can you split it up a bit?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D73893/new/

https://reviews.llvm.org/D73893





More information about the llvm-commits mailing list