What is the minimal nesesary file subset, required to AMD OpenCL work on Linux?

我的梦境 提交于 2019-12-06 06:17:21

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