我正在尝试将内存从设备复制到主机,但出现以下错误:
CUDA 错误 13:设备符号无效
__device__ __constant__ unsigned int cuda_delta = 0;
int delta = 0;
checkCuda(cudaMemcpyToSymbol(cuda_delta,
&delta,sizeof(unsigned int),
0,
cudaMemcpyHostToDevice)); // work
... // call kernel
// does not work, return CUDA Error 13: invalid device symbol
checkCuda(cudaMemcpyToSymbol(&delta,
&cuda_delta,
sizeof(unsigned int),
cudaMemcpyDeviceToHost));