From 9755c7ac58eea01ede3361a3794f6cd1660dd8a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A9vin=20Petit?= Date: Thu, 16 Mar 2023 12:15:51 +0000 Subject: [PATCH] [NFC] Only assign gIsEmbedded in the test harness (#1672) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Kévin Petit --- test_conformance/conversions/test_conversions.cpp | 13 ------------- test_conformance/half/cl_utils.cpp | 11 ----------- test_conformance/vectors/test_step.cpp | 11 ----------- 3 files changed, 35 deletions(-) diff --git a/test_conformance/conversions/test_conversions.cpp b/test_conformance/conversions/test_conversions.cpp index 967b1d4e..2ee05463 100644 --- a/test_conformance/conversions/test_conversions.cpp +++ b/test_conformance/conversions/test_conversions.cpp @@ -678,19 +678,6 @@ test_status InitCL(cl_device_id device) } gTestDouble &= gHasDouble; - // detect whether profile of the device is embedded - char profile[1024] = ""; - if ((error = clGetDeviceInfo(device, CL_DEVICE_PROFILE, sizeof(profile), - profile, NULL))) - { - } - else if (strstr(profile, "EMBEDDED_PROFILE")) - { - gIsEmbedded = 1; - if (!is_extension_available(device, "cles_khr_int64")) gHasLong = 0; - } - - gContext = clCreateContext(NULL, 1, &device, notify_callback, NULL, &error); if (NULL == gContext || error) { diff --git a/test_conformance/half/cl_utils.cpp b/test_conformance/half/cl_utils.cpp index 04770210..bd89a750 100644 --- a/test_conformance/half/cl_utils.cpp +++ b/test_conformance/half/cl_utils.cpp @@ -99,17 +99,6 @@ test_status InitCL( cl_device_id device ) int hasDouble = is_extension_available(device, "cl_khr_fp64"); gTestDouble ^= hasDouble; - //detect whether profile of the device is embedded - char profile[64] = ""; - if( (error = clGetDeviceInfo( device, CL_DEVICE_PROFILE, sizeof(profile), profile, NULL ) ) ) - { - vlog_error( "Unable to get device CL DEVICE PROFILE string. (%d) \n", error ); - } - else if( strstr(profile, "EMBEDDED_PROFILE" ) ) - { - gIsEmbedded = 1; - } - vlog( "%d compute devices at %f GHz\n", gComputeDevices, (double) gDeviceFrequency / 1000. ); vlog( "Max thread group size is %lld.\n", (uint64_t) gMaxThreadGroupSize ); diff --git a/test_conformance/vectors/test_step.cpp b/test_conformance/vectors/test_step.cpp index 089bad2f..c4f673f9 100644 --- a/test_conformance/vectors/test_step.cpp +++ b/test_conformance/vectors/test_step.cpp @@ -55,17 +55,6 @@ int test_step_internal(cl_device_id deviceID, cl_context context, return -1; } - // detect whether profile of the device is embedded - char profile[1024] = ""; - err = clGetDeviceInfo(deviceID, CL_DEVICE_PROFILE, sizeof(profile), profile, - NULL); - if (err) - { - print_error(err, "clGetDeviceInfo for CL_DEVICE_PROFILE failed\n"); - return -1; - } - gIsEmbedded = NULL != strstr(profile, "EMBEDDED_PROFILE"); - for (typeIdx = 0; types[typeIdx] != kNumExplicitTypes; ++typeIdx) { if (types[typeIdx] == kDouble)