c - How to see CUDA thread value using Nvidia NSight in VS 2010? -



c - How to see CUDA thread value using Nvidia NSight in VS 2010? -

i know there way @ variable values in given kernel, example, threadidx.x = 1 on info working , what's value of data?

all working correctly, question how see variables can in normal vs, using "quick watch" or "add watch", equivalent in nsight? give thanks you, have been struggling few hours now.

i have cuda info window , cuda warp window showing blockidx, threadidx coordinates when debuging through nsight.

__global__ void addkernel(int *c, const int *a, const int *b) { int = threadidx.x; if(i<n) c[i]=a[i]*b[i]; // dummy code if(i<2) int k=i; }

my kernel called addkernel<<<1,n>>>(dev_c,dev_a,dev_b)and #define n 10.

i set breakpoints within if , else. output in warp window set show:

*(a+i) *(b+i) *(c+i) 0 0 -1 0 2 1 -1 1 4 4 -1 2 6 9 -1 3 8 16 -1 4

so, c never set up. how so? give thanks you

p.s. can guys give me minuses give when see question -1. again

after adding dummy lines kernel able see value of column c updated. so, solution. know sounds trivial , have seek adding dummy lines before , didn't work unless dummy lines other variable, not threads used in calculation of c. so, in short, calculate new threads(or whatever new can go in kernel) , add together lines after variable see in cuda warp window.

c cuda nvidia nsight

Comments

Popular posts from this blog

web services - java.lang.NoClassDefFoundError: Could not initialize class net.sf.cglib.proxy.Enhancer -

Accessing MATLAB's unicode strings from C -

javascript - mongodb won't find my schema method in nested container -