首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >cuda无效配置参数

cuda无效配置参数
EN

Stack Overflow用户
提问于 2014-02-10 01:43:18
回答 1查看 1.4K关注 0票数 1

我试图用一些参数启动内核,我认为这些参数是有效的,但正在接收无效的配置参数错误。

我把尺寸设成这样:

代码语言:javascript
复制
dim3 BlockDim = dim3(128, 1, 1);
dim3 GridDim  = dim3(321, 320, 1);

然后启动我的内核

代码语言:javascript
复制
kernel<<<BlockDim,GridDim>>>();

我的理解是,这应该是好的。从设备查询中可以得到:

代码语言:javascript
复制
Device 0: "Tesla C1060"
  CUDA Driver Version / Runtime Version          6.0 / 5.5
  CUDA Capability Major/Minor version number:    1.3
  Total amount of global memory:                 4096 MBytes (4294770688 bytes)
  (30) Multiprocessors x (  8) CUDA Cores/MP:    240 CUDA Cores
  GPU Clock rate:                                1296 MHz (1.30 GHz)
  Memory Clock rate:                             800 Mhz
  Memory Bus Width:                              512-bit
  Max Texture Dimension Size (x,y,z)             1D=(8192), 2D=(65536,32768), 3D=(2048,2048,2048)
  Max Layered Texture Size (dim) x layers        1D=(8192) x 512, 2D=(8192,8192) x 512
  Total amount of constant memory:               65536 bytes
  Total amount of shared memory per block:       16384 bytes
  Total number of registers available per block: 16384
  Warp size:                                     32
  Maximum number of threads per multiprocessor:  1024
  Maximum number of threads per block:           512
  Maximum sizes of each dimension of a block:    512 x 512 x 64
  Maximum sizes of each dimension of a grid:     65535 x 65535 x 1
  Maximum memory pitch:                          2147483647 bytes
  Texture alignment:                             256 bytes
  Concurrent copy and kernel execution:          Yes with 1 copy engine(s)
  Run time limit on kernels:                     No
  Integrated GPU sharing Host Memory:            No
  Support host page-locked memory mapping:       Yes
  Alignment requirement for Surfaces:            Yes
  Device has ECC support:                        Disabled
  Device supports Unified Addressing (UVA):      No
  Device PCI Bus ID / PCI location ID:           66 / 0
  Compute Mode:

我是不是漏掉了什么?

我还做了几个测试:

作品

代码语言:javascript
复制
dim3 BlockDim = dim3(128, 1, 1);
dim3 GridDim  = dim3(200, 1, 1);

不工作

代码语言:javascript
复制
dim3 BlockDim = dim3(128, 1, 1);
dim3 GridDim  = dim3(30001, 1, 1);
EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2014-02-10 01:56:30

弄明白了。

我在内核调用中反转了blockDim和gridDim。

应该是:

代码语言:javascript
复制
kernel<<<GridDim,BlockDim>>>();
票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/21667743

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档