私はcudaでの計算に3Dグリッドを使用したいと思います。グリッドのディメンションはどれくらいですか?cuda compute capability 2.0カードで使用できますか?
--- General Information for device 0 ---
Name: Quadro 4000
Compute capability: 2.0
Clock rate: 950000
Device copy overlap: Enabled
Kernel execution timeout : Enabled
--- Memory Information for device 0 ---
Total global mem: 2146631680
Total constant Mem: 65536
Max mem pitch: 2147483647
Texture Alignment: 512
--- MP Information for device 0 ---
Multiprocessor count: 8
Shared mem per mp: 49152
Registers per mp: 32768
Threads in warp: 32
Max threads per block: 1024
Max thread dimensions: (1024, 1024, 64)
Max grid dimensions: (65535, 65535, 1)
私は何も起こりません私のコードで3Dグリッドを使用しようとする:このページには、[1]またはこの回答[2]私はこのための3つの次元を使用していますが、私のデバイスのプロパティを照会することは私に次を与えることができますと言います:
__global__ void updateBuffer(...)
{
int x = blockIdx.x;
int y = blockIdx.y;
int z = threadIdx.x;
int offset =
x +
y * width +
z * width * height;
buffer[offset] = ...;
}
__global__ void updateBuffer2(...)
{
int x = blockIdx.x;
int y = blockIdx.y;
int z = blockIdx.z;
int offset =
x +
y * width +
z * width * height;
buffer[offset] = ...;
}
void callKerner() {
dim3 blocks(extW,extH,1);
dim3 threads(extD,1,1);
dim3 blocks2(extW,extH,extD);
dim3 threads2(1,1,1);
updateBuffer<<<blocks,threads>>>(...); // works fine
updateBuffer2<<<blocks2,threads2>>>(...); // nothing happens
}
それで、3Dグリッドは一部のカードでは機能しませんか?
[1] http://en.wikipedia.org/wiki/CUDA#Version_features_and_specifications [2] Maximum blocks per grid:CUDA
をCUDAために更新することにより、それを固定もし私が言及すれば、私はcuda v3.0を使用することができます。 – Dirk