Hi,
for my master thesis I attempt to implement a custom ICD loader that
only exposes a pseudo device to the outside and then dispatches OpenCL
calls itself to the real devices. Until now, the base system worked
quite well so far, with pocl as a runtime.
Now I attempt to use Clang/LLVM to do some analysis on the OpenCL code
that I can finally use to decide where exactly to run the kernels.
However, I can't get pocl and this analyser work together.
If pocl did not yet create its cache, the applications segfaults on
calls to clEnqueueNDRangeKernel with the additional message:
Two passes with the same argument (<these vary>) attempted to be
registered!
In my first attempt I used the default global LLVM context and figured
that this might somehow interfere with the pocl context.
Therefore I created a new LLVMContext, but to no avail. This alone also
seems to break something, as little as calling:
void analyse(..) {
llvm::LLVMContext* myContext = new llvm::LLVMContext();
delete(myContext);
}
leads to the same error described above.
In both cases though, the program does not crash, if the pocl cache was
created beforehand.
Do you have an idea how I can employ LLVM functionality without
interfering with pocl's operation? I am not at all familiar with LLVMs
inner workings, so I might be missing something obvious.
Best regards
Gunnar Wüllrich
------------------------------------------------------------------------------
_______________________________________________
pocl-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/pocl-devel