Optimize kernel (-O3 and graphite)

Change-Id: I0bb52feeec0db86ca1cddf82aabd727fa77acfc6