[all-commits] [llvm/llvm-project] 81a9d7: [mlir][acc] Add mapping operation for firstprivate...

Razvan Lupusoru via All-commits all-commits at lists.llvm.org
Wed Oct 22 13:50:15 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 81a9d7528679b82625d27e4618b2388cab14cf79
      https://github.com/llvm/llvm-project/commit/81a9d7528679b82625d27e4618b2388cab14cf79
  Author: Razvan Lupusoru <razvan.lupusoru at gmail.com>
  Date:   2025-10-22 (Wed, 22 Oct 2025)

  Changed paths:
    M mlir/include/mlir/Dialect/OpenACC/OpenACC.h
    M mlir/include/mlir/Dialect/OpenACC/OpenACCOps.td
    M mlir/lib/Dialect/OpenACC/IR/OpenACC.cpp
    M mlir/test/Dialect/OpenACC/ops.mlir

  Log Message:
  -----------
  [mlir][acc] Add mapping operation for firstprivate without counter (#164677)

The OpenACC data clause operation `acc.copyin` used for mapping
variables to device memory includes bookkeeping required by the OpenACC
spec for updating present counters. However, for firstprivate variables,
no counters should be updated since this clause creates a private copy
on the device initialized with the original value from the host (as
described in OpenACC 3.4 section 2.5.14: "the copy will be initialized
with the value of that item on the local thread").

This PR introduces the `acc.firstprivate_map` operation to capture these
mapping semantics without counter updates. A test is included
demonstrating how this operation can be used to initialize a
materialized private variable (represented by `memref.alloca` inside an
`acc.parallel` region).



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