Add auto-tuning functionality