[PATCH] D76059: [mlir][vulkan-runner] Use C-compatible wrapper emission.

Denis Khalikov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 12 10:51:10 PDT 2020


denis13 marked 2 inline comments as done.
denis13 added inline comments.


================
Comment at: mlir/lib/Conversion/GPUToVulkan/ConvertLaunchFuncToVulkanCalls.cpp:206
       loc, getInt32Type(), builder.getI32IntegerAttr(0));
+  auto operands =
+      SmallVector<Value, 16>{ciFaceVulkanLaunchCallOp.getOperands()};
----------------
rriddle wrote:
> nit: You shouldn't need to construct a vector here, just use the operand_range directly. You can then change the `llvm::drop_begin` to `operands.drop_front(...)`.
Thanks for point on this!


================
Comment at: mlir/lib/Conversion/GPUToVulkan/ConvertLaunchFuncToVulkanCalls.cpp:210
+  uint32_t operandIdx = 0;
+  for (const auto ptrToMemRefDescriptor :
+       llvm::drop_begin(operands, kNumConfigOps)) {
----------------
rriddle wrote:
> Why not use llvm::enumerate here? That would remove the need for the extra index variable.
Thanks!


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D76059





More information about the llvm-commits mailing list