[Mlir-commits] [mlir] [MLIR] Update convert-gpu-to-spirv pass to prepare using GPU compilat… (PR #69941)

Jakub Kuderski llvmlistbot at llvm.org
Fri Oct 27 14:52:47 PDT 2023


================
@@ -143,11 +145,12 @@ void GPUToSPIRVPass::runOnOperation() {
     if (failed(applyFullConversion(gpuModule, *target, std::move(patterns))))
       return signalPassFailure();
   }
+
   // In case of OpenCL, gpu.func in original gpu.module needs to replaced with
   // an empty func.func with same arguments as gpu.func. And it also needs
   // gpu.kernel attribute set.
   module.walk([&](gpu::GPUModuleOp moduleOp) {
-    auto targetEnv = getTargetEnvFromGPUModuleOp(moduleOp);
+    const mlir::spirv::TargetEnv& targetEnv = getTargetEnvFromGPUModuleOp(moduleOp);
----------------
kuhar wrote:

```suggestion
    const spirv::TargetEnv& targetEnv = getTargetEnvFromGPUModuleOp(moduleOp);
```

https://github.com/llvm/llvm-project/pull/69941


More information about the Mlir-commits mailing list