AMD OpenCL在Linux上工作所需的最小必要文件子集是什么? [英] What is the minimal nesesary file subset, required to AMD OpenCL work on Linux?

查看:161
本文介绍了AMD OpenCL在Linux上工作所需的最小必要文件子集是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经使用buildroot构建了Linux Kernel.我已经合并了开源amdgpu驱动程序和所需的固件.驱动程序很好,可以检测GPU,模式设置效果很好,可以调整小文本"的分辨率,并且启动后会显示命令行.

I've built Linux Kernel, with means of the buildroot. I've incorporated opensource amdgpu driver and required firmwares into it. Driver is fine, detecting GPUs, mode setting acts good, adjusting resolution for "small text", and command line shows up after boot.

现在,我需要运行OpenCL程序.我从amdgpu-pro驱动程序(rhel7变体)中手动解压缩文件,并组装了框架fs,然后复制了我认为需要的文件.

Now I require to run OpenCL program. I manually unpacked files from amdgpu-pro driver(rhel7 variant) and assembled skeleton fs then copied what I thought was required.

OpenCL无法识别任何设备,并且clinfo实用程序从cl::getPlatformIDs()调用中抛出cl::error.

OpenCL does not recognise any devices and clinfo utility throws cl::error from cl::getPlatformIDs() call.

OpenCL在Linux上完全运行需要什么文件?

What are exactly files required for OpenCL to fully work on linux?

PS:相关的未解决的问题,因此该主题被认为是真实的.

PS: Related unaswerred question, so the topic was considered actual.

推荐答案

我花了好几个步骤才能使它们全部启动并运行:

It took me several steps further, to get all up and running:

  • 库有几个重要的符号链接,例如* .1,*.1.0.0等.它们也必须被复制.那使opencl起作用了,但是矿工仍然无法正确显示可用的内存和计算单元的数量,并且出现了段错误.

  • There are several important symbolic links for libraries, like *.1, *.1.0.0, so on. They must be copied as well. That got opencl working, but miner still wrongs on the number of availble memory and compute units was displayed incorrectly and i had segfaults.

/opt/amdgpu/share/libdrm/amdgpu.ids是gpu型号名称以及正确检测和显示其视频内存大小的必需项.

/opt/amdgpu/share/libdrm/amdgpu.ids is required for gpu models' names and their video memory sizes being detected and displayed correctly.

/etc/amd/amdapfxx.blb是重要文件,出于某些绝密的未知原因提供服务.

/etc/amd/amdapfxx.blb is important file, serving for some top secret, unknown reasons.

当我升级amdgpu-pro驱动程序时,重要的是不要弄乱来自不同版本的库文件.犯这样的错误很容易,因为buildroot将覆盖缓存到输出/目标结构,如果您从覆盖中删除某些内容,则也必须从目标中删除它.这样的库混乱可能导致段错误

As I was upgrading amdgpu-pro driver it was important not to mess library files from different versions. It was easy to do such mistake, as buildroot caches overlay to output/target structure, if you delete something from overlay you have to delete it from target as well. And such a library mess could lead to segfaults

要进一步缩小子集,libEGL和libGLESv2,可以删除libgbm.它们对于OpenCL操作不是必需的,这样可以节省1-1.5兆的额外空间.

To further minify subset, libEGL and libGLESv2, libgbm can be deleted. They are not nesesary for OpenCL operation and this saves 1-1.5 megs extra space.

LLVM似乎与OpenCL完全无关,从而节省了大量空间.我不确定,也许是GL或Vulkan要求的.

LLVM seems to be unrelated to OpenCL totally, saving huge amount of space. I am not sure, maybe it is required by GL or Vulkan.

下面是必要的文件目录和符号链接的完整列表,以及确切的位置,以使OpenCL正常工作:

And here is complete list of nesesary files and symlinks, with exact locations, in order to get OpenCL properly working:

/usr/lib/libamdocl64.so
/usr/lib/libamdocl12cl64.so
/usr/lib/libdrm.so -> libdrm.so.2.4.0
/usr/lib/libdrm.so.2 -> libdrm.so.2.4.0
/usr/lib/libdrm.so.2.4.0
/usr/lib/libdrm_amdgpu.so -> libdrm_amdgpu.so.1.0.0
/usr/lib/libdrm_amdgpu.so.1 -> libdrm_amdgpu.so.1.0.0
/usr/lib/libdrm_amdgpu.so.1.0.0
/usr/lib/libdrm_radeon.so -> libdrm_radeon.so.1.0.1
/usr/lib/libdrm_radeon.so.1 -> libdrm_radeon.so.1.0.1
/usr/lib/libdrm_radeon.so.1.0.1
/usr/lib/libkms.so -> libkms.so.1.0.0
/usr/lib/libkms.so.1 -> libkms.so.1.0.0
/usr/lib/libkms.so.1.0.0
/usr/lib/libOpenCL.so -> libOpenCL.so.1
/usr/lib/libOpenCL.so.1
/usr/bin/clinfo
/etc/amd/amdapfxx.blb
/etc/OpenCL/vendors/amdocl64.icd
/opt/amdgpu/share/libdrm/amdgpu.ids

这篇关于AMD OpenCL在Linux上工作所需的最小必要文件子集是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆