Universal binaries for OpenCL

会有一股神秘感。 提交于 2019-12-12 01:36:24

问题


I have 2 computers, one with Raden R9 290x, and Raden R7 250 in another. The following discussion focuses only on AMD graphics cards. On both machines the same driver installed. I wrote OpenCL kernel, compile it into a binary and use clCreateProgramWithBinary. But I was faced with the following challenges:

Compiled binaries for these two devices are different: for R7 binary weighs ~ 500KB, and for R9 ~ 1.5MB.

I have no problem when using the binary on the device for which it was compiled, everything happens instantly. But if I try to run the binary for R7 at R9, then clBuildProgram executed a very long time (~ 1 min.), And contrary (binary from R9 load to R7) clBuildProgram - causes access violation.

I need to get the binary that will run on all of AMD's graphics cards, support OpenCL. How to compile OpenCL kernel that it would work properly on all devices?

来源:https://stackoverflow.com/questions/36621232/universal-binaries-for-opencl

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!