Questions about private memory

Hi all,

I have some questions about the private memory.

  1. how can I find out how much private memory each work item can use?
  2. what happens if I exceed the maximum limit? I think exceeding memory is allocated by the compiler in the global memory. How can I be notified if this occurs? (any compiler flag?)
  3. how does the GPU handles the private memory swap? I mean, if I’m correct, private memory is actually implemented with register, so where do the GPU stores the registers value when switching warps? Is there any overhead on this?

In my application I’d be very happy if I could use the maximum of private memory allowed (I have lots of small matrices (e.g. 4x4) and I’m trying to map each work-item to a matrix. If I can keep the matrix and the memory needed to perform some operations on it in private mem, it would be great).

Thank you very much