gpt4 book ai didi

c++ - "Lane User Stack Overflow"调试CUDA程序

转载 作者:行者123 更新时间:2023-11-27 23:29:07 27 4
gpt4 key购买 nike

我正在使用 Totalview 尝试调试 CUDA 内核。我选择了在 CUDA 中调试内存错误的选项,并在主机出现内存错误时停止。

我在这条线上的一个内核中停止了:

d_test_filt[i*cols+j] = cuCmulf(cuCmulf(d_usKernel[i*cols + j],d_convolver[i*cols + j]),d_rr[i*cols + j]) ;

栏中的错误显示“Lane User Stack Overflow”

这个错误到底是什么意思?我该如何解决这个问题?

在这种情况下,所有这些 d_ 数组都已在设备上分配。 i*cols+j 远小于数组的大小 (1024 x 1024) 其中 i 和 j 分别为 311 和 808

最佳答案

CUDA-gdb 手册说:

CUDA_EXCEPTION_2 : “Lane User Stack Overflow”

This occurs when a thread exceeds its stack memory limit.

对于车道是什么的解释,CUDA-gdb 手册说:

A device thread belongs to a block, which in turn belongs to a kernel. Thread, block, and kernel are the software coordinates of the focus. A device thread runs on a lane. A lane belongs to a warp, which belongs to an SM, which in turn belongs to a device. Lane, warp, SM, and device are the hardware coordinates of the focus. Software and hardware coordinates can be used interchangeably and simultaneously as long as they remain coherent.

CUDA-gdb 手册有更多关于从 channel 中检索信息的信息。对于此错误,您超出了 AJG85 所说的最大堆栈内存限制。

关于c++ - "Lane User Stack Overflow"调试CUDA程序,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6914353/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com