Hi Pekka, thanks for the response, unfortunately I'd set up pocl filtering in my MUA and only found your response today in a google search!
More inline, On 25 July 2013 13:34, Pekka Jääskeläinen <[email protected]> wrote: > Hi Alun Evans, > > The status of the "standalone mode" is, unfortunately, still > the same what it was about a year ago: > http://sourceforge.net/p/pocl/mailman/message/29943341/ > > Thus, the pocl host library implementations are not yet easily > compilable to a "standalone (compilerless or even OSless) host" library. > The experimental code in TCE has some simple host API stubs for the test > cases we used when prototyping/benchmarking OpenCL kernels in this > mode. In our scenario we didn't even have a filesystem in the host so we > just assumed all kernels are linked to the host binary and registered in > such a way that the host program finds the kernels through the normal > OpenCL APIs. > > Anyways, I do not think it would be too much work to go properly through > the route which you apparently started: compile as much of the host > library as is feasible (and possible, without assuming OS support and/or > compiler support) to the target, and then link the kernel(s) with > the host binary, with some glue to register the kernels to the host > program. It needs some macro in the pocl build, e.g., POCL_STANDALONE_BUILD, > which, when defined, drops/shortcuts some APIs (such as the kernel compiler > invocation code). > > You might want to check the tcecc implementation of that as described in > the above older mail. It would be great if someone worked on improving > this as it is handy to support OpenCL on embedded standalone targets. > I can give more advice if you decide to go on with that. > Thanks for the info, I'd actually been trying the standalone route as a "shortcut" to check everything was working correctly on the device, and in the meantime I started looking at adding a new device directly. i.e. I'm compiling pocl natively on x86_64, but trying to add a new device that is an ARM based platform. I've actually got a few more questions on that, but I think I'm making some progress. I just thought about checking whether this has been successfully attempted before? So far I've managed to get a pocl binary (example1) to spit out some arm .so's. > On 07/25/2013 08:43 PM, Alun Evans wrote: >> >> I was trying to go down this route, but as I cross-compiled pocl, I >> get this final link error: >> >> cannot find -lLLVM-3.1 >> >> - of course, I guess I thought that in standalone mode no llvm would >> be needed on the embedded device, as all the cross-compilation of the >> OpenCL application, as well as the OpenCL kernel takes place on the >> build server, rather than the host? > > > Yes. The host should be able to cross compile the whole OpenCL > app (host program + kernel(s)) and link the bitcode and somehow > register the kernels to the host program. If you have filesystem > support you can use the binary interface to avoid this. But the > whole point of the standalone mode is to avoid the need for compiler/OS > in the target. Well infact the device is a bit space limited, so holding a a toolchain out there would have been a bit of a pain. > What's in pocl is the pocl-standalone script that builds the kernels > "offline" to a bitcode. The rest is currently missing from the pocl > source tree. TCE has the prototype/"proof of concept" work to make > it work for OSless standalone TTAs which can be used for ideas at > least. > > >> btw, I also got an error for not being able to find -lffi, I wonder if >> there should be an AC check for it ? > > > I'm not aware of this. Maybe it's pulled from LLVM deps? Ah you're right, my mistake! thanks again for the replies, I'll be certainly to send back any useful patches in the near-time. I'll probably get into running valgrind/cachegrind at some point as well I suspect. A. -- Alun Evans ------------------------------------------------------------------------------ Get 100% visibility into Java/.NET code with AppDynamics Lite! It's a free troubleshooting tool designed for production. Get down to code-level detail for bottlenecks, with <2% overhead. Download for free and get started troubleshooting in minutes. http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk _______________________________________________ pocl-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/pocl-devel
