[all-commits] [llvm/llvm-project] b542c9: [flang][CUDA] Allocate converted kernel descriptor...

Zhen Wang via All-commits all-commits at lists.llvm.org
Sat Jun 6 16:38:45 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: b542c92494b6bd156bacedca2d24fea2215f3792
      https://github.com/llvm/llvm-project/commit/b542c92494b6bd156bacedca2d24fea2215f3792
  Author: Zhen Wang <zhenw at nvidia.com>
  Date:   2026-06-06 (Sat, 06 Jun 2026)

  Changed paths:
    M flang/lib/Optimizer/CodeGen/CodeGen.cpp
    M flang/test/Fir/CUDA/cuda-code-gen.mlir

  Log Message:
  -----------
  [flang][CUDA] Allocate converted kernel descriptors in device-accessible storage (#201950)

Fix CUDA descriptor lowering when an `fir.embox` result reaches a
`gpu.launch_func` through an intermediate `fir.convert`.

CodeGen previously failed to recognize this use chain and could place
the descriptor in host stack storage. Since CUDA kernels may dereference
assumed-shape descriptors on the device, such descriptors must be
allocated through the CUDA descriptor allocation path. Teach the
GPU-launch-use check to look through `fir.convert` so these descriptors
are lowered with `_FortranACUFAllocDescriptor`.

Also adds a regression test for the `fir.embox -> fir.convert ->
gpu.launch_func` case.



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