fix graphite optimization support

Change-Id: Ifa79b8714559d5d8710aaa6a17e9b26ffd226304