From efd30ab9e62df7cd16208d1dbd825e952500a160 Mon Sep 17 00:00:00 2001 From: Yang Rong Date: Fri, 10 Feb 2017 14:38:25 +0800 Subject: Runtime: add a warning when load gen binary fail. Some applications use program's binary by default, if load the former's gen binary, because the fields of gen binary has changed, and lack of version checking, will lead to clCreateProgramWithBinary fail, may cause applications fail silently. Add a warning to hint user. Signed-off-by: Yang Rong Reviewed-by: Pan Xiuli --- src/cl_program.c | 1 + 1 file changed, 1 insertion(+) (limited to 'src') diff --git a/src/cl_program.c b/src/cl_program.c index 03587055..363aed5d 100644 --- a/src/cl_program.c +++ b/src/cl_program.c @@ -334,6 +334,7 @@ cl_program_create_from_binary(cl_context ctx, else if (isGenBinary((unsigned char*)program->binary)) { program->opaque = interp_program_new_from_binary(program->ctx->devices[0]->device_id, program->binary, program->binary_sz); if (UNLIKELY(program->opaque == NULL)) { + DEBUGP(DL_ERROR, "Incompatible binary, please delete the binary and generate again."); err = CL_INVALID_PROGRAM; goto error; } -- cgit v1.2.1