[flang-commits] [flang] [flang][cuda] Relax the verifier for cuf.register_kernel op (PR #112585)

Renaud Kauffmann via flang-commits flang-commits at lists.llvm.org
Wed Oct 16 11:24:44 PDT 2024


================
@@ -281,12 +281,12 @@ mlir::LogicalResult cuf::RegisterKernelOp::verify() {
 
   mlir::SymbolTable gpuSymTab(gpuMod);
   auto func = gpuSymTab.lookup<mlir::gpu::GPUFuncOp>(getKernelName());
-  if (!func)
-    return emitOpError("device function not found");
-
-  if (!func.isKernel())
-    return emitOpError("only kernel gpu.func can be registered");
-
+  if (func) {
----------------
Renaud-K wrote:

Can we not look for the LLVMFuncOp?

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


More information about the flang-commits mailing list