[PATCH] D80167: [mlir][gpu] Refactor ConvertGpuLaunchFuncToCudaCalls pass.

Stephan Herhut via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed May 20 04:18:19 PDT 2020


herhut added a comment.

Thank you!



================
Comment at: mlir/include/mlir/Conversion/GPUCommon/GPUCommonPass.h:1
+//===- GPUToCUDAPass.h - MLIR CUDA runtime support --------------*- C++ -*-===//
+//
----------------
Please fix comment.


================
Comment at: mlir/lib/Conversion/GPUCommon/CMakeLists.txt:19
+  MLIRLLVMIR
+  #MLIRNVVMIR
+  MLIRPass
----------------
Please remove commented-out lines.


================
Comment at: mlir/lib/Conversion/GPUCommon/ConvertLaunchFuncToRuntimeCalls.cpp:189
+  if (!module.lookupSymbol(kGpuLaunchKernelName)) {
     // Other than the CUDA api, the wrappers use uintptr_t to match the
     // LLVM type if MLIR's index type, which the GPU dialect uses.
----------------
Maybe remove the CUDA reference here, too.


================
Comment at: mlir/test/Conversion/GPUCommon/lower-launch-func-to-gpu-runtime-calls.mlir:1
-// RUN: mlir-opt -allow-unregistered-dialect %s --launch-func-to-cuda | FileCheck %s
+// RUN: mlir-opt -allow-unregistered-dialect %s --launch-func-to-gpu-runtime="gpu-binary-annotation=nvvm.cubin" | FileCheck %s
+// RUN: mlir-opt -allow-unregistered-dialect %s --launch-func-to-gpu-runtime="gpu-binary-annotation=rocdl.hsaco" | FileCheck %s --check-prefix=ROCDL
----------------
Move this file to GPUCommon directory.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D80167





More information about the llvm-commits mailing list