pocl: ARM Chromebook: enable Khronos ICD Loader

.. so I assume some of you bravehearts would’ve tried the earlier post about getting pocl to work on an ARM chromebook. I mentioned there that initially, –disable-icd is a better option.

In this post, I’ll outline how to get Khronos ICD Loader working with pocl (thanks to [1])

[Assumptions: my pocl directory is ~/code/pocl; and I unpack khronos ICD loader into ~/code/icd - please adjust according to your environment]

  • Download and unpack the Khronos ICD Loader from here: http://www.khronos.org/registry/cl/
  • Connect CL headers from the include directory of your pocl working area (eg ~/code/pocl/include) [2], to the ‘inc’ directory in the location where you unpacked
    • Either copy:
      • cp -rf ~/code/pocl/include/CL ~/code/icd/inc
    • OR, you could create soft link as well, like this:
      • cd ~/code/icd/inc; ln -s ~/code/pocl/include/CL . 
  • CD to the icd loader directory [eg ~/code/icd], and apply a patch thus:
    • patch -p1 < ~/code/pocl/tools/patches/khronos-icd-loader.patch
  • Build it with ‘make’
  • Copy the loader to a library search path:
    • sudo cp bin/libOpenCL* /usr/lib

Now, you should be able to tell the pocl build system to allow overriding the ICD search path with OCL_ICD_VENDORS environment variable like this:

export OCL_ICD_VENDORS="PATH_TO_THE_POCL_BUILD_TREE/ocl-vendors"

Now you can adapt your pocl configure to –enable-icd :)

Happy pocl’ing!

[1]: http://pocl.sourceforge.net/docs/html/development.html#khronos-icd-loader

[2]: make sure you connect the pocl CL headers *only*; the others don’t seem to work for me

About these ads

Posted on May 10, 2013, in Linaro and tagged , , , . Bookmark the permalink. Leave a comment.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Chromebook Paradise

Discovering Chromebooks potential to change today's computer market.

Tom Gall

Full Shovel, dig in.

Follow

Get every new post delivered to your Inbox.

%d bloggers like this: