[mlir] Change to re-enable cuda-runner tests
authorJacques Pienaar <jpienaar@google.com>
Sat, 6 Jun 2020 16:31:51 +0000 (09:31 -0700)
committerJacques Pienaar <jpienaar@google.com>
Sat, 6 Jun 2020 16:31:51 +0000 (09:31 -0700)
mlir-cuda-runner tests were failing post
https://reviews.llvm.org/D80676, small change to get those passing
again. More cleanup may be needed post.

mlir/lib/Conversion/GPUCommon/ConvertLaunchFuncToRuntimeCalls.cpp

index 5f922c8..37b0562 100644 (file)
@@ -464,6 +464,8 @@ void GpuLaunchFuncToGpuRuntimeCallsPass::translateGpuLaunchCalls(
 std::unique_ptr<mlir::OperationPass<mlir::ModuleOp>>
 mlir::createConvertGpuLaunchFuncToGpuRuntimeCallsPass(
     StringRef gpuBinaryAnnotation) {
+  if (gpuBinaryAnnotation.empty())
+    return std::make_unique<GpuLaunchFuncToGpuRuntimeCallsPass>();
   return std::make_unique<GpuLaunchFuncToGpuRuntimeCallsPass>(
       gpuBinaryAnnotation);
 }