[PATCH] D71904: [mlir] GPU: introduce utilities for promotion to workgroup memory

River Riddle via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 7 11:21:37 PST 2020


rriddle added inline comments.


================
Comment at: mlir/include/mlir/Dialect/GPU/GPUOps.td:120
   let extraClassDeclaration = [{
+    /// Adds a workgroup attribution to "op" of the MemRef type with the given
+    /// shape and element type.
----------------
What is "op" here?


================
Comment at: mlir/include/mlir/Dialect/GPU/MemoryPromotion.h:3
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
----------------
This should be "MLIR Project"


================
Comment at: mlir/lib/Dialect/GPU/Transforms/MemoryPromotion.cpp:143
+  assert(fromType.getRank() != 0);
+  assert(std::distance(region.begin(), region.end()) == 1 &&
+         "unstructured control flow not supported");
----------------
has_single_element


================
Comment at: mlir/lib/IR/Block.cpp:192
+  auto arg = BlockArgument::create(type, this);
+  arguments.insert(std::next(arguments.begin(), distance), arg);
+  return arg;
----------------
Why can you not use it directly?


================
Comment at: mlir/test/lib/Transforms/TestGpuMemoryPromotion.cpp:3
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
----------------
Same here.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D71904





More information about the llvm-commits mailing list