[flang-commits] [flang] [Flang][OpenMP] Heap-allocate GPU dynamic private arrays in distribute parallel do (PR #200841)
Sergio Afonso via flang-commits
flang-commits at lists.llvm.org
Thu Jun 4 04:47:12 PDT 2026
skatrak wrote:
> I've updated the PR to extend the fix to standalone `distribute` constructs. Is there anything else you were considering to add to the scop?
Thanks for taking a look at that. My concern is that this PR should address the fact that there are problems with dynamic size private arrays inside of the GPU, but it does so by specifically targeting the privatization of `distribute parallel do`, and now also `distribute`. If the problem is the more general one I mentioned, then `target private(...)` would also show that problem, same as `teams private(...)` or `parallel private(...)` as long as they are located in a target region that offloads to a GPU. In general, this would extend to any `private` clauses appearing inside of target device code (`target` regions and `declare target` functions).
So, what I would like to know is what happens in these cases and whether this patch already addresses the only cases that are currently broken.
https://github.com/llvm/llvm-project/pull/200841
More information about the flang-commits
mailing list