Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Queue profiling and Device timebase equality test #1150

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

ellnor01
Copy link
Contributor

@ellnor01 ellnor01 commented Feb 9, 2021

Adds test to confirm that the timestamp returned from
clGetEventProfilingInfo for an event on a device and a device
timestamp queried from the same device are in the same timebase.

Fixes #753

Signed-off-by: Ellen Norris-Thompson ellen.norris-thompson@arm.com

@ellnor01 ellnor01 force-pushed the profiling_timebase branch 2 times, most recently from 4f426d3 to fffb7ef Compare April 28, 2021 10:49
@ellnor01
Copy link
Contributor Author

Any more comments for this PR?

lakshmih
lakshmih previously approved these changes Aug 27, 2024
Comment on lines 96 to 97
test_assert_error(deviceTimeAfterQueue < eventSubmit,
"Device timestamp was taken before kernel was submitted");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this is a safe check. The OpenCL execution model says:

Submitted: The command is flushed from the command-queue and submitted for execution on the device. Once flushed from the command-queue, a command will execute after any prerequisites for execution are met.

I believe this means that the transition to the SUBMITTED state can happen anytime after the QUEUED state, even if the event dependencies defining the "prerequisites for execution" are not yet met.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agree, this is how I interpreted the quoted paragraph from the specification as well. Assert removed.

Adds test to confirm that the timestamp returned from
clGetEventProfilingInfo for an event on a device and a device
timestamp queried from the same device are in the same timebase.

Fixes KhronosGroup#753

Signed-off-by: Ellen Norris-Thompson <ellen.norris-thompson@arm.com>
For OpenCL 3.0 clGetDeviceAndHostTimer is an optional feature.
Check whether it is supported in profiling/profiling_timebase

Fixes KhronosGroup#753

Signed-off-by: Ellen Norris-Thompson <ellen.norris-thompson@arm.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Timebase equality between queue profiling and clGetDeviceAndHostTimer untested
6 participants