Pages

Saturday 3 March 2018

Compiling Tensorflow with OpenCL SYCL on Intel GPU/CPU

Useful resources:
https://arrayfire.com/opencl-on-intel-hd-iris-graphics-on-linux/

https://developer.codeplay.com/computecppce/v0.6.0/supported-platforms

https://askubuntu.com/questions/850281/opencl-on-ubuntu-16-04-intel-sandy-bridge-cpu

https://software.intel.com/en-us/articles/opencl-drivers#latest_linux_driver

https://github.com/benoitsteiner/tensorflow-opencl/issues/37

I had the same problem but solved the import error as following

I have the computecpp folder stored at /usr/local/computecpp.
By default, libComputeCpp.so is under computercpp/lib.
So do > export LD_LIBRARY_PATH=/usr/local/computecpp/lib to add the path
Now import should work.


http://deep-beta.co.uk/setting-up-tensorflow-with-opencl-using-sycl/


https://github.com/tensorflow/tensorflow/issues/15204#issuecomment-370069712

https://github.com/tensorflow/tensorflow/issues/2109

https://github.com/lukeiwanski/tensorflow/issues/215

https://github.com/tensorflow/tensorflow/issues/2109

https://github.com/benoitsteiner/tensorflow-opencl

https://github.com/lukeiwanski/tensorflow

https://github.com/hughperkins/tf-coriander


What has worked out-of-the-box:
https://github.com/lukeiwanski/tensorflow/tree/dev/eigen_mehdi

The only distribution that compiles fine  - without any modification

The issue is with Intel drivers - when running tensorflow training, intel GPU device is not detected - while CPU is detected but the code hangs - might require compiling of linux header with a patch.


Till now no success in getting the device and running it
 

Tuesday 20 September 2016

Hiding data in Images

Here is a still from my favourite movie
The Martian
Now, what if I told you that I have hidden a big message inside this image. Would you be able to find out what it is?

Tuesday 2 August 2016

Particles explained using Gifs!!

Over the past few months, I have been reading, understanding and implementing a number of existing algorithms in Computer Vision domain. Implementing particles and particle based algorithms have really had me excited and almost on the edge of my seat. One may ask what makes particles so interesting?? Let me try to get the concept through.

Particles, just like most existing algorithms in computer science, are inspired by nature. Have you ever seen a beam of sunlight coming through a window and illuminate a bunch of floating particles (impossible in London though I have seen it before)? When you see these tiny particles, you notice that they are suspended in air and that it's very difficult to predict their motion unless you disturb the surrounding air. This simple concept is vital for many computer algorithms that model motion/dynamics of an object.

Particles, along with their randomness, can be simulated inside a computer program. The simplest of such algorithm is called Random Walk, where a particle is modelled with its current position/state alone and a random displacement/jump determines its next position in time. Here I have shown one Random Walk particle:

A Single Random Walk Particle

Monday 6 June 2016

Expectation Maximization for Gaussian Mixture Model in OpenCV

I recently wrote code for Gaussian Mixture Model (GMM) based clustering in C++. As always, I found it much convenient to use OpenCV for manipulating matrices. Although there already exist an implementation of Expectation Maximization-based GMM, I tried to understand it by writing my own implementation.

The basic idea of GMM is to first randomly assign each sample to a cluster. This provides initial mixture model for clustering. This is then optimized using Expectation - or the probability/score of assigning each sample to each component in GMM - and Maximization - or updating the characteristics of each mixture component with the given probability/score . An attractive attribute of GMM is its ability to cluster data that does not have clear boundaries for clusters. This is achieved by having a probability/score for each sample from each cluster component.

Tuesday 17 May 2016

A Random Walk

It is fascinating to see the use of the word 'random' and its resemblance to one of the most basic ingredients in some computer algorithms. One may ask what is it that makes something random?

- "So you just made a random deal?"
- "Students were randomly chosen to take part in a drama."
- "He figured out that he still had an hour to his departure, so he went for a random walk."