Migrate API suite to the new test registration framework (#2196)

Contributes to #2181

Signed-off-by: Ahmed Hesham <ahmed.hesham@arm.com>
This commit is contained in:
Ahmed Hesham
2024-12-18 17:29:08 +00:00
committed by GitHub
parent 2316c6343f
commit 794d332bab
40 changed files with 803 additions and 1254 deletions

View File

@@ -73,9 +73,7 @@ int test_enqueue(cl_context context, clCommandQueueWrapper& queue, clKernelWrapp
}
int test_queue_hint(cl_device_id deviceID, cl_context context, cl_command_queue queue, int num_elements)
REGISTER_TEST(queue_hint)
{
if (num_elements <= 0)
{
@@ -94,7 +92,7 @@ int test_queue_hint(cl_device_id deviceID, cl_context context, cl_command_queue
return err;
}
if (is_extension_available(deviceID, "cl_khr_priority_hints"))
if (is_extension_available(device, "cl_khr_priority_hints"))
{
log_info("Testing cl_khr_priority_hints...\n");
@@ -116,7 +114,8 @@ int test_queue_hint(cl_device_id deviceID, cl_context context, cl_command_queue
for (int i = 0; i < 3; ++i)
{
clCommandQueueWrapper q = clCreateCommandQueueWithProperties(context, deviceID, queue_prop[i], &err);
clCommandQueueWrapper q = clCreateCommandQueueWithProperties(
context, device, queue_prop[i], &err);
test_error(err, "clCreateCommandQueueWithProperties failed");
err = test_enqueue(context, q, kernel, (size_t)num_elements);
@@ -131,7 +130,7 @@ int test_queue_hint(cl_device_id deviceID, cl_context context, cl_command_queue
log_info("cl_khr_priority_hints is not supported.\n");
}
if (is_extension_available(deviceID, "cl_khr_throttle_hints"))
if (is_extension_available(device, "cl_khr_throttle_hints"))
{
log_info("Testing cl_khr_throttle_hints...\n");
cl_queue_properties queue_prop[][3] =
@@ -152,7 +151,8 @@ int test_queue_hint(cl_device_id deviceID, cl_context context, cl_command_queue
for (int i = 0; i < 3; ++i)
{
clCommandQueueWrapper q = clCreateCommandQueueWithProperties(context, deviceID, queue_prop[i], &err);
clCommandQueueWrapper q = clCreateCommandQueueWithProperties(
context, device, queue_prop[i], &err);
test_error(err, "clCreateCommandQueueWithProperties failed");
err = test_enqueue(context, q, kernel, (size_t)num_elements);
@@ -170,4 +170,3 @@ int test_queue_hint(cl_device_id deviceID, cl_context context, cl_command_queue
return 0;
}