[all-commits] [llvm/llvm-project] d1daf3: [flang][cuda] Do not repack CUDA device dummy argu...

khaki3 via All-commits all-commits at lists.llvm.org
Thu May 7 11:12:59 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: d1daf3eaf6ca1ec308b64381d10447c1ba333b8e
      https://github.com/llvm/llvm-project/commit/d1daf3eaf6ca1ec308b64381d10447c1ba333b8e
  Author: khaki3 <47756807+khaki3 at users.noreply.github.com>
  Date:   2026-05-07 (Thu, 07 May 2026)

  Changed paths:
    M flang/lib/Lower/ConvertVariable.cpp
    A flang/test/Lower/CUDA/cuda-repack-arrays.cuf

  Log Message:
  -----------
  [flang][cuda] Do not repack CUDA device dummy arguments (#195950)

-frepack-arrays (implied by -Ofast) was inserting fir.pack_array /
fir.unpack_array for assumed-shape dummy arguments with CUDA data
attributes (device, managed, etc.). The repacking allocates a host-side
temporary and copies the descriptor, but the data lives in device
memory. When the CUF kernel subsequently receives the host descriptor
pointer, accessing it from the GPU triggers cudaErrorIllegalAddress.

Skip repacking in needsRepack() for any symbol that carries a CUDA data
attribute.



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