[Mlir-commits] [mlir] [MLIR][NVVM] Add pmevent (PR #152509)

Guray Ozen llvmlistbot at llvm.org
Fri Aug 8 00:16:30 PDT 2025


================
@@ -401,6 +401,44 @@ def NVVM_ReduxOp :
    }];   
 }
 
+//===----------------------------------------------------------------------===//
+// NVVM Performance Monitor events
+//===----------------------------------------------------------------------===//
+
+def NVVM_PMEventOp : NVVM_PTXBuilder_Op<"pmevent">,
+  Arguments<(ins OptionalAttr<I16Attr>:$maskedEventId, 
+                 OptionalAttr<I32Attr>:$eventId)> {
----------------
grypp wrote:

PTX does not allow having them both. They also do different things:
```
pmevent (without modifier .mask) triggers a single performance monitor event indexed by immediate operand a, in the range 0..15.

pmevent.mask triggers one or more of the performance monitor events. Each bit in the 16-bit immediate operand a controls an event.
```

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


More information about the Mlir-commits mailing list