[all-commits] [llvm/llvm-project] 239cbf: [flang][cuda] Delay box cuf.alloc past host associ...
Zhen Wang via All-commits
all-commits at lists.llvm.org
Wed Aug 5 18:35:15 PDT 2026
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 239cbf5baf092fc738e59443d11948b26d8db386
https://github.com/llvm/llvm-project/commit/239cbf5baf092fc738e59443d11948b26d8db386
Author: Zhen Wang <zhenw at nvidia.com>
Date: 2026-08-05 (Wed, 05 Aug 2026)
Changed paths:
M flang/lib/Optimizer/Transforms/CUDA/CUFAllocDelay.cpp
M flang/test/Transforms/CUF/cuf-alloc-delay.fir
Log Message:
-----------
[flang][cuda] Delay box cuf.alloc past host association captures (#214347)
CUFAllocDelay treated the store of a descriptor into a host association
tuple as a use, so a device allocatable captured by an internal
procedure kept its descriptor allocation in the prologue. That allocates
managed memory before the program can call cudaSetDevice, binding a CUDA
context to the wrong device.
The store now sinks together with the allocation, constrained by the
tuple's readers, and the group is placed at the nearest common dominator
of all uses so it can sink into a later block.
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