首页 > CUDA分配存储空间有限制么?

CUDA分配存储空间有限制么?

float* src;
cudaError_t err = cudaMalloc((void**)&src, totalsize*sizeof(float));

// totalsize 是 512*512*354
// 这里总是分配不成功,err = cudaErrorMemoryAllocation,是太大了么



查了下API,确实是这个原因

cudaErrorMemoryAllocation = 2 The API call failed because it was
unable to allocate enough memory to perform the requested operation.

Read more at:
http://docs.nvidia.com/cuda/cuda-runtime-api/index.html#ixzz3ullrrFke
Follow us: @GPUComputing on Twitter | NVIDIA on Facebook

如果数据过大,是一个三维的数据,有什么办法可以解决么

【热门文章】
【热门文章】