January 29, 2026
Sparse Tensor Compilers (STCs) have emerged as critical infrastructure for optimizing high-dimensional data analytics and machine learning workloads. The STCs must synthesize complex, irregular control flow for various compressed storage formats directly from high-level declarative specifications, thereby making them highly susceptible to subtle correctness defects. Existing testing frameworks, which rely on mutating computation graphs restricted to a standard vocabulary of operators, fail to exercise the arbitrary loop synthesis capabilities of these compilers. Furthermore, generic grammar-based fuzzers struggle to generate valid inputs due to the strict rules governing how indices are reused across multiple tensors. In this paper, we present TenSure, the first extensible blackbox fuzzing framework specifically designed for the testing of STCs. TenSure leverages Einstein Summation (Einsum) notation as a general input abstraction, enabling the generation of complex, unconventional tensor contractions that expose corner cases in the code-generation phases of STCs. We propose a novel constraint-based generation algorithm that guarantees 100% semantic validity of synthesized kernels, significantly outperforming the ~3.3% validity rate of baseline grammar fuzzers. To enable differential testing without a trusted reference, we introduce a set of semantic-preserving mutation operators that exploit algebraic commutativity and heterogeneity in storage formats. Our evaluation on two state-of-the-art systems, TACO and Finch, reveals widespread fragility, particularly in TACO, where TenSure exposed crashes or silent miscompilations in a majority of generated test cases. These findings underscore the critical need for specialized testing tools in the sparse compilation ecosystem.
About Kabilan Mahathevan
Kabilan Mahathevan is a first-year PhD student in the Department of Computer Science at Virginia Tech, where he is advised by Prof. Kirshanthan Sundararajah. His research focuses on the reliability and optimization of tensor compilers, specifically exploring the complex interplay between data layouts, sparsity, and heterogeneous hardware. Prior to joining Virginia Tech, Kabilan was a visiting scholar at the National University of Singapore (NUS), collaborating with Prof. Manuel Rigger on the development of a dialect-agnostic SQL parser and mutation testing for SQL engines. He earned his undergraduate degree from the University of Moratuwa, where he conducted research on the reliability of cloud PaaS systems.