From: Junyan He <[email protected]> This serialization and deserialization logic just for gen bin file format. We do not follow the LLVM or other standard binary standard here now. So this logic just can be used internal. The pre-defined kernel such as buffer copy can benefit from this.
The problem still to be fix: 1. The gbe::Kernel will use setConstBufSize to re-allocate a constant buffer offset when the kernel argument is GBE_ARG_CONSTANT_PTR type. Because we do not dump the context content to the binary file, the kernel deserialized from binary will not have context. So this will fail. 2. The version and the endian of the binary for guarantee the conformance. Signed-off-by: Junyan He <[email protected]> --- backend/src/CMakeLists.txt | 4 + backend/src/backend/gen_program.cpp | 31 +++ backend/src/backend/gen_program.hpp | 8 + backend/src/backend/program.cpp | 470 +++++++++++++++++++++++++++++++++++ backend/src/backend/program.h | 4 + backend/src/backend/program.hpp | 65 ++++- backend/src/gbe_bin_generater.cpp | 309 +++++++++++++++++++++++ backend/src/ir/constant.hpp | 6 + backend/src/ir/image.hpp | 3 + backend/src/ir/sampler.hpp | 3 + backend/src/sys/platform.hpp | 22 ++ include/CL/cl_intel.h | 8 + src/cl_api.c | 13 + src/cl_program.c | 39 +++ src/cl_program.h | 8 + utests/CMakeLists.txt | 1 + utests/load_program_from_bin.cpp | 64 +++++ 17 files changed, 1055 insertions(+), 3 deletions(-) _______________________________________________ Beignet mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/beignet
