<html>
<head>
<base href="https://bugs.llvm.org/">
</head>
<body><span class="vcard"><a class="email" href="mailto:a.bataev@hotmail.com" title="Alexey Bataev <a.bataev@hotmail.com>"> <span class="fn">Alexey Bataev</span></a>
</span> changed
<a class="bz_bug_link
bz_status_RESOLVED bz_closed"
title="RESOLVED INVALID - private clause not working in offload"
href="https://bugs.llvm.org/show_bug.cgi?id=44367">bug 44367</a>
<br>
<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>What</th>
<th>Removed</th>
<th>Added</th>
</tr>
<tr>
<td style="text-align:right;">Resolution</td>
<td>---
</td>
<td>INVALID
</td>
</tr>
<tr>
<td style="text-align:right;">Status</td>
<td>NEW
</td>
<td>RESOLVED
</td>
</tr></table>
<p>
<div>
<b><a class="bz_bug_link
bz_status_RESOLVED bz_closed"
title="RESOLVED INVALID - private clause not working in offload"
href="https://bugs.llvm.org/show_bug.cgi?id=44367#c4">Comment # 4</a>
on <a class="bz_bug_link
bz_status_RESOLVED bz_closed"
title="RESOLVED INVALID - private clause not working in offload"
href="https://bugs.llvm.org/show_bug.cgi?id=44367">bug 44367</a>
from <span class="vcard"><a class="email" href="mailto:a.bataev@hotmail.com" title="Alexey Bataev <a.bataev@hotmail.com>"> <span class="fn">Alexey Bataev</span></a>
</span></b>
<pre>(In reply to Ye Luo from <a href="show_bug.cgi?id=44367#c3">comment #3</a>)
<span class="quote">> (In reply to Alexey Bataev from <a href="show_bug.cgi?id=44367#c1">comment #1</a>)
> > Do you see the problem when building for ТМЗЕЧ? try to offload to the host
> > and what you get when the offloading device is the host.
>
> Yes, I was testing offload to NVPTX.
> clang -fopenmp -fopenmp-targets=nvptx64-nvidia-cuda
> target_teams_distribute_private.c</span >
Try to compile and run this cuda code:
#include <stdio.h>
__global__ void foo() {
int a;
printf("%d, %p\n", threadIdx.x, &a);
}
int main() {
foo<<<1, 32>>>();
if (cudaDeviceSynchronize() != cudaSuccess) {
fprintf(stderr, "Cuda call failed\n");
}
return 0;
}
You will get the same result. This is a feature of NVPTX. Local variables are
allocated in local memory which private to each thread. So, it is not a bug, it
is a feature of GPU architecture and the test is not compatible with target.</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are on the CC list for the bug.</li>
</ul>
</body>
</html>