On 06/09/2013 09:33 PM, Andreas Kloeckner wrote:
> I did encounter one crash, however, which I've fixed using the attached
> patch. The problem seems to be that program->source can be NULL, and
> that case is not caught in the CL_PROGRAM_SOURCE GetInfo.

Thanks, I'll apply this to both of the branches.

> This is super-promising. I'd love to use pocl for my day-to-day development.
> What's keeping me from doing so is that compilation is slow and (worse)
> resists effective caching by clCreateProgramWithBinary. (I had nagged
> you about this before.)

Yes. This would be really useful to get more efficient. Unfortunately
I'm very busy personally, so I have only time to point developers
to a correct direction with this feature.

Fortunately, there was some interest expressed at the IRC channel to
look at this and the automated compiler caching (which should be designed
hand in hand, I think).

Last year when I implemented the initial binary program interface, I
also thought about making it actually useful for performance. It could
be done with an extremely simple binary format that stores the
interesting files from the current program compilation result tmp dir
structure:

http://bazaar.launchpad.net/~pocl/pocl/trunk/view/head:/doc/binary_format.txt

Then to make the caching fully automatic we can use hashes of the
data that affect the results (perhaps embedded in the temporary directory
name), just like the 'ccache' tool does. At least these should be included
when producing the hash:

1) The preprocessed source.
2) The 'options' passed to clBuildKernel.
3) pocl revision
4) LLVM version
5) contents of the POCL_WORK_GROUP_METHOD and other relevant envs that affect
    the compilation results
6) The possible device specific options that can affect the compilation
result. This affects only the TCE device for now, but in case of TCE the
architecture can be changed via an environment variable pointing to an
architecture description file of which contents affect the end result.
So perhaps there should be a device layer API for an additional device-
specific 'salt' that can be added to the hash.

-- 
Pekka

------------------------------------------------------------------------------
How ServiceNow helps IT people transform IT departments:
1. A cloud service to automate IT design, transition and operations
2. Dashboards that offer high-level views of enterprise services
3. A single system of record for all IT processes
http://p.sf.net/sfu/servicenow-d2d-j
_______________________________________________
pocl-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/pocl-devel

Reply via email to