[all-commits] [llvm/llvm-project] 67a641: [mlir][acc] Specialize compute region target durin...

Razvan Lupusoru via All-commits all-commits at lists.llvm.org
Wed Jun 3 14:23:06 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 67a641cf8adb083e6694fbf306b375b99c45de91
      https://github.com/llvm/llvm-project/commit/67a641cf8adb083e6694fbf306b375b99c45de91
  Author: Razvan Lupusoru <razvan.lupusoru at gmail.com>
  Date:   2026-06-03 (Wed, 03 Jun 2026)

  Changed paths:
    M mlir/include/mlir/Dialect/OpenACC/OpenACCCGOps.td
    M mlir/lib/Dialect/OpenACC/IR/OpenACC.cpp
    M mlir/lib/Dialect/OpenACC/IR/OpenACCCG.cpp
    M mlir/lib/Dialect/OpenACC/Transforms/ACCComputeLowering.cpp
    A mlir/test/Dialect/OpenACC/acc-compute-lowering-compute-async-wait.mlir
    M mlir/test/Dialect/OpenACC/canonicalize.mlir

  Log Message:
  -----------
  [mlir][acc] Specialize compute region target during ACCComputeLowering (#201386)

During ACCComputeLowering, when an acc compute region (such as
acc.parallel) is split into in acc.kernel_environment and
acc.compute_region, all wait and async operands are transferred over.
This includes the multiple lists that are used to manage device_type
specific aspects eg:
`acc parallel async device_type(nvidia) async(2)`
This ends up as
`acc.parallel async([#acc.device_type<none>], %c2_i32 : i32
[#acc.device_type<nvidia>])`

And similarly, acc.kernel_environment inherited both async aspects.
However, during ACCComputeLowering, the pass knows its device_type
target. Thus it can directly create a single async (because only
async(2) applies when device_type is nvidia): `acc.kernel_environment
async(%c2_i32 : i32)`

This MR simplifies the operation to not hold all of the multiple lists
and updates to ACCComputeLowering pass to ensure to transfer only
relevant information. The intent/goal is that the none of the CG
operations will hold device_type specific lists.



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