add optimization flags for device