Port framework changes from master

Now requiring the headers to be configured for OpenCL > 2.1.
This commit is contained in:
Kevin Petit
2019-07-31 12:01:00 +01:00
committed by Kévin Petit
parent e535e0aa21
commit 59e2da3b4e
75 changed files with 1418 additions and 196 deletions

View File

@@ -58,11 +58,49 @@ extern "C" {
#define STRINGIFY(_x) #_x
#endif
/* Helper that creates a single program and kernel from a single-kernel program source */
extern int create_single_kernel_helper( cl_context context, cl_program *outProgram, cl_kernel *outKernel, unsigned int numKernelLines, const char **kernelProgram, const char *kernelName );
const int MAX_LEN_FOR_KERNEL_LIST = 20;
extern int create_single_kernel_helper_with_build_options( cl_context context, cl_program *outProgram, cl_kernel *outKernel, unsigned int numKernelLines,
const char **kernelProgram, const char *kernelName, const char *buildOptions );
/* Helper that creates a single program and kernel from a single-kernel program source */
extern int create_single_kernel_helper(cl_context context,
cl_program *outProgram,
cl_kernel *outKernel,
unsigned int numKernelLines,
const char **kernelProgram,
const char *kernelName,
const char *buildOptions = NULL,
const bool openclCXX = false);
extern int create_single_kernel_helper_with_build_options(cl_context context,
cl_program *outProgram,
cl_kernel *outKernel,
unsigned int numKernelLines,
const char **kernelProgram,
const char *kernelName,
const char *buildOptions,
const bool openclCXX = false);
extern int create_single_kernel_helper_create_program(cl_context context,
cl_program *outProgram,
unsigned int numKernelLines,
const char **kernelProgram,
const char *buildOptions = NULL,
const bool openclCXX = false);
/* Creates OpenCL C++ program. This one must be used for creating OpenCL C++ program. */
extern int create_openclcpp_program(cl_context context,
cl_program *outProgram,
unsigned int numKernelLines,
const char **kernelProgram,
const char *buildOptions = NULL);
/* Builds program (outProgram) and creates one kernel */
int build_program_create_kernel_helper(cl_context context,
cl_program *outProgram,
cl_kernel *outKernel,
unsigned int numKernelLines,
const char **kernelProgram,
const char *kernelName,
const char *buildOptions = NULL);
/* Helper to obtain the biggest fit work group size for all the devices in a given group and for the given global thread size */
extern int get_max_common_work_group_size( cl_context context, cl_kernel kernel, size_t globalThreadSize, size_t *outSize );
@@ -125,6 +163,13 @@ cl_device_fp_config get_default_rounding_mode( cl_device_id device );
return 0; \
}
#define PASSIVE_REQUIRE_FP16_SUPPORT(device) \
if (!is_extension_available(device, "cl_khr_fp16")) \
{ \
log_info("\n\tNote: device does not support fp16. Skipping test...\n"); \
return 0; \
}
/* Prints out the standard device header for all tests given the device to print for */
extern int printDeviceHeader( cl_device_id device );