TVM's kernel optimization evolved from AutoTVM's template-based statistical tuning to Ansor's advanced, template-free approach, which automatically generates and explores a vast optimization search space using evolutionary strategies and an improved cost model.