mirror of
https://github.com/KhronosGroup/OpenCL-CTS.git
synced 2026-03-23 15:39:03 +00:00
[NFC] Change the name of the default device provided by the new registration framework (#2186)
The code base uses a mix of 'device' and 'deviceID'. I suggest we standardise on 'device' which is shorter and slightly more prevalent. Contributes to #2181 Signed-off-by: Kevin Petit <kevin.petit@arm.com>
This commit is contained in:
@@ -92,22 +92,22 @@ static int test_image_operand_helper(cl_device_id deviceID, cl_context context,
|
||||
|
||||
REGISTER_TEST(spirv14_image_operand_signextend)
|
||||
{
|
||||
if (!is_spirv_version_supported(deviceID, "SPIR-V_1.4"))
|
||||
if (!is_spirv_version_supported(device, "SPIR-V_1.4"))
|
||||
{
|
||||
log_info("SPIR-V 1.4 not supported; skipping tests.\n");
|
||||
return TEST_SKIPPED_ITSELF;
|
||||
}
|
||||
return test_image_operand_helper(deviceID, context, queue, true);
|
||||
return test_image_operand_helper(device, context, queue, true);
|
||||
}
|
||||
|
||||
REGISTER_TEST(spirv14_image_operand_zeroextend)
|
||||
{
|
||||
if (!is_spirv_version_supported(deviceID, "SPIR-V_1.4"))
|
||||
if (!is_spirv_version_supported(device, "SPIR-V_1.4"))
|
||||
{
|
||||
log_info("SPIR-V 1.4 not supported; skipping tests.\n");
|
||||
return TEST_SKIPPED_ITSELF;
|
||||
}
|
||||
return test_image_operand_helper(deviceID, context, queue, false);
|
||||
return test_image_operand_helper(device, context, queue, false);
|
||||
}
|
||||
|
||||
static int test_loop_control_helper(cl_device_id deviceID, cl_context context,
|
||||
@@ -157,62 +157,62 @@ static int test_loop_control_helper(cl_device_id deviceID, cl_context context,
|
||||
|
||||
REGISTER_TEST(spirv14_loop_control_miniterations)
|
||||
{
|
||||
if (!is_spirv_version_supported(deviceID, "SPIR-V_1.4"))
|
||||
if (!is_spirv_version_supported(device, "SPIR-V_1.4"))
|
||||
{
|
||||
log_info("SPIR-V 1.4 not supported; skipping tests.\n");
|
||||
return TEST_SKIPPED_ITSELF;
|
||||
}
|
||||
return test_loop_control_helper(deviceID, context, queue,
|
||||
return test_loop_control_helper(device, context, queue,
|
||||
"loop_control_miniterations");
|
||||
}
|
||||
|
||||
REGISTER_TEST(spirv14_loop_control_maxiterations)
|
||||
{
|
||||
if (!is_spirv_version_supported(deviceID, "SPIR-V_1.4"))
|
||||
if (!is_spirv_version_supported(device, "SPIR-V_1.4"))
|
||||
{
|
||||
log_info("SPIR-V 1.4 not supported; skipping tests.\n");
|
||||
return TEST_SKIPPED_ITSELF;
|
||||
}
|
||||
return test_loop_control_helper(deviceID, context, queue,
|
||||
return test_loop_control_helper(device, context, queue,
|
||||
"loop_control_maxiterations");
|
||||
}
|
||||
|
||||
REGISTER_TEST(spirv14_loop_control_iterationmultiple)
|
||||
{
|
||||
if (!is_spirv_version_supported(deviceID, "SPIR-V_1.4"))
|
||||
if (!is_spirv_version_supported(device, "SPIR-V_1.4"))
|
||||
{
|
||||
log_info("SPIR-V 1.4 not supported; skipping tests.\n");
|
||||
return TEST_SKIPPED_ITSELF;
|
||||
}
|
||||
return test_loop_control_helper(deviceID, context, queue,
|
||||
return test_loop_control_helper(device, context, queue,
|
||||
"loop_control_iterationmultiple");
|
||||
}
|
||||
|
||||
REGISTER_TEST(spirv14_loop_control_peelcount)
|
||||
{
|
||||
if (!is_spirv_version_supported(deviceID, "SPIR-V_1.4"))
|
||||
if (!is_spirv_version_supported(device, "SPIR-V_1.4"))
|
||||
{
|
||||
log_info("SPIR-V 1.4 not supported; skipping tests.\n");
|
||||
return TEST_SKIPPED_ITSELF;
|
||||
}
|
||||
return test_loop_control_helper(deviceID, context, queue,
|
||||
return test_loop_control_helper(device, context, queue,
|
||||
"loop_control_peelcount");
|
||||
}
|
||||
|
||||
REGISTER_TEST(spirv14_loop_control_partialcount)
|
||||
{
|
||||
if (!is_spirv_version_supported(deviceID, "SPIR-V_1.4"))
|
||||
if (!is_spirv_version_supported(device, "SPIR-V_1.4"))
|
||||
{
|
||||
log_info("SPIR-V 1.4 not supported; skipping tests.\n");
|
||||
return TEST_SKIPPED_ITSELF;
|
||||
}
|
||||
return test_loop_control_helper(deviceID, context, queue,
|
||||
return test_loop_control_helper(device, context, queue,
|
||||
"loop_control_partialcount");
|
||||
}
|
||||
|
||||
REGISTER_TEST(spirv14_ptrops)
|
||||
{
|
||||
if (!is_spirv_version_supported(deviceID, "SPIR-V_1.4"))
|
||||
if (!is_spirv_version_supported(device, "SPIR-V_1.4"))
|
||||
{
|
||||
log_info("SPIR-V 1.4 not supported; skipping tests.\n");
|
||||
return TEST_SKIPPED_ITSELF;
|
||||
@@ -221,7 +221,7 @@ REGISTER_TEST(spirv14_ptrops)
|
||||
cl_int error = CL_SUCCESS;
|
||||
|
||||
clProgramWrapper prog;
|
||||
error = get_program_with_il(prog, deviceID, context, "spv1.4/ptrops");
|
||||
error = get_program_with_il(prog, device, context, "spv1.4/ptrops");
|
||||
SPIRV_CHECK_ERROR(error, "Failed to compile spv program");
|
||||
|
||||
clKernelWrapper kernel = clCreateKernel(prog, "ptrops_test", &error);
|
||||
@@ -333,29 +333,29 @@ static int test_usersemantic_decoration(cl_device_id deviceID,
|
||||
|
||||
REGISTER_TEST(spirv14_usersemantic_decoratestring)
|
||||
{
|
||||
if (!is_spirv_version_supported(deviceID, "SPIR-V_1.4"))
|
||||
if (!is_spirv_version_supported(device, "SPIR-V_1.4"))
|
||||
{
|
||||
log_info("SPIR-V 1.4 not supported; skipping tests.\n");
|
||||
return TEST_SKIPPED_ITSELF;
|
||||
}
|
||||
|
||||
return test_usersemantic_decoration(deviceID, context, queue, false);
|
||||
return test_usersemantic_decoration(device, context, queue, false);
|
||||
}
|
||||
|
||||
REGISTER_TEST(spirv14_usersemantic_memberdecoratestring)
|
||||
{
|
||||
if (!is_spirv_version_supported(deviceID, "SPIR-V_1.4"))
|
||||
if (!is_spirv_version_supported(device, "SPIR-V_1.4"))
|
||||
{
|
||||
log_info("SPIR-V 1.4 not supported; skipping tests.\n");
|
||||
return TEST_SKIPPED_ITSELF;
|
||||
}
|
||||
|
||||
return test_usersemantic_decoration(deviceID, context, queue, true);
|
||||
return test_usersemantic_decoration(device, context, queue, true);
|
||||
}
|
||||
|
||||
REGISTER_TEST(spirv14_nonwriteable_decoration)
|
||||
{
|
||||
if (!is_spirv_version_supported(deviceID, "SPIR-V_1.4"))
|
||||
if (!is_spirv_version_supported(device, "SPIR-V_1.4"))
|
||||
{
|
||||
log_info("SPIR-V 1.4 not supported; skipping tests.\n");
|
||||
return TEST_SKIPPED_ITSELF;
|
||||
@@ -365,7 +365,7 @@ REGISTER_TEST(spirv14_nonwriteable_decoration)
|
||||
|
||||
clProgramWrapper prog;
|
||||
error = get_program_with_il(
|
||||
prog, deviceID, context,
|
||||
prog, device, context,
|
||||
"spv1.4/nonwriteable_decoration_function_storage_class");
|
||||
SPIRV_CHECK_ERROR(error, "Failed to compile spv program");
|
||||
|
||||
@@ -401,7 +401,7 @@ REGISTER_TEST(spirv14_nonwriteable_decoration)
|
||||
|
||||
REGISTER_TEST(spirv14_copymemory_memory_operands)
|
||||
{
|
||||
if (!is_spirv_version_supported(deviceID, "SPIR-V_1.4"))
|
||||
if (!is_spirv_version_supported(device, "SPIR-V_1.4"))
|
||||
{
|
||||
log_info("SPIR-V 1.4 not supported; skipping tests.\n");
|
||||
return TEST_SKIPPED_ITSELF;
|
||||
@@ -410,7 +410,7 @@ REGISTER_TEST(spirv14_copymemory_memory_operands)
|
||||
cl_int error = CL_SUCCESS;
|
||||
|
||||
clProgramWrapper prog;
|
||||
error = get_program_with_il(prog, deviceID, context,
|
||||
error = get_program_with_il(prog, device, context,
|
||||
"spv1.4/copymemory_memory_operands");
|
||||
SPIRV_CHECK_ERROR(error, "Failed to compile spv program");
|
||||
|
||||
@@ -454,7 +454,7 @@ REGISTER_TEST(spirv14_select_composite)
|
||||
{
|
||||
constexpr size_t global_size = 16;
|
||||
|
||||
if (!is_spirv_version_supported(deviceID, "SPIR-V_1.4"))
|
||||
if (!is_spirv_version_supported(device, "SPIR-V_1.4"))
|
||||
{
|
||||
log_info("SPIR-V 1.4 not supported; skipping tests.\n");
|
||||
return TEST_SKIPPED_ITSELF;
|
||||
@@ -463,8 +463,7 @@ REGISTER_TEST(spirv14_select_composite)
|
||||
cl_int error = CL_SUCCESS;
|
||||
|
||||
clProgramWrapper prog;
|
||||
error =
|
||||
get_program_with_il(prog, deviceID, context, "spv1.4/select_struct");
|
||||
error = get_program_with_il(prog, device, context, "spv1.4/select_struct");
|
||||
SPIRV_CHECK_ERROR(error, "Failed to compile spv program");
|
||||
|
||||
clKernelWrapper kernel = clCreateKernel(prog, "select_struct_test", &error);
|
||||
@@ -514,7 +513,7 @@ REGISTER_TEST(spirv14_select_composite)
|
||||
|
||||
REGISTER_TEST(spirv14_copylogical)
|
||||
{
|
||||
if (!is_spirv_version_supported(deviceID, "SPIR-V_1.4"))
|
||||
if (!is_spirv_version_supported(device, "SPIR-V_1.4"))
|
||||
{
|
||||
log_info("SPIR-V 1.4 not supported; skipping tests.\n");
|
||||
return TEST_SKIPPED_ITSELF;
|
||||
@@ -522,8 +521,8 @@ REGISTER_TEST(spirv14_copylogical)
|
||||
|
||||
cl_int error = CL_SUCCESS;
|
||||
clProgramWrapper prog;
|
||||
error = get_program_with_il(prog, deviceID, context,
|
||||
"spv1.4/copylogical_struct");
|
||||
error =
|
||||
get_program_with_il(prog, device, context, "spv1.4/copylogical_struct");
|
||||
SPIRV_CHECK_ERROR(error, "Failed to compile spv program");
|
||||
|
||||
clKernelWrapper kernel = clCreateKernel(prog, "copylogical_test", &error);
|
||||
|
||||
Reference in New Issue
Block a user