Abstract
Frameworks and domain-specific languages for auto-generating code havetraditionally depended on human experts to implement rigorous methods ensuringthe legality of code transformations. Recently, machine learning (ML) hasgained traction for generating code optimized for specific hardware targets.However, ML approaches-particularly black-box neural networks-offer noguarantees on the correctness or legality of the transformations they produce.To address this gap, we introduce Tadashi, an end-to-end system that leveragesthe polyhedral model to support researchers in curating datasets critical forML-based code generation. Tadashi provides an end-to-end system capable ofapplying, verifying, and evaluating candidate transformations on polyhedralschedules with both reliability and practicality. We formally prove thatTadashi guarantees the legality of generated transformations, demonstrate itslow runtime overhead, and showcase its broad applicability. Tadashi availableat https://github.com/vatai/tadashi/.