[Mlir-commits] [mlir] [MLIR][NVVM] Add asynchronous store Op (PR #210931)
Guray Ozen
llvmlistbot at llvm.org
Wed Jul 22 03:21:25 PDT 2026
================
@@ -668,6 +668,50 @@ LogicalResult BulkStoreOp::verify() {
return success();
}
+LogicalResult AsyncStoreOp::verify() {
+ unsigned addrSpace =
+ llvm::cast<LLVM::LLVMPointerType>(getAddr().getType()).getAddressSpace();
+ NVVM::AsyncStoreScope scope = getScope();
+ mlir::Type valueType = getValue().getType();
+ bool isMmio = getIsMmio();
+ bool isMultimem = getIsMultimem();
+
+ if (addrSpace == NVVMMemorySpace::Global) {
+ if (getMbarrier())
+ return emitOpError("mbarrier is not supported for global address space");
+
+ if (valueType.isInteger(128))
+ return emitOpError("only 8, 16, 32, and 64 bit values are supported for "
+ "global address space");
+
+ if (scope == AsyncStoreScope::NONE)
+ return emitOpError(
+ "scope must be set for async store to global address space");
+
+ if (isMmio && scope != AsyncStoreScope::SYS)
+ return emitOpError("mmio is only supported for SYS scope");
+
+ if (isMmio && isMultimem)
+ return emitOpError("multimem is not supported for mmio");
+ }
+
+ if (addrSpace == NVVMMemorySpace::SharedCluster) {
+ if (valueType.isInteger(8) || valueType.isInteger(16))
+ return emitOpError("only 32, 64, and 128 bit values are supported for "
+ "shared cluster address space");
+
+ if (isMultimem || isMmio)
+ return emitOpError("multimem and mmio are not supported for shared "
+ "cluster address space");
----------------
grypp wrote:
>From the codegen side, splitting by address space doesn't buy us much. Every generator now has to decide which op to emit based on the address space, which just moves the complexity from one central verifier into all the generators. A slightly larger verifier is fine by me — that's exactly where this kind of constraint checking belongs.
https://github.com/llvm/llvm-project/pull/210931
More information about the Mlir-commits
mailing list