Linux 如何让 OpenCL 在 ATI Radeon 卡上工作
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/4161195/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How to get OpenCL working on an ATI Radeon card
提问by User1
I'm trying to compile dolphin, a Nintendo emulator. I downloaded the trunk and it compiled fine but it won't link. Instead, I get this error:
我正在尝试编译dolphin,一个任天堂模拟器。我下载了主干,它编译得很好,但它不会链接。相反,我收到此错误:
Linking CXX shared library ../../../Binaries/plugins/libPlugin_VideoOGL.so /usr/bin/ld: cannot find -lOpenCL collect2: ld returned 1 exit status make[2]: *** [Binaries/plugins/libPlugin_VideoOGL.so] Error 1 make[1]: *** [Source/Plugins/Plugin_VideoOGL/CMakeFiles/Plugin_VideoOGL.dir/all] Error 2 make: *** [all] Error 2
It looks like I need some sort of OpenCL library. I did some research and somehow had an idea that I needed to install fglrx. It did not go smoothly. In fact, when I tried to run fglrxinfo, I got a seg fault..nice. My video wasn't totally hosed, so I tried a make and got the same OpenCL error above. I just want to get Dolphin working. What are my options?
看起来我需要某种 OpenCL 库。我做了一些研究,不知何故有一个想法,我需要安装 fglrx。它并不顺利。事实上,当我尝试运行 fglrxinfo 时,我遇到了段错误..很好。我的视频没有完全被冲洗掉,所以我尝试了一个 make 并得到了与上面相同的 OpenCL 错误。我只是想让 Dolphin 工作。我有哪些选择?
Here are my specs:
这是我的规格:
- Ubuntu 10.4
- Radeon X1200 (RS690M)
- Ubuntu 10.4
- Radeon X1200 (RS690M)
回答by Dr. Snoopy
You need to install the ATI Stream SDK. I think ubuntu 10.10 includes the packages, if not, you can find the installed here.
您需要安装 ATI Stream SDK。我认为 ubuntu 10.10 包含这些软件包,如果没有,您可以在此处找到已安装的。
Also your GPU doesn't support OpenCL, so you will get only the CPU OpenCL device, without much performance improvement.
此外,您的 GPU 不支持 OpenCL,因此您将只能获得 CPU OpenCL 设备,而没有太多的性能改进。
回答by virtuallinux
Although your card doesn't support OpenCL, the answer to the question is that you need to have libOpenCL.so in /usr/lib/.
尽管您的卡不支持 OpenCL,但问题的答案是您需要在 /usr/lib/ 中有 libOpenCL.so。
-lOpenCL is a flag being passed to linker telling it to link against the OpenCL library.
-lOpenCL 是传递给链接器的标志,告诉它链接到 OpenCL 库。
This library is included in both the ATI Stream SDK (for ATI users) and the NVIDIA GPU Computing SDK (for NVIDIA users).
该库包含在 ATI Stream SDK(适用于 ATI 用户)和 NVIDIA GPU Computing SDK(适用于 NVIDIA 用户)中。