https://bugs.llvm.org/show_bug.cgi?id=44367
Alexey Bataev <[email protected]> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |INVALID
Status|NEW |RESOLVED
--- Comment #4 from Alexey Bataev <[email protected]> ---
(In reply to Ye Luo from comment #3)
> (In reply to Alexey Bataev from comment #1)
> > 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
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.
--
You are receiving this mail because:
You are on the CC list for the bug._______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs