[Mlir-commits] [mlir] [MLIR][NVVM] Add definition for nvvm dialect (PR #156807)
Guray Ozen
llvmlistbot at llvm.org
Thu Sep 4 09:34:14 PDT 2025
================
@@ -35,6 +35,46 @@ def LLVM_PointerSharedCluster : LLVM_PointerInAddressSpace<7>;
//===----------------------------------------------------------------------===//
def NVVM_Dialect : Dialect {
+ let summary = "The NVVM dialect that models NVIDIA's public ISA";
+
+ let description = [{
+ The NVVM dialect is MLIR's LLVM-IR-based, NVIDIA-specific backend dialect. It
+ models NVVM intrinsics and public ISA functionality and introduces NVIDIA
+ extensions to the LLVM type system and address spaces (e.g., global, shared,
+ and cluster memory), enabling faithful lowering of GPU kernels to the NVPTX
+ toolchain. Many ops have a one-to-many mapping to NVVM/PTX: a single overloaded op
+ emits one intrinsic, selected by its operand types.
+
+ **Scope and capabilities:** The dialect covers core GPU features such as
+ thread/block builtins, barriers and atomics, warp-level collectives (e.g.,
+ shuffle/vote), matrix/tensor core operations (e.g., `mma.sync`, `wgmma`),
+ tensor memory accelerator (TMA) operations, asynchronous copies (`cp.async`,
+ bulk/tensor variants) with memory barriers, cache and prefetch controls, and
+ NVVM-specific attributes and enums (e.g., FP rounding modes, memory scopes, and
+ MMA types/layouts).
+
+ **Non-goals:** NVVM is not a place for convenience or “wrapper” ops. It is not
+ intended to introduce high-level ops that expand into multiple unrelated NVVM
+ intrinsics or that lower to no intrinsic at all. Such abstractions belong in
+ higher-level dialects (e.g., `nvgpu`, `gpu`, or project-specific dialects). The
+ design intent is a thin, predictable, low-level surface with near-mechanical
+ lowering to NVVM/LLVM IR.
+
+ **Placement in the lowering pipeline:** NVVM sits below target-agnostic dialects
+ like `gpu` and NVIDIA's `nvgpu`. Typical pipelines convert `gpu`/`nvgpu` ops
+ into NVVM using `-convert-gpu-to-nvvm` and `-convert-nvgpu-to-nvvm`, then lower
+ to the LLVM dialect for final code generation via LLVM's NVPTX backend.
----------------
grypp wrote:
changed the definition
https://github.com/llvm/llvm-project/pull/156807
More information about the Mlir-commits
mailing list