Some of computations should be done on gpu if it is present.