Repository navigation
Any example of clCreateProgramWithBinary use #540
Replies: 5 comments 14 replies
|
Following https://documen.tician.de/pyopencl/runtime_program.html#pyopencl.Program you can just do prg = cl.Program(ctx, (device,), (binary,))where |
|
Let me provide more info. The program prints SUCCESS when done right, and raises a segmentation fault when I introduce invalid parameters, but never in free from libc (as we get when called from PyOpenCL). I attach the small code snippet with comments about the tests I did. Any idea ? |
|
An even smaller working example (without writing files): |
|
On my BootCamp Windows, it simply crashes python :-( |
|
I have found somewhere in StackOverflow: " if you want to save a compiled kernel, save it after a call to clCompileProgram method. On #Mojave you cannot build a program from binary if that binary was previously built by clBuildProgram". Seems true. prints I do not know how to suppress the warning (and the relevance of the warning either). |
Uh oh!
There was an error while loading. Please reload this page.
I'm working with OpenCL on FPGAs, so I would like to load OpenCL programs from binary files.
All the examples I've seen (maybe I'm missing something) are creating programs from source. But I see that the code is somehow prepared to create programs from binary files.
Could you provide an example of how to do so?
BR
All reactions