GPU source code with opencl

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

GPU source code with opencl

Jump to solution
2,929 Views
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 Kudos
Reply
1 Solution
2,907 Views
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/

 

 

View solution in original post

0 Kudos
Reply
4 Replies
2,923 Views
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 Kudos
Reply
2,917 Views
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 Kudos
Reply
2,908 Views
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 Kudos
Reply
2,896 Views
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 Kudos
Reply