나는 cuda로 계산하기 위해 3D 그리드를 사용하고 싶다. 이 페이지 [1] 또는이 답변이 [2] 나는이 세 가지 차원을 사용할 수 있다고하지만, 내 장치의 속성을 조회하면 다음 날 제공 : 내 코드 아무것도 차원 격자를 사용하려고하면그리드의 치수는 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)
발생 :
__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
4.0 CUDA을 업데이트하여 고정이 내가 cuda v3.0을 사용한다고 언급하면 도움이된다. – Dirk