Arm Community
Site
Search
User
Site
Search
User
Support forums
Mobile, Graphics, and Gaming forum
OpenCL: why there is so big difference between the time counter of cl_profiling_info ?
State
Accepted Answer
+1
person also asked this
people also asked this
Locked
Locked
Replies
1 reply
Subscribers
138 subscribers
Views
16471 views
Users
0 members are here
Profiling
Mali OpenCL SDK
Options
Share
More actions
Related
How was your experience today?
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion
OpenCL: why there is so big difference between the time counter of cl_profiling_info ?
willhua
over 5 years ago
I run an OpenCL task on Mali G-57 GPU, and profile the performance of kernel by code below:
cl_int err
=
clEnqueueNDRangeKernel
(
pocl
->
getCommandQueue
(), kernel,
2
,
NULL
, globalsize, localsize,
0
,
NULL
,
&
event_kernel );
clWaitForEvents
(
1
,
&event_kernel
);
cl_ulong queue_time
=
0
, submit_time
=
0
, start_time
=
0
, end_time
=
0
;
err
=
clGetEventProfilingInfo
(event_kernel, CL_PROFILING_COMMAND_QUEUED,
sizeof
(queue_time),
&
queue_time,
0
);
checkErr
(err,
"CL_PROFILING_COMMAND_QUEUED"
,
true
);
err
=
clGetEventProfilingInfo
(event_kernel, CL_PROFILING_COMMAND_SUBMIT,
sizeof
(queue_time),
&
submit_time,
0
);
checkErr
(err,
"CL_PROFILING_COMMAND_SUBMIT"
,
true
);
err
=
clGetEventProfilingInfo
(event_kernel, CL_PROFILING_COMMAND_START,
sizeof
(start_time),
&
start_time,
0
);
checkErr
(err,
"CL_PROFILING_COMMAND_START"
,
true
);
err
=
clGetEventProfilingInfo
(event_kernel, CL_PROFILING_COMMAND_END,
sizeof
(end_time),
&
end_time,
0
);
checkErr
(err,
"CL_PROFILING_COMMAND_END"
,
true
);
printf
(
"time value=
%llu
%llu
%llu
%llu
"
, queue_time, submit_time, start_time, end_time);
the log shows:
D/OLOG:cl_success:CL_PROFILING_COMMAND_QUEUED
D/OLOG:cl_success:CL_PROFILING_COMMAND_SUBMIT
D/OLOG:cl_success:CL_PROFILING_COMMAND_START
D/OLOG:cl_success:CL_PROFILING_COMMAND_END
D/OLOG:time value=71608492999037 71608493875422 8517593063107986718 8517593063119119891
We can see that the value of CL_PROFILING_COMMAND_START or CL_PROFILING_COMMAND_END is very bigger than CL_PROFILING_COMMAND_QUEUED or CL_PROFILING_COMMAND_SUBMIT. If we chang these to time, the time cost from CL_PROFILING_COMMAND_SUBMIT to CL_PROFILING_COMMAND_START will be 8517521506304ms. It is impossible.
Can anybody tell me what's the wrong which cause the time counter of the task status is so big?
Top replies
Kévin Petit
over 5 years ago
+1
verified
It seems that the timestamps are in a different time base. This could either be a driver bug or a platform integration issue. What platform/device was this running on? What is the version of the driver...
0
Quote