[Mlir-commits] [mlir] [MLIR][GPU] Support grid constant, byval, byref on gpu.func (PR #172037)

Mehdi Amini llvmlistbot at llvm.org
Fri Dec 19 14:38:48 PST 2025


================
@@ -369,7 +370,10 @@ GPUFuncOpLowering::matchAndRewrite(gpu::GPUFuncOp gpuFuncOp, OpAdaptor adaptor,
     }
 
     if (lowersToPointer) {
+      copyPointerAttribute(mlir::NVVM::NVVMDialect::getGridConstantAttrName());
----------------
joker-eph wrote:

> Wait, what's that got to with "just transparently copy the annotations"?

You're copying annotations here from a gpu.func to a llvm.func: these are different ops, an attribute could be designed to be exclusive to gpu.func for example.


> What attribute verifier?

`verifyOperationAttribute ` : https://mlir.llvm.org/docs/DefiningDialects/#discardable-attribute-verification

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


More information about the Mlir-commits mailing list