简体   繁体   English

调试OpenCL内核

[英]Debug OpenCL kernel

I am working with OpenCL and I have many problems with the pointers(segmentation violation). 我正在使用OpenCL,但指针有很多问题(违反分段)。 How I can debug the kernel code for GPU to see the memory where I am putting my atributes and see my mistakes?? 如何调试GPU的内核代码,以查看将属性分配到的内存并查看错误?

There were/are some GPU debugging tools, but another method is to use the Intel CPU driver and debug using a CPU debugger. 有/有一些GPU调试工具,但是另一种方法是使用Intel CPU驱动程序并使用CPU调试器进行调试。 Here's an article from Intel on how to do it: https://software.intel.com/en-us/node/539339 这是英特尔有关如何执行此操作的文章: https : //software.intel.com/zh-cn/node/539339

Alternatively, since it's C99, you can just move the kernel code into a regular C/C++ program and get the logic working there first, and then move it to a kernel. 另外,由于它是C99,因此您只需将内核代码移至常规C / C ++程序中,然后使逻辑在那里首先工作,然后将其移至内核。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM