-
Notifications
You must be signed in to change notification settings - Fork 0
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
UT for EnqueueCommandBuffer #20
base: main
Are you sure you want to change the base?
Conversation
@@ -3604,6 +3606,54 @@ void testCommandBufferInfoKHRCommandQueues(void) | |||
TEST_ASSERT_EQUAL_PTR(make_command_queue(2), command_queues[2]()); | |||
#endif | |||
} | |||
|
|||
static cl_int clEnqueueCommandBufferKHR_testEnqueueCommandBuffer( | |||
cl_uint num_queues, |
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.
We could verify num_queues
at least once
{ | ||
#if defined(cl_khr_command_buffer) | ||
std::vector<cl::CommandQueue> command_queues; | ||
command_queues.emplace_back(commandQueuePool[0]()); |
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.
Let's increase number of queues for second call with commandQueuePool[1]
, thanks
ret = notValidCommandBuffer.enqueueCommandBuffer(command_queues, nullptr, nullptr); | ||
TEST_ASSERT_EQUAL(ret, CL_INVALID_COMMAND_BUFFER_KHR); |
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.
At least in one case we could deliver wait list. Then it should be tested in clEnqueueCommandBufferKHR_testEnqueueCommandBuffer
like this:
TEST_ASSERT_EQUAL(1, num_events_in_wait_list);
TEST_ASSERT_EQUAL_PTR(make_event(1), event_wait_list[0]);
TEST_ASSERT_EQUAL(0, num_calls);
if (event != nullptr)
{
*event = make_event(2);
}
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.
@shajder Corrections added for all comments
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.
LGTM
UT for EnqueueCommandBuffer