- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
I have a question regarding the creation of kernels from pre-compiled .ir files.
I create a .ir using ioc32 –cmd=compile –input=kernel.cll –device=GPU –ir=kernel.or
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello Mike,
Yes, you need to do -cmd=build. Looks redundant, but that is the way it is specified in the standard. If you use -cmd=compile, that is the equivalent of calling clCompileProgram, which should be followed by clLinkProgram.
For more details, you can check my article on using binaries of different sorts: https://software.intel.com/en-us/articles/using-spir-for-fun-and-profit-with-intel-opencl-code-builder
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank-you for the clarification Robert.
I have a related question. If I build a .ir binary using ioc32 -cmd-build will this work for multiple platforms or is a separate build need to be performed on aper platform basis
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Native binaries are not generally portable between generations of the graphics architecture. If you are targeting 3rd gen (Ivy Bridge), 4th gen (Haswell) and 5th gen (Broadwell) chips, you should build native binaries on those platforms. I asked our compiler team to enable building binaries for different architectures using a single machine, and they are working on this, but it will take some time. In general, I would advise not to distribute native binaries to the end users. It is better to either distribute source, possibly in encrypted fashion, build it into binary on the first invocation of the program, and then continue with that binary (if the user updates the driver, you are safer if you discard the hashed binary and rebuild your program) or use SPIR binary, where available.
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page