不支持图像的 OpenCL 中的图像
我需要访问图像中的非连续位置(nxn 像素的滑动方形窗口,其中 n > 5 覆盖在 SDTV 和 HDTV 分辨率之间的图像上)。为此,我想在 Mac 上使用 OpenCL,但当我在 iMac 上查询 ATI 5670 卡的 CL_DEVICE_IMAGE_SUPPORT 时,会返回 CL_FALSE。我现在能想到的选项是
1) 在 Apple 的 OpenCL 实现中使用 2D 数据缓冲区时,消耗 GPU(或 CPU)上非连续访问的成本。为我的 2D 数据缓冲区实现我自己的 CLK_FILTER_LINEAR/CLK_ADDRESS_CLAMP_TO_EDGE 版本。或者使用一维数据缓冲区。无论哪种情况,内核都将访问每个像素周围从 -n//2 到 n/2 的内存位置,其中每个像素是我的内核的 get_global_id()。
2) 使用 CPU 设备来处理图像(但是 Intel CPU 模拟图像支持“极其”缓慢,对吧?)
3) 安装 Windows?有谁知道 Boot Camp 是否包含允许流计算的驱动程序?或者使用 rEFIt 让 linux 在这里运行?
我是否忘记了某个选项,或者我只是使用了错误的工具来完成这项工作?
I need to access non-contiguous locations in an image (a sliding square window of n x n pixels for n > 5 overlaid on an image that's between SDTV and HDTV resolutions). I'd like to use OpenCL on a Mac for this, but CL_FALSE is returned when I query the ATI 5670 card on my iMac for CL_DEVICE_IMAGE_SUPPORT. The options I can think of right now are to
1) Eat the cost of noncontiguous access on a GPU (or CPU) when using 2D data buffers in Apple's OpenCL implementation. Implement my own version of CLK_FILTER_LINEAR/CLK_ADDRESS_CLAMP_TO_EDGE for my 2D data buffers. Or use a 1D data buffer. In either case, the kernels will be accessing memory locations from -n//2 to n/2 around each pixel, where each pixel is my kernel's get_global_id().
2) Use the CPU device for images (but Intel CPUs are "extremely" slow to emulate image support, right?)
3) Install Windows? Does anyone know if Boot Camp includes a driver that will allow for Stream computing? Or use rEFIt to get linux running on here?
Is there an option I'm forgetting, or am I just stuck with the wrong tool for the job?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论