[Beignet] [PATCH 2/3] runtime: fix program binary type bug.
Zhigang Gong
zhigang.gong at intel.com
Thu Sep 11 23:33:11 PDT 2014
If the binary is a executable type, the first byte is zero and
we need to set the binary type correctly to CL_PROGRAM_BINARY_TYPE_EXECUTABLE.
Signed-off-by: Zhigang Gong <zhigang.gong at intel.com>
---
src/cl_program.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/src/cl_program.c b/src/cl_program.c
index 3ecc49f..022e893 100644
--- a/src/cl_program.c
+++ b/src/cl_program.c
@@ -247,6 +247,9 @@ cl_program_create_from_binary(cl_context ctx,
}
program->source_type = FROM_LLVM;
}
+ else if (*program->binary == 0) {
+ program->binary_type = CL_PROGRAM_BINARY_TYPE_EXECUTABLE;
+ }
if (binary_status)
binary_status[0] = CL_SUCCESS;
--
1.8.3.2
More information about the Beignet
mailing list