mirror of
https://github.com/KhronosGroup/OpenCL-CTS.git
synced 2026-03-25 00:09:02 +00:00
Get rid of checkDeviceTypeOverride (#602)
This is now done in the test harness. Signed-off-by: Kevin Petit <kevin.petit@arm.com>
This commit is contained in:
@@ -788,48 +788,6 @@ test_status callSingleTestFunction( test_definition test, cl_device_id deviceToU
|
|||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
|
||||||
void checkDeviceTypeOverride( cl_device_type *inOutType )
|
|
||||||
{
|
|
||||||
/* Check if we are forced to CPU mode */
|
|
||||||
char *force_cpu = getenv( "CL_DEVICE_TYPE" );
|
|
||||||
if( force_cpu != NULL )
|
|
||||||
{
|
|
||||||
if( strcmp( force_cpu, "gpu" ) == 0 || strcmp( force_cpu, "CL_DEVICE_TYPE_GPU" ) == 0 )
|
|
||||||
*inOutType = CL_DEVICE_TYPE_GPU;
|
|
||||||
else if( strcmp( force_cpu, "cpu" ) == 0 || strcmp( force_cpu, "CL_DEVICE_TYPE_CPU" ) == 0 )
|
|
||||||
*inOutType = CL_DEVICE_TYPE_CPU;
|
|
||||||
else if( strcmp( force_cpu, "accelerator" ) == 0 || strcmp( force_cpu, "CL_DEVICE_TYPE_ACCELERATOR" ) == 0 )
|
|
||||||
*inOutType = CL_DEVICE_TYPE_ACCELERATOR;
|
|
||||||
else if( strcmp( force_cpu, "CL_DEVICE_TYPE_DEFAULT" ) == 0 )
|
|
||||||
*inOutType = CL_DEVICE_TYPE_DEFAULT;
|
|
||||||
}
|
|
||||||
|
|
||||||
switch( *inOutType )
|
|
||||||
{
|
|
||||||
case CL_DEVICE_TYPE_GPU: log_info( "Requesting GPU device " ); break;
|
|
||||||
case CL_DEVICE_TYPE_CPU: log_info( "Requesting CPU device " ); break;
|
|
||||||
case CL_DEVICE_TYPE_ACCELERATOR: log_info( "Requesting Accelerator device " ); break;
|
|
||||||
case CL_DEVICE_TYPE_DEFAULT: log_info( "Requesting Default device " ); break;
|
|
||||||
default: break;
|
|
||||||
}
|
|
||||||
log_info( force_cpu != NULL ? "based on environment variable\n" : "based on command line\n" );
|
|
||||||
|
|
||||||
#if defined( __APPLE__ )
|
|
||||||
{
|
|
||||||
// report on any unusual library search path indirection
|
|
||||||
char *libSearchPath = getenv( "DYLD_LIBRARY_PATH");
|
|
||||||
if( libSearchPath )
|
|
||||||
log_info( "*** DYLD_LIBRARY_PATH = \"%s\"\n", libSearchPath );
|
|
||||||
|
|
||||||
// report on any unusual framework search path indirection
|
|
||||||
char *frameworkSearchPath = getenv( "DYLD_FRAMEWORK_PATH");
|
|
||||||
if( libSearchPath )
|
|
||||||
log_info( "*** DYLD_FRAMEWORK_PATH = \"%s\"\n", frameworkSearchPath );
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
#if ! defined( __APPLE__ )
|
#if ! defined( __APPLE__ )
|
||||||
void memset_pattern4(void *dest, const void *src_pattern, size_t bytes )
|
void memset_pattern4(void *dest, const void *src_pattern, size_t bytes )
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -115,10 +115,6 @@ extern test_status callSingleTestFunction( test_definition test, cl_device_id de
|
|||||||
|
|
||||||
///// Miscellaneous steps
|
///// Miscellaneous steps
|
||||||
|
|
||||||
// Given a pre-existing device type choice, check the environment for an override, then print what
|
|
||||||
// choice was made and how (and return the overridden choice, if there is one)
|
|
||||||
extern void checkDeviceTypeOverride( cl_device_type *inOutType );
|
|
||||||
|
|
||||||
// standard callback function for context pfn_notify
|
// standard callback function for context pfn_notify
|
||||||
extern void CL_CALLBACK notify_callback(const char *errinfo, const void *private_info, size_t cb, void *user_data);
|
extern void CL_CALLBACK notify_callback(const char *errinfo, const void *private_info, size_t cb, void *user_data);
|
||||||
|
|
||||||
|
|||||||
@@ -75,8 +75,6 @@ int main(int argc, const char *argv[])
|
|||||||
cl_channel_type chanType;
|
cl_channel_type chanType;
|
||||||
cl_channel_order chanOrder;
|
cl_channel_order chanOrder;
|
||||||
|
|
||||||
checkDeviceTypeOverride( &gDeviceType );
|
|
||||||
|
|
||||||
const char ** argList = (const char **)calloc( argc, sizeof( char*) );
|
const char ** argList = (const char **)calloc( argc, sizeof( char*) );
|
||||||
|
|
||||||
if( NULL == argList )
|
if( NULL == argList )
|
||||||
|
|||||||
@@ -77,8 +77,6 @@ int main(int argc, const char *argv[])
|
|||||||
{
|
{
|
||||||
cl_channel_type chanType;
|
cl_channel_type chanType;
|
||||||
|
|
||||||
checkDeviceTypeOverride( &gDeviceType );
|
|
||||||
|
|
||||||
const char ** argList = (const char **)calloc( argc, sizeof( char*) );
|
const char ** argList = (const char **)calloc( argc, sizeof( char*) );
|
||||||
|
|
||||||
if( NULL == argList )
|
if( NULL == argList )
|
||||||
|
|||||||
@@ -75,8 +75,6 @@ int main(int argc, const char *argv[])
|
|||||||
{
|
{
|
||||||
cl_channel_type chanType;
|
cl_channel_type chanType;
|
||||||
|
|
||||||
checkDeviceTypeOverride( &gDeviceType );
|
|
||||||
|
|
||||||
const char ** argList = (const char **)calloc( argc, sizeof( char*) );
|
const char ** argList = (const char **)calloc( argc, sizeof( char*) );
|
||||||
|
|
||||||
if( NULL == argList )
|
if( NULL == argList )
|
||||||
|
|||||||
@@ -82,8 +82,6 @@ int main(int argc, const char *argv[])
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
checkDeviceTypeOverride( &gDeviceType );
|
|
||||||
|
|
||||||
const char ** argList = (const char **)calloc( argc, sizeof( char*) );
|
const char ** argList = (const char **)calloc( argc, sizeof( char*) );
|
||||||
|
|
||||||
if( NULL == argList )
|
if( NULL == argList )
|
||||||
|
|||||||
@@ -284,9 +284,6 @@ int main(int argc, const char *argv[])
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
//Check CL_DEVICE_TYPE environment variable
|
|
||||||
checkDeviceTypeOverride( &gDeviceType );
|
|
||||||
|
|
||||||
const char ** argList = (const char **)calloc( argc, sizeof( char*) );
|
const char ** argList = (const char **)calloc( argc, sizeof( char*) );
|
||||||
|
|
||||||
if( NULL == argList )
|
if( NULL == argList )
|
||||||
|
|||||||
@@ -93,9 +93,6 @@ int main(int argc, const char *argv[])
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
//Check CL_DEVICE_TYPE environment variable
|
|
||||||
checkDeviceTypeOverride( &gDeviceType );
|
|
||||||
|
|
||||||
const char ** argList = (const char **)calloc( argc, sizeof( char*) );
|
const char ** argList = (const char **)calloc( argc, sizeof( char*) );
|
||||||
|
|
||||||
if( NULL == argList )
|
if( NULL == argList )
|
||||||
|
|||||||
Reference in New Issue
Block a user