diff options
author | Yang Rong <rong.r.yang@intel.com> | 2017-02-10 14:38:25 +0800 |
---|---|---|
committer | Yang Rong <rong.r.yang@intel.com> | 2017-02-14 17:04:12 +0800 |
commit | efd30ab9e62df7cd16208d1dbd825e952500a160 (patch) | |
tree | 79fa511b18c9a8cdf42831b5ae6ec1a3aad65267 /src | |
parent | c6cde5ceb860047bcda176de564d2fc088932d68 (diff) | |
download | beignet-efd30ab9e62df7cd16208d1dbd825e952500a160.tar.gz |
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 <rong.r.yang@intel.com>
Reviewed-by: Pan Xiuli <xiuli.pan@intel.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/cl_program.c | 1 |
1 files changed, 1 insertions, 0 deletions
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; } |