Add kernels performance output
authorYongjia Zhang <zhang_yong_jia@126.com>
Tue, 1 Apr 2014 09:16:46 +0000 (17:16 +0800)
committerZhigang Gong <zhigang.gong@intel.com>
Wed, 2 Apr 2014 02:54:40 +0000 (10:54 +0800)
commitebd86bf4ca91b6ac14e85a44ade4fde00178f743
tree2650b5bcd15d762bf63bc83d2abfd85b2c870eb3
parent8bc5ac8b591a162837105c9b8dd430ab203e9dde
Add kernels performance output

if environment variable OCL_OUTPUT_KERNEL_PERF is set non-zero,
then after the executable program exits, beignet will output the
time information of each kernel executed.

v2:fixed the patch's trailing whitespace problem.

v3:if OCL_OUTPUT_KERNEL_PERF is 1, then the output will only
contains time summary, if it is 2, then the output will contain
time summary and detail. Add output 'Ave' and 'Dev', 'Ave' is
the average time per kernel per execution round, 'Dev' is the
result of 'Ave' divide a kernel's all executions' standard deviation.

Signed-off-by: Yongjia Zhang <yongjia.zhang@intel.com>
Reviewed-by: Zhigang Gong <zhigang.gong@linux.intel.com>
src/CMakeLists.txt
src/cl_api.c
src/cl_command_queue.c
src/performance.c [new file with mode: 0644]
src/performance.h [new file with mode: 0644]