But, In 4 pages of Reduction DOC… I don’t understand …
IN 4 Pages
Problem : Global Synchronization
CUDA has no global synchronization. Why?
Expensive to build in hardware for GPUs with high processor count
Would force programmer to run fewer blocks (no more than # multiprocessors * # resident blocks / multiprocessor) to avoid deadlock, which may reduce overall efficiency
I don’t understand…
Needs Many Blocks for my program…
I have matched M -Number of Block and Up to 512 threads of a block
I knew that Using Maximum Blocks in One cycles is Most Efficency till yesterday!!
But,That is My miss. Above statement (Would force ~~~~)
Geforce 9800 GT;
14 MPs;
a BLOCK has up to 512threads
a Grid has up to 3-D : 512 * 512 * 64
I need 2-Demsion Grid. (512 * 512)
that has 512 * 512 Blocks… equal 262144;
How many can use that one cycles…??
and How code that??
Seperate Auto?? or Manual?
Simple (My code);;
int idx = threadIdx.x;
int j = blockIdx.x + gridDim.x * blockIdx.y;
What I wrote is 100% correct and exactly mirrored in the device query output you posted above. I don’t understand where you think the ambiguity is.
BlockDim and GridDim are the selected block and grid size. threadIdx and blockIdx are the indices of a given thread and block within the block/grid hierachy so that
threadIdx.{x,y,z} < blockDim.{x,y,z} < {512,512,64} and blockIdx.{x,y}<gridDim.{x,y} < {65535,65535}
Again, I think you are misunderstanding something. The maximum number of threads in a block is always 512. The maximum dimensions of a block in the x,y, and z directions is 512,512, and 64. There is a difference between those two statements. A block of (500,500,60) is illegal, it has more than 512 total threads, even though its individual x,y, and z dimensions are permitted.
mrkyunby: “Maximum number of threads per block: 512” E.D. Riedijk: “0 < blockDim.x * blockDim.y * blockDim.z <=512” mrhyunby: “Conclusion is Total Number of threads of 3D - block equal to that of 1D-block;” avidday: “the maximum number of threads in a block is always 512”
I don’t understand… you keep saying the same thing over and over again and stating that the other side is wrong… :)