0
votes

I'm working on a project that includes working with Visual Studio 2012 and CUDA Development and integrated is the Nsight Debugging environment to it. I can very easily see threads on GPU up to threadIdx == 128, however, when I try to see threads with higher index, meaning that blocks other than the first block, using debugging focus dialog box reached through CUDA Debug focus, I am having difficulty, switching to other blocks. Is this normal operation of Nsight or not, any answers would be appreciated. Thanks all.

2
What is threadIdx you a referring to? Do you mean the built-in CUDA variable (ie threadIdx.{xyz}? What is the block size you are running? - talonmies
I was referring to Cuda built-in threadIdx.x variable. - WhiteFlowers
Well then your question makes no sense. ThreadIdx is a block scope variable. It has the same range of values in every block. There are no "threads with higher index, meaning that blocks other than the first block" - talonmies
Yes, of course you're right, I should ask the question in a more elegant way. In fact, I was wondering if I can see blocks with (blockIdx.x != 0). But, anyway I have found a way and posted my method below. - WhiteFlowers

2 Answers

1
votes

I have found a way to see blocks with index higher than zero, what you just need to do is to set all the breakpoints in the cuda program as conditional and then start the Nsight debugging environment. It then shows other blocks as well. However, I think that is also related to the number of streaming multiprocessors residing on the GPU. According to my knowledge, number of streaming multiprocessors is equal to the number of blocks that can run simultaneously at the same time. I have been using for some time GeForce GT630 and that have only single streaming multiprocessor which is why I'm seeing only the first block running but not the others. However, debugging is still so slow.

0
votes

Hi switching blocks is a common operation in Nisght, please follow these steps

  1. Launch your cuda app and wait until one bp is hit.
  2. Open the "CUDA Info" windows via "Visual studio -> Nsight -> Windows -> Cuda Info"
  3. Switch the page to block, you can see all the launched blocks in current app.
  4. Double click each line and you can switch to another block.
  5. You can do the same operation for warp and thread