Hi Vince, Den Fri, 27 Sep 2013 14:56:11 -0400 skrev [pocl-devel] Getting pocl to function with microblaze running linux:
> I have an OpenCL platform that is composed of a microblaze processor > as the host, and device(s) that are connected to the microblaze > processor. The platform is an embedded system (all these elements are > on a single die). The host runs linux, and has a toolchain built for > it (microblazeel-xilinx-linux-gnu-). Sounds cool. Is this a public chip or something private? > The microblaze (host) is connected to the device using a special > peripheral that requires the use of a special instruction (processor > instruction). As a result, I would need to modify the OpenCL library > source to use this special instruction. So, my first question is: > where can I download the OpenCL library source? Is it incorporated > into pocl? If so, where? Yes. Look in lib/CL/ in pocl sources. For your devices you will need to write a dedicated driver into lib/CL/devices/. Any dedicated instructions you need to issue should in be here. > Once I have modified the OpenCL library source to use the special > instruction and conform to my platform specifications, I would need to > compile this library using the toolchain > (microblazeel-xilinx-linux-gnu-). Yes. I don't think anyone has tried pocl with microblaze before, so you will hit a few rough spots on the way. But there should be nothing fundamental that cannot be worked around. > When the OpenCL library is complete, I would need to build the OpenCL > framework, so I can execute kernels on the device(s), which I assume > that is the main contribution of pocl. Right. There are two "libraries" in OpenCL. The host (i.e. the one that implements the OpenCL API) library. This is usually referred to as "the library". And there is the runtime library for the OpenCL-C programs. This is referred to as "the kernel library". Pocl has both. One in lib/CL/, the other in lib/kernel/. > When I attempt to build pocl > using the following command: "./configure > --host=microblazeel-xilinx-linux-gnu-", I get the following error: > "checking host system type... Invalid configuration > `microblazeel-xilinx-linux-gnu-': machine > `microblazeel-xilinx-linux-gnu' not recognized > configure: error: /bin/sh config/config.sub > microblazeel-xilinx-linux-gnu- failed" Does this mean your "build" is not your "host"? This has been tried a few times by people on this list, but I have not yet heard of anyone succeeding. Patches welcome! Also, from the experience on PPC32, PPC64, ARM and x86-32bit, compiling pocl for a new platform is not completely trivial. Hence the error-out due to you having microblaze. Some modification to configure.ac (and more to other places) is needed. > Effectively, I am cross-compiling pocl with the build machine as my > workstation, Oh, right :) Good luck. > What am I doing wrong when building pocl? Nothing. > Another question that I have is: are my steps correct? Is my logic > for solving the issue correct? My final question is: does the above > reasoning/explanation make any sense? Yes, on all accounts. Your setup is a bit unorthodox, so don't expect it to work "out of the box", but feel free to ask. And as a suggestion, I'd start by trying to get the 'basic' driver running on your MB host first. For this driver, "host"=="target", so that is a nice milestone. Unless the MB is so embedded you don't have LLVM&Clang running on it (which the 'basic' driver needs). kalle ------------------------------------------------------------------------------ October Webinars: Code for Performance Free Intel webinars can help you accelerate application performance. Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from the latest Intel processors and coprocessors. See abstracts and register > http://pubads.g.doubleclick.net/gampad/clk?id=60133471&iu=/4140/ostg.clktrk _______________________________________________ pocl-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/pocl-devel
