[all-commits] [llvm/llvm-project] 056dae: [mlir][gpu] Add stream-based async mode to gpu.lau...

Ivan R. Ivanov via All-commits all-commits at lists.llvm.org
Thu Jul 30 10:31:13 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 056dae16f7d219f0dc943828dccd6cc3773d2674
      https://github.com/llvm/llvm-project/commit/056dae16f7d219f0dc943828dccd6cc3773d2674
  Author: Ivan R. Ivanov <iivanov at nvidia.com>
  Date:   2026-07-30 (Thu, 30 Jul 2026)

  Changed paths:
    M flang/lib/Optimizer/CodeGen/TargetRewrite.cpp
    M flang/lib/Optimizer/Transforms/CUDA/CUFOpConversion.cpp
    M flang/test/Fir/CUDA/cuda-gpu-launch-func.mlir
    M flang/test/Fir/CUDA/cuda-launch.fir
    M flang/test/Fir/CUDA/cuda-stream.mlir
    M mlir/include/mlir/Dialect/GPU/IR/GPUOps.td
    M mlir/lib/Conversion/GPUCommon/GPUToLLVMConversion.cpp
    M mlir/lib/Dialect/GPU/IR/GPUDialect.cpp
    M mlir/lib/Dialect/GPU/Transforms/KernelOutlining.cpp
    M mlir/test/Dialect/GPU/invalid.mlir
    M mlir/test/Dialect/GPU/ops.mlir

  Log Message:
  -----------
  [mlir][gpu] Add stream-based async mode to gpu.launch (#213031)

Currently, only gpu.launch_func supports stream-based asynchronicity. This
patch adds the same mode to gpu.launch, and makes kernel outlining preserve
that when converting to gpu.launch_func.

This patch also documents the stream-based model in the operations description,
which was previously missing.

This patch changes the builders for the two launch operations:

To retain the current behavior for gpu.launch one needs to add a `nullptr` for
the new `Value asyncObject` argument after the `ValueRange asyncDependencies`,
and make sure to pass a valid type for the `Type asyncTokenType` parameter if
dependency-based async behavior is intended.

For gpu.launch_func, both stream-based and dependency-based async models now go
through the same builders, which take all three `Type asyncTokenType,
ValueRange asyncDependencies, Value asyncObject` arguments. To retain
stream-based behavior, pass `nullptr, {}` to the first two parameters, while to
retain dependency-based behavior, pass `nullptr` to the third parameter.

Assisted-by: Claude Code



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list