IMX6D GPU使用opencl性能问题

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

IMX6D GPU使用opencl性能问题

2,904 Views
stevenhuang
Contributor III

在IMX6D 上使用opencl来做技术,2D的1024*1024个item, 用了15ms, 计算下来一秒的处理能力为 1000/15*1024*1024=66M 次计算,这个资料上的600M相差比较大,请问下是什么原因尼?

kernel代码如下(其实就是《White Paper on get started with OpenCL on iMX6.pdf》里面的例子):

__kernel void helloworld ( __global uchar *input,
__global uchar *output,
int width,
int height
)
{
int y = get_global_id (0);
int x = get_global_id (1);
int id = (y * width) + x;
output[id] = input[id];
}

5 Replies

1,499 Views
jimmychan
NXP TechSupport
NXP TechSupport

which BSP are you using?

0 Kudos

1,499 Views
stevenhuang
Contributor III

linux kernel is 3.0.35

0 Kudos

1,499 Views
weikangyang
Contributor I

你的BSP从哪里弄得,我是用ltlib编译的3.0.35的bsp使用opencl失败,可以把你的bsp opencl的库给我用下吗?

0 Kudos

1,499 Views
jimmychan
NXP TechSupport
NXP TechSupport

BSP LTIB 3.0.35 is very old. Please try the latest BSP. You can download it from here:

i.MX Software|NXP 

Linux L4.14.78_1.0.0 Documentation

0 Kudos

1,499 Views
weikangyang
Contributor I

root@imx6qsabresd:/opt/viv_samples/cl11/UnitTest# uname -a
Linux imx6qsabresd 4.1.15-00017-gf94be3a-dirty #1 SMP PREEMPT Mon Dec 3 16:20:20 CST 2018 armv7l armv7l armv7l GNU/Linux
root@imx6qsabresd:/opt/viv_samples/cl11/UnitTest# cat /proc/cpuinfo
processor : 0
model name : ARMv7 Processor rev 10 (v7l)
BogoMIPS : 3.00
Features : half thumb fastmult vfp edsp neon vfpv3 tls vfpd32
CPU implementer : 0x41
CPU architecture: 7
CPU variant : 0x2
CPU part : 0xc09
CPU revision : 10

processor : 1
model name : ARMv7 Processor rev 10 (v7l)
BogoMIPS : 3.00
Features : half thumb fastmult vfp edsp neon vfpv3 tls vfpd32
CPU implementer : 0x41
CPU architecture: 7
CPU variant : 0x2
CPU part : 0xc09
CPU revision : 10

Hardware : Freescale i.MX6 Quad/DualLite (Device Tree)
Revision : 0000
Serial : 0000000000000000
root@imx6qsabresd:/opt/viv_samples/cl11/UnitTest#

root@imx6qsabresd:/opt/viv_samples/cl11/UnitTest# ./clinfo

>>>>>>>> ./clinfo Starting...

Available platforms: 1

Platform ID: 0
CL_PLATFORM_NAME: Vivante OpenCL Platform
CL_PLATFORM_PROFILE: EMBEDDED_PROFILE
CL_PLATFORM_VERSION: OpenCL 1.1
CL_PLATFORM_VENDOR: Vivante Corporation
CL_PLATFORM_EXTENSIONS: cl_khr_icd

!!! Error # -30 at line 200 , in file main.cpp !!!

!!! Exiting...

root@imx6qsabresd:/opt/viv_samples/cl11/UnitTest/test_vivante# ./functions_and_kernels
ERROR: clGetDeviceIDs failed! (CL_INVALID_VALUE from main.cpp:251)
root@imx6qsabresd:/opt/viv_samples/cl11/UnitTest/test_vivante#

I use the BSP 4.1.15 why opencl still can not work?.........Can help Me?

0 Kudos