GPU source code with opencl

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

GPU source code with opencl

跳至解决方案
2,926 次查看
thepnimit
Contributor III

Hi,

    We have some question about GPU library on iMX8QXP

On the linux image from official website, It isn't problem with GPU and test code call opencl with

https://community.nxp.com/t5/i-MX-Processors-Knowledge-Base/OpenCL-Hello-World/ta-p/1113358

But when we use custom rootfs (e.g. debian, ubuntu) we can't use GPU when run same it show segmentation fault (core dumped)

*** we are compiled driver GPU pack in Image kernel

we can see from dmesg | grep -i "galcore"

[ 1.776868] Galcore version 6.4.3.p0.286725

1. We're try to install source code from imx-gpu-viv-6.4.3.p1.0-aarch64.bin and use it but glic compile library does not same version (yocto official 5.4 use glibc 2.30, custom rootfs use glibc 2.31)

2. We're use only header and compile share library libopencl.so from https://github.com/KhronosGroup/OpenCL-ICD-Loader ,It still cann't use

We are missing something and How to use GPU with opencl on custom rootfs

0 项奖励
回复
1 解答
2,904 次查看
Zhiming_Liu
NXP TechSupport
NXP TechSupport

Hi

 

The gpu source code is not public and you can see the build log if you have built a yocto image.We only provide .so file(Actually it was provided by GPU IP company)

imx-yocto-bsp/build-xwayland/tmp/work/aarch64-mx8mm-poky-linux/imx-gpu-viv/1_6.4.3.p1.0-aarch64-r0/temp/

 

The rootfs library about gpu is in imx-yocto-bsp/build-xwayland/tmp/work/aarch64-mx8mm-poky-linux/imx-gpu-viv/1_6.4.3.p1.0-aarch64-r0/package/

 

 

在原帖中查看解决方案

0 项奖励
回复
4 回复数
2,920 次查看
Zhiming_Liu
NXP TechSupport
NXP TechSupport

Hi

 

Why not compile glibc 2.30(replace 2.31) in your custom board,then copy the gpu library from official rootfs?

 

BR

Zhiming

0 项奖励
回复
2,914 次查看
thepnimit
Contributor III

Because the OS and glibc update faster than NXP kernel (e.g. debian 10, 11, 12)

If we have knowledge for create GPU library, we can compile to use with any OS and any glibc

Or sometime We want to use with complete OS (Fedora, CentOS), We cannot compile rootfs by self

glibc is fix version

Regards

0 项奖励
回复
2,905 次查看
Zhiming_Liu
NXP TechSupport
NXP TechSupport

Hi

 

The gpu source code is not public and you can see the build log if you have built a yocto image.We only provide .so file(Actually it was provided by GPU IP company)

imx-yocto-bsp/build-xwayland/tmp/work/aarch64-mx8mm-poky-linux/imx-gpu-viv/1_6.4.3.p1.0-aarch64-r0/temp/

 

The rootfs library about gpu is in imx-yocto-bsp/build-xwayland/tmp/work/aarch64-mx8mm-poky-linux/imx-gpu-viv/1_6.4.3.p1.0-aarch64-r0/package/

 

 

0 项奖励
回复
2,893 次查看
thepnimit
Contributor III

Hi

Thanks for path of gpu source.

When use rsync build-xwayland/tmp/work/aarch64-mx8mm-poky-linux/imx-gpu-viv/1_6.4.3.p1.0-aarch64-r0/package/ to rootfs and install libwayland-server, libwayland-client, libdrm, libdrm-dev

code can run with gpu

This is test on rootfs fedora32 and glibc 2.31

Regards

0 项奖励
回复