-
Notifications
You must be signed in to change notification settings - Fork 230
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cl-binary: move kernel binary to text as built-in
* How to load binary-text file: 1. generate binary file, related script: libxcam/tests/test-binary-kernel Usage: $ test-binary-kernel -i kernel_demo.cl -o kernel_demo.cl.bin \ -k kernel_demo 2. generate binary-text file, related script: libxcam/tools/convert-binary-to-text.sh Usage: $ convert-binary-to-text.sh kernel_demo.cl.bin \ kernel_demo.clx.bin 3. include binary-text file in create-handler function, please refer to demo handler: SmartPtr<CLImageHandler> create_cl_binary_demo_image_handler (SmartPtr<CLContext> &context) Signed-off-by: Wind Yuan <feng.yuan@intel.com>
- Loading branch information
1 parent
52d45b3
commit 5aad612
Showing
7 changed files
with
120 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,117 @@ | ||
/* | ||
* How to load binary-text file: | ||
* | ||
* 1. generate binary file, related script: libxcam/tests/test-binary-kernel | ||
* Usage: | ||
* $ test-binary-kernel -i kernel_demo.cl -o kernel_demo.cl.bin -k kernel_demo | ||
* | ||
* 2. generate binary-text file, related script: libxcam/tools/convert-binary-to-text.sh | ||
* Usage: | ||
* $ convert-binary-to-text.sh kernel_demo.cl.bin kernel_demo.clx.bin | ||
* | ||
* 3. include binary-text file when create image handler, please refer to demo handler: | ||
* SmartPtr<CLImageHandler> create_cl_binary_demo_image_handler (SmartPtr<CLContext> &context) | ||
* | ||
*/ | ||
|
||
{ | ||
0x01, 0x47, 0x45, 0x4e, 0x43, 0x43, 0x48, 0x56, 0x47, 0x4f, 0x52, 0x50, 0x01, 0x00, 0x00, 0x00, | ||
0x54, 0x53, 0x4e, 0x43, 0x8c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
0x2f, 0x0a, 0x00, 0x00, 0x83, 0x09, 0x00, 0x00, 0xe4, 0x06, 0x00, 0x00, 0x44, 0x0e, 0x00, 0x00, | ||
0x52, 0x01, 0x00, 0x00, 0xfc, 0x09, 0x00, 0x00, 0x75, 0x02, 0x00, 0x00, 0xd1, 0x07, 0x00, 0x00, | ||
0x53, 0x0f, 0x00, 0x00, 0xdd, 0x04, 0x00, 0x00, 0x0d, 0x0c, 0x00, 0x00, 0x62, 0x0b, 0x00, 0x00, | ||
0x59, 0x09, 0x00, 0x00, 0x3c, 0x09, 0x00, 0x00, 0x39, 0x04, 0x00, 0x00, 0x41, 0x00, 0x00, 0x00, | ||
0xe5, 0x0f, 0x00, 0x00, 0x63, 0x01, 0x00, 0x00, 0x38, 0x63, 0xed, 0x3e, 0xda, 0x0f, 0x49, 0x3f, | ||
0x5e, 0x98, 0x7b, 0x3f, 0xda, 0x0f, 0xc9, 0x3f, 0x69, 0x37, 0xac, 0x31, 0x68, 0x21, 0x22, 0x33, | ||
0xb4, 0x0f, 0x14, 0x33, 0x68, 0x21, 0xa2, 0x33, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x3f, | ||
0x00, 0x00, 0xc0, 0x3f, 0x00, 0x00, 0x00, 0x00, 0xdc, 0xcf, 0xd1, 0x35, 0x00, 0x00, 0x00, 0x00, | ||
0x00, 0xc0, 0x15, 0x3f, 0x07, 0x00, 0x00, 0x00, 0x1b, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, | ||
0x74, 0x77, 0x6f, 0x5f, 0x6f, 0x76, 0x65, 0x72, 0x5f, 0x70, 0x69, 0x50, 0x00, 0x00, 0x00, 0x04, | ||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x16, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x61, | ||
0x74, 0x61, 0x6e, 0x68, 0x69, 0x10, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, | ||
0x00, 0x16, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x61, 0x74, 0x61, 0x6e, 0x6c, 0x6f, 0x10, | ||
0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00, 0x18, | ||
0x00, 0x00, 0x00, 0x5f, 0x5f, 0x6f, 0x63, 0x6c, 0x5f, 0x6d, 0x61, 0x74, 0x68, 0x5f, 0x66, 0x61, | ||
0x73, 0x74, 0x70, 0x61, 0x74, 0x68, 0x5f, 0x66, 0x6c, 0x61, 0x67, 0x04, 0x00, 0x00, 0x00, 0x04, | ||
0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x2a, 0x00, 0x00, 0x00, 0x1a, 0x00, 0x00, 0x00, 0x5f, | ||
0x5f, 0x67, 0x65, 0x6e, 0x5f, 0x6f, 0x63, 0x6c, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, | ||
0x6c, 0x5f, 0x70, 0x6f, 0x77, 0x6e, 0x2e, 0x62, 0x70, 0x08, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, | ||
0x00, 0x74, 0x00, 0x00, 0x00, 0x2c, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x5f, 0x5f, 0x67, | ||
0x65, 0x6e, 0x5f, 0x6f, 0x63, 0x6c, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, | ||
0x70, 0x6f, 0x77, 0x6e, 0x2e, 0x64, 0x70, 0x5f, 0x6c, 0x08, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, | ||
0x00, 0x7c, 0x00, 0x00, 0x00, 0x2c, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x5f, 0x5f, 0x67, | ||
0x65, 0x6e, 0x5f, 0x6f, 0x63, 0x6c, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, | ||
0x70, 0x6f, 0x77, 0x6e, 0x2e, 0x64, 0x70, 0x5f, 0x68, 0x08, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, | ||
0x00, 0x84, 0x00, 0x00, 0x00, 0x43, 0x4e, 0x53, 0x54, 0xa9, 0x01, 0x00, 0x00, 0x01, 0x00, 0x00, | ||
0x00, 0x43, 0x4c, 0x45, 0x52, 0x00, 0x00, 0x00, 0x00, 0x52, 0x45, 0x4c, 0x43, 0x0c, 0x00, 0x00, | ||
0x00, 0x01, 0x00, 0x00, 0x00, 0x4e, 0x52, 0x45, 0x4b, 0x0b, 0x00, 0x00, 0x00, 0x6b, 0x65, 0x72, | ||
0x6e, 0x65, 0x6c, 0x5f, 0x64, 0x65, 0x6d, 0x6f, 0x78, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, | ||
0x04, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, | ||
0x00, 0x09, 0x00, 0x00, 0x00, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x32, 0x64, 0x5f, 0x74, 0x09, 0x00, | ||
0x00, 0x00, 0x72, 0x65, 0x61, 0x64, 0x5f, 0x6f, 0x6e, 0x6c, 0x79, 0x00, 0x00, 0x00, 0x00, 0x05, | ||
0x00, 0x00, 0x00, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x04, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, | ||
0x04, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x69, 0x6d, 0x61, | ||
0x67, 0x65, 0x32, 0x64, 0x5f, 0x74, 0x0a, 0x00, 0x00, 0x00, 0x77, 0x72, 0x69, 0x74, 0x65, 0x5f, | ||
0x6f, 0x6e, 0x6c, 0x79, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x6f, 0x75, 0x74, 0x70, | ||
0x75, 0x74, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, | ||
0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x00, 0x06, 0x00, | ||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, | ||
0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x15, 0x00, | ||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x16, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0xe0, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x50, 0x4d, 0x41, 0x53, 0x01, | ||
0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x53, 0x41, 0x4d, 0x50, 0x14, | ||
0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x47, 0x41, 0x4d, 0x49, 0x02, 0x00, 0x00, 0x00, 0x29, | ||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, | ||
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | ||
0xff, 0xff, 0xff, 0x2a, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0xff, | ||
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | ||
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, | ||
0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | ||
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x03, | ||
0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, | ||
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | ||
0xff, 0xff, 0xff, 0x49, 0x4d, 0x41, 0x47, 0xa0, 0x00, 0x00, 0x00, 0x70, 0x02, 0x00, 0x00, 0x01, | ||
0x00, 0x80, 0x00, 0x4c, 0x16, 0x40, 0x20, 0x00, 0x00, 0x00, 0x10, 0xff, 0xff, 0x00, 0x00, 0x01, | ||
0x00, 0x80, 0x00, 0x48, 0x16, 0x40, 0x20, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x10, | ||
0x80, 0x80, 0x06, 0x45, 0x12, 0x00, 0x20, 0x40, 0x00, 0x8d, 0x16, 0x00, 0x00, 0x00, 0x00, 0x22, | ||
0x00, 0x81, 0x00, 0x01, 0x06, 0x00, 0x20, 0x90, 0x01, 0x00, 0x00, 0x90, 0x01, 0x00, 0x00, 0x41, | ||
0x00, 0x00, 0x00, 0x2c, 0x0a, 0x20, 0x20, 0x04, 0x00, 0x00, 0x02, 0x28, 0x00, 0x00, 0x00, 0x01, | ||
0x00, 0x80, 0x00, 0x0c, 0x06, 0x40, 0x23, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, | ||
0x00, 0x60, 0x00, 0x08, 0x06, 0xc0, 0x23, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, | ||
0x96, 0x01, 0x20, 0xe0, 0x02, 0x01, 0x04, 0x01, 0x00, 0x00, 0x00, 0x0c, 0x06, 0x5c, 0x23, 0x00, | ||
0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x40, 0x96, 0x65, 0x20, 0x07, 0x08, 0x02, 0x01, 0x41, | ||
0x00, 0x00, 0x00, 0x2c, 0x0a, 0x24, 0x20, 0x18, 0x00, 0x00, 0x02, 0x30, 0x00, 0x00, 0x00, 0x01, | ||
0x96, 0x00, 0x20, 0x07, 0x0e, 0x08, 0x00, 0x40, 0x96, 0x15, 0x20, 0xe0, 0x0a, 0x01, 0x06, 0x01, | ||
0x4b, 0x00, 0x20, 0x07, 0x1b, 0x08, 0x00, 0x40, 0x96, 0x71, 0x20, 0x07, 0x0c, 0x0a, 0x01, 0x01, | ||
0x96, 0x00, 0x20, 0x07, 0x10, 0x0c, 0x00, 0x01, 0x4b, 0x00, 0x20, 0x07, 0x1c, 0x0c, 0x00, 0x31, | ||
0x00, 0x80, 0x02, 0x08, 0x3a, 0x40, 0x22, 0xc0, 0x01, 0x8d, 0x06, 0x02, 0x00, 0x84, 0x08, 0x01, | ||
0x00, 0x60, 0x00, 0x08, 0x06, 0xa0, 0x23, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, | ||
0x00, 0x60, 0x00, 0x28, 0x0a, 0xe0, 0x23, 0x40, 0x02, 0x8d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, | ||
0x00, 0x60, 0x00, 0x28, 0x0a, 0x00, 0x24, 0x80, 0x02, 0x8d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, | ||
0x00, 0x60, 0x00, 0x28, 0x0a, 0x40, 0x24, 0x00, 0x03, 0x8d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, | ||
0x00, 0x60, 0x00, 0x28, 0x0a, 0x20, 0x24, 0xc0, 0x02, 0x8d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x31, | ||
0x00, 0x60, 0x0c, 0x00, 0x02, 0x00, 0x20, 0x40, 0x03, 0x8d, 0x06, 0x03, 0x50, 0x0b, 0x12, 0x01, | ||
0x54, 0x00, 0x20, 0x07, 0x1b, 0x09, 0x00, 0x01, 0x54, 0x00, 0x20, 0x07, 0x1c, 0x0d, 0x00, 0x01, | ||
0x10, 0x60, 0x00, 0x08, 0x06, 0xc0, 0x23, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, | ||
0x10, 0x60, 0x00, 0x28, 0x0a, 0x00, 0x24, 0xa0, 0x02, 0x8d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, | ||
0x10, 0x60, 0x00, 0x28, 0x0a, 0x40, 0x24, 0x20, 0x03, 0x8d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, | ||
0x10, 0x60, 0x00, 0x08, 0x06, 0xa0, 0x23, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, | ||
0x10, 0x60, 0x00, 0x28, 0x0a, 0xe0, 0x23, 0x60, 0x02, 0x8d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, | ||
0x10, 0x60, 0x00, 0x28, 0x0a, 0x20, 0x24, 0xe0, 0x02, 0x8d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x31, | ||
0x10, 0x60, 0x0c, 0x00, 0x02, 0x00, 0x20, 0x40, 0x03, 0x8d, 0x06, 0x03, 0x50, 0x0b, 0x12, 0x25, | ||
0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x8d, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x01, | ||
0x00, 0x80, 0x00, 0x0d, 0x02, 0x00, 0x2e, 0x00, 0x00, 0x8d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x31, | ||
0x00, 0x60, 0x07, 0x00, 0x02, 0x00, 0x20, 0x00, 0x0e, 0x8d, 0x06, 0x10, 0x00, 0x00, 0x82, 0x7e, | ||
0x00, 0x00, 0x00, 0x08, 0x02, 0x00, 0x20, 0x00, 0x00, 0x69, 0x06, 0x00, 0x00, 0x00, 0x00, 0x7e, | ||
0x00, 0x00, 0x00, 0x08, 0x02, 0x00, 0x20, 0x00, 0x00, 0x69, 0x06, 0x00, 0x00, 0x00, 0x00, 0x7e, | ||
0x00, 0x00, 0x00, 0x08, 0x02, 0x00, 0x20, 0x00, 0x00, 0x69, 0x06, 0x00, 0x00, 0x00, 0x00, 0x7e, | ||
0x00, 0x00, 0x00, 0x08, 0x02, 0x00, 0x20, 0x00, 0x00, 0x69, 0x06, 0x00, 0x00, 0x00, 0x00, 0x7e, | ||
0x00, 0x00, 0x00, 0x08, 0x02, 0x00, 0x20, 0x00, 0x00, 0x69, 0x06, 0x00, 0x00, 0x00, 0x00, 0x7e, | ||
0x00, 0x00, 0x00, 0x08, 0x02, 0x00, 0x20, 0x00, 0x00, 0x69, 0x06, 0x00, 0x00, 0x00, 0x00, 0x7e, | ||
0x00, 0x00, 0x00, 0x08, 0x02, 0x00, 0x20, 0x00, 0x00, 0x69, 0x06, 0x00, 0x00, 0x00, 0x00, 0x7e, | ||
0x00, 0x00, 0x00, 0x08, 0x02, 0x00, 0x20, 0x00, 0x00, 0x69, 0x06, 0x00, 0x00, 0x00, 0x00, 0x4b, | ||
0x45, 0x52, 0x4e, 0x4e, 0x04, 0x00, 0x00, 0x50, 0x52, 0x4f, 0x47, 0x23, 0x06, 0x00, 0x00, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters