Arm Community
Site
Search
User
Site
Search
User
Groups
Education Hub
Open Source Software and Platforms
Research Collaboration and Enablement
Forums
AI and ML forum
Architectures and Processors forum
Arm Development Platforms forum
Arm Development Studio forum
Arm Virtual Hardware forum
Automotive forum
Compilers and Libraries forum
Graphics, Gaming, and VR forum
High Performance Computing (HPC) forum
Infrastructure Solutions forum
Internet of Things (IoT) forum
Keil forum
Morello forum
Operating Systems forum
SoC Design and Simulation forum
SystemReady Forum
Blogs
AI and ML blog
Announcements
Architectures and Processors blog
Automotive blog
Graphics, Gaming, and VR blog
High Performance Computing (HPC) blog
Infrastructure Solutions blog
Internet of Things (IoT) blog
Operating Systems blog
SoC Design and Simulation blog
Tools, Software and IDEs blog
Support
Arm Support Services
Documentation
Downloads
Training
Arm Approved program
Arm Design Reviews
Community Help
More
Cancel
Support forums
Graphics, Gaming, and VR forum
OpenCL: why there is so big difference between the time counter of cl_profiling_info ?
Jump...
Cancel
State
Accepted Answer
+1
person also asked this
people also asked this
Locked
Locked
Replies
1 reply
Subscribers
135 subscribers
Views
15777 views
Users
0 members are here
Profiling
Mali OpenCL SDK
Options
Share
More actions
Cancel
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 3 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 3 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...