[all-commits] [llvm/llvm-project] ad422c: [flang][cuda] Handle Constant and Shared attribute...

Zhen Wang via All-commits all-commits at lists.llvm.org
Wed Jun 3 15:18:08 PDT 2026


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

  Changed paths:
    M flang/lib/Semantics/expression.cpp
    A flang/test/Semantics/cuf-constant-generic-unified.cuf

  Log Message:
  -----------
  [flang][cuda] Handle Constant and Shared attributes in CUDA generic matching distance (#201451)

The CUDA generic resolution matching distance function did not handle
actual arguments with the `Constant` or `Shared` data attribute. These
attributes represent device memory but were unhandled, causing the
distance to fall through to infinity. Under `-gpu=mem:unified`, this led
to spurious ambiguity errors when multiple specifics (e.g.
host-to-device and device-to-device overloads) both became candidates
with tied infinite distances.

Treat Constant and Shared actuals the same as Device in the matching
distance table, since all three reside in device memory.



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