Hi,
我把opencv OpenCL face detect example 運行在ARM mali T768 後,有以下error message :
OpenCL Error Message (Haar face detection):
OpenCV Error: Gpu API call (CL_INVALID_EVENT_WAIT_LIST) in void cv::ocl::openCLReadBuffer(cv::ocl::Context*, cl_mem, void*, size_t), file /home/dennylai/DennyLai/opencv_build_arm_ping/modules/ocl/src/cl_operations.cpp, line 107
terminate called after throwing an instance of 'cv::Exception'
what(): /home/dennylai/DennyLai/opencv_build_arm_ping/modules/ocl/src/cl_operations.cpp:107: error: (-217) CL_INVALID_EVENT_WAIT_LIST in function void cv::ocl::openCLReadBuffer(cv::ocl::Context*, cl_mem, void*, size_t)
注意:
這error 是在, 成功呼叫clEnqueueNDRangeKernel後, 再呼叫clEnqueueMapBuffer 出現。
kernel error message:
<4>[20660.510046] mali ffa30000.gpu: Failed to map memory on GPU
<4>[20662.175808] mali ffa30000.gpu: Failed to map memory on GPU
<4>[20663.583743] mali ffa30000.gpu: JS: Job Hard-Stopped (took more than 2 ticks at 50 ms/tick)
<4>[20663.583860] mali ffa30000.gpu: error detected from slot 1, job status 0x00000004 (TERMINATED)
<3>[20663.583907] mali ffa30000.gpu: t6xx: GPU fault 0x04 from job slot 1
我發現每次程式自動退出前, kernel driver 都會出現"JS: Job Hard-Stopped (took more than 2 ticks at 50 ms/tick)" 和 “gpu: error detected from slot 1, job status 0x00000004 (TERMINATED)", 嘗試在mali kernel driver 上把 KBASE_DISABLE_SCHEDULING_SOFT_STOPS和KBASE_DISABLE_SCHEDULING_HARD_STOPS都設為1, 測試一晚都沒有出現問題。
有我以下一些問題:
1。KBASE_DISABLE_SCHEDULING_SOFT_STOPS 和 KBASE_DISABLE_SCHEDULING_HARD_STOPS 是什意思, 在gpu 中的job manager 是不是對每個kernel queue 有一個最長運行時間限制?
2。我看過arm mali OpenCL sdk example code, clEnqueueNDRangeKernel 中沒有使用local_work_size 參數, 是不是 arm mali 不支持。
3。我在用DS-5 streamline 去看mali gpu , 發現只可以看到“GPU Fragment, GPU Vertex-Compute, GPU Vertex-Tiling-Compute", 但是看不到Mali Midgard Job Manager , 是不是要kernel driver 支持?
Thanks
Tse Yi Ping
我指的是编译gator.ko的时候,可以用GATOR_WITH_MALI_SUPPORT来指定需要support的GPU。运行gatord的时候没有用特殊的configure文件。
*** Mali GPU ***
Streamline supports Mali-400, 450, T6xx, and T7xx series GPUs with hardware activity charts, hardware & software counters and an optional 'film strip' showing periodic framebuffer snapshots. Support is chosen at build time and only one type of GPU (and version of driver) is supported at once. For best results build gator in-tree at .../drivers/gator and use the menuconfig options. Details of what these mean or how to build out of tree below.
Mali-4xx:
___To add Mali-4xx support to gator___
GATOR_WITH_MALI_SUPPORT=MALI_4xx # Set by CONFIG_GATOR_MALI_4XXMP
CONFIG_GATOR_MALI_PATH=".../path/to/Mali_DDK_kernel_files/src/devicedrv/mali" # gator source needs to #include "linux/mali_linux_trace.h"
GATOR_MALI_INTERFACE_STYLE=<3|4> # 3=Mali-400 DDK >= r3p0-04rel0 and < r3p2-01rel3
# 4=Mali-400 DDK >= r3p2-01rel3
# (default of 4 set in gator-driver/gator_events_mali_4xx.c)
___To add the corresponding support to Mali___
Userspace needs MALI_TIMELINE_PROFILING_ENABLED=1 MALI_FRAMEBUFFER_DUMP_ENABLED=1 MALI_SW_COUNTERS_ENABLED=1
Kernel driver needs USING_PROFILING=1 # Sets CONFIG_MALI400_PROFILING=y
See the DDK integration guide for more details (the above are the default in later driver versions)
Mali-T6xx/T7xx:
___To add Mali-T6xx support to gator___
GATOR_WITH_MALI_SUPPORT=MALI_T6xx # Set by CONFIG_GATOR_MALI_T6XX
DDK_DIR=".../path/to/Mali_DDK_kernel_files" # gator source needs access to headers under .../kernel/drivers/gpu/arm/...
# (default of . suitable for in-tree builds)
Userspace (scons) needs gator=1
Kernel driver needs CONFIG_MALI_GATOR_SUPPORT=y
See the DDK integration guide for more details
BR,
Sheri