On 27/08/13 14:27, ext Krishnaraj wrote:
> All,
>      I have a question regarding clBuildProgram() in pocl. I believe it only
> generates LLVM IR at this stage.

Yes

> So the conversion form IR to binary
> happens during clCreateKernel()?

No. createKernel calls the pocl-workgroup script that runs the 
pocl-specific optimizations on the kernel. It is still in LLVM bitcode 
form (program.bc, in the cache directory). Only in the device drivers 
"run()" function is clang called to compile this bc into native code.

>      I am particularly interested in this because I need to avoid building
> programs

There is some support for this functionality - if you launch the kernel 
multiple times in the same process. You could even save the compiler 
cache (export POCL_LEAVE_TEMP_DIRS=1 and set POCL_TEMP_DIR=/some/where) 
to keep the cache across process boundaries. There are some issues with 
the cache, though. Please see the bug lists.

The thing that eats up the compilation time is linking in the kernel 
runtime library. You might want to check out Nat Ferrus' work (a few 
weeks ago on this list) to speed this step up considerably.

> clCreateKernel() is taking 83 ms, which is considerable amount of time!

Well, in some contexts it is :)


kalle

-- 
But beware the debugger. Dark side of the source it is.
If once you start down the dark path, forever will it dominate
your destiny. Consume you it will.

------------------------------------------------------------------------------
Introducing Performance Central, a new site from SourceForge and 
AppDynamics. Performance Central is your source for news, insights, 
analysis and resources for efficient Application Performance Management. 
Visit us today!
http://pubads.g.doubleclick.net/gampad/clk?id=48897511&iu=/4140/ostg.clktrk
_______________________________________________
pocl-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/pocl-devel

Reply via email to