1

I'm working on CUDA and I have a doubt about global memory and streams CUDA.

Let:

__device__ float Aux[32];
__global__ void kernel1(...) {
    [...]
    Aux[threadIdx.y] = 0;
    [...]
}

So, if I run this kernel on different streams GPU. Is Aux the same for all streams? or there is a Aux variable for all streams being Aux global variable? I can't find that information in the guide cuda.

Thanks in advance.

einpoklum
  • 118,144
  • 57
  • 340
  • 684
userCUDA
  • 11
  • 2

1 Answers1

2

It's the same for all streams.

Streams control the (partial) order in which kernels are executed. They do not create new namespaces.

tera
  • 7,080
  • 1
  • 21
  • 32