Halide is a programming language designed to make it easier to write high-performance image and array processing code on modern machines.
halide有两个特性比较吸引人。一个是对于各种平台架构的支持。
CPU architectures: X86, ARM, MIPS, Hexagon, PowerPC Operating systems: Linux, Windows, macOS, Android, iOS, Qualcomm QuRT GPU Compute APIs: CUDA, OpenCL, OpenGL, OpenGL Compute Shaders, Apple Metal, Microsoft Direct X 12 另一个是把计算什么和怎么计算(何时计算)分离开来。
由于发现cuda c++ 的 debug方式和c++ 差别很大,因此打算再开一篇,专门记录一些和error checking 以及debug有关的内容.
Error checks in CUDA code can help catch CUDA errors at their source. There are 2 sources of errors in CUDA source code:
update:有毒吧,kernel 中出问题原来不会报错。
请教了组里的 hust 学长 orz..
学到了 cuda-memcheck 命令和 cudaGetLastError 来查看问题,可以参考What is the canonical way to check for errors using the CUDA runtime API?
先放一波资料。
An Even Easier Introduction to CUDA CUDA C/C++ Basics nvidia-thrust 官方文档 how-access-global-memory-efficiently-cuda-c-kernels efficient-matrix-transpose-cuda-cc 很强大的warp内shuffle cuda-GDB官方文档 cuda-c-best-practices-guide cuda 提出的目的是能够让程序员透明地使用GPU来高效地进行并行运算。