Fast 2D GPU-based convolution

版本 1.0.0.0 (49.0 KB) 作者: Alexander Huth
Graphics chip assisted fast 2d convolution
4.0K 次下载
更新时间 2008/7/16

查看许可证

cudaconv - Performs 2d convolution using an NVIDIA graphics chipset.

For large datasets (~1 million elements) and especially for large kernels (performance does not scale much with kernel size) cudaconv can outperform conv2 by as much as 5000%.

I did not create this algorithm.. it is adapted from an example included in the CUDA SDK and wrapped in MATLAB-compatible C code.

With very large data matrices, it can *completely* crash your computer(/graphics driver?), so beware. In testing, I found an upper limit on convolution size (limited either by the size the CUDA FFT function can accept or the size of a 2D texture) of roughly 2^20 elements, so above that the code breaks the convolution into smaller pieces. If you are feeling adventurous, feel free to raise that limit, but be aware that at those sizes cudaconv is already roughly 50-100x faster than conv2.

引用格式

Alexander Huth (2026). Fast 2D GPU-based convolution (https://ww2.mathworks.cn/matlabcentral/fileexchange/20220-fast-2d-gpu-based-convolution), MATLAB Central File Exchange. 检索时间: .

MATLAB 版本兼容性
创建方式 R2007a
兼容任何版本
平台兼容性
Windows macOS Linux
类别
Help CenterMATLAB Answers 中查找有关 GPU Computing 的更多信息
版本 已发布 发行说明
1.0.0.0

Updated help, included testing script and image of benchmarks.