【发布时间】:2011-09-27 18:56:19
【问题描述】:
我有一个内核,它以不同的网格大小运行两次。
我的问题是 cuPrintf。当我在内核运行之前没有cudaPrintfInit() 并且在内核运行之后没有cudaPrintfDisplay(stdout, true) 和cudaPrintfEnd() 时,我没有错误,但是当我把它们放在那里时,我得到“未指定的启动失败”错误。
在我的设备代码中,只有一个这样的循环用于打印:
if (threadIdx.x==0) {
cuPrintf("MAX:%f x:%d y:%d\n", maxVal, blockIdx.x, blockIdx.y);
}
我将 CUDA 4.0 与具有 cuda 能力 2.0 的卡一起使用,因此我正在使用以下语法编译我的代码:
nvcc LB2.0.cu -arch=compute_20 -code=sm_20
【问题讨论】:
标签: cuda compiler-errors