-
Notifications
You must be signed in to change notification settings - Fork 199
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
Add cl_khr_kernel_clock tests #1960
Add cl_khr_kernel_clock tests #1960
Conversation
…er defines for extension subtest
test_conformance/compiler/test_compiler_defines_for_extensions.cpp
Outdated
Show resolved
Hide resolved
…xtensions array. Add newline to CMakeLists.txt Wrap everything under an anonymous namespace, remove extern keyword, use c++ raw strings for the ocl kernels, and remove underscore from CL_KHR_KERNEL_CLOCK_PROCS_H
if (buf == 1) | ||
{ | ||
log_error( | ||
"Sampling the clock returned bad values, time1 > time2.\n"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure if the extension provides a guarantee that time2 > time1
? The description for clock_read_*
says
an observer may see sampled values wrap around zero.
which would make the test fail spuriously if a wraparound happens between the time1 and time2 sampling points.
I tried to think of a more robust way to test the returned values, but I'm not even sure if we have a guarantee that time1 != time2
? What do other reviewers think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a bit of discussion on GitLab about this also. I agree there could be a problem here in theory, but these tests are currently matching the behavior for the Vulkan tests, see:
Since there doesn't seem to have been a problem with the Vulkan tests in practice so far, I'm inclined to keep these tests as-is, and if we end up needing something fancier we can cross that bridge when we come to it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for cross-checking, that sounds reasonable to me then.
Reviewing |
Merging as discussed in the May 21st teleconference. |
Adds cl_khr_kernel_clock test.
Also fixes failure in the compiler defines for extension compiler subtest when cl_khr_kernel_clock is supported.