AMD OpenCL在Linux上运行所需的最小nesesary文件子集是什么?(What is the minimal nesesary file subset, required to AMD O

编程入门 行业动态 更新时间:2024-10-26 14:27:53
AMD OpenCL在Linux上运行所需的最小nesesary文件子集是什么?(What is the minimal nesesary file subset, required to AMD OpenCL work on Linux?)

我用buildroot的方法构建了linux内核。 它包含amdgpu驱动程序和所需的固件。 驱动程序很好,检测所有卡没有错误,模式设置表现良好,调整“小文本”的分辨率。 没有xorg,opengl或类似的东西,它的原始内核,glibc,eudev,busybox。

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

OpenCL无法识别任何设备和clinfo实用程序从cl::getPlatformIDs()调用抛出cl::error 。

OpenCL在linux上完全工作所需的文件是什么?

PS:相关的未提出问题 ,因此该主题被认为是实际的。

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.

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 does not recognise any devices and clinfo utility throws cl::error from cl::getPlatformIDs() call.

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

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

最满意答案

它花了我更多的步骤,以便全部启动并运行:

库有几个重要的符号链接,如* .1,* .1.0.0等。 它们也必须被复制。 这得到opencl工作,但矿工仍然错误的可用内存和计算单位的数量显示不正确,我有段错误。

/opt/amdgpu/share/libdrm/amdgpu.ids模型的名称需要/opt/amdgpu/share/libdrm/amdgpu.ids ,并且可以正确检测和显示其视频内存大小。

/etc/amd/amdapfxx.blb是一个重要的文件,服务于一些绝密,未知的原因。

当我升级amdgpu-pro驱动程序时,重要的是不要混淆不同版本的库文件。 很容易犯这样的错误,因为buildroot缓存覆盖到输出/目标结构,如果你从叠加中删除某些东西,你也必须从目标中删除它。 而这样的图书馆混乱可能导致段错误

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

LLVM似乎与OpenCL完全无关,节省了大量空间。 我不确定,也许GL或Vulkan需要它。

以下是具有确切位置的nesesary文件和符号链接的完整列表,以使OpenCL正常工作:

/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

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

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 is required for gpu models' names and their video memory sizes being detected and displayed correctly.

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

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

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 seems to be unrelated to OpenCL totally, saving huge amount of space. I am not sure, maybe it is required by GL or Vulkan.

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

更多推荐

本文发布于:2023-08-04 06:47:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1412408.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:子集   所需   最小   文件   Linux

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!