TENSURE:针对稀疏张量编译器的模糊测试(注册报告)
TENSURE: Fuzzing Sparse Tensor Compilers (Registered Report)
AI总结:
本文提出TENSURE,首个专为测试稀疏张量编译器设计的黑盒模糊框架,通过Einsum抽象生成复杂张量收缩,发现编译器代码生成阶段的脆弱性。
摘要:
稀疏张量编译器(STCs)已成为优化高维数据分析和机器学习工作负载的关键基础设施。STCs必须从高层次声明性规范直接合成复杂的不规则控制流,从而使其极易受到细微正确性缺陷的影响。现有测试框架依赖于突变计算图,受限于标准运算符词汇,无法测试这些编译器的任意循环合成能力。此外,通用基于语法的模糊器难以生成有效输入,因为索引在多个张量之间的重用规则严格。在本文中,我们提出了TENSURE,首个可扩展的黑盒模糊框架,专门用于测试STCs。TENSURE利用爱因斯坦求和(Einsum)符号作为通用输入抽象,能够生成复杂、非常规的张量收缩,暴露STC代码生成阶段的边缘情况。我们提出了一种新的基于约束的生成算法,保证合成内核的100%语义有效性,显著优于基准语法模糊器约3.3%的有效性。为实现无需可信参考的元形态测试,我们引入了一组语义保持的突变操作符,利用代数交换性和存储格式的异质性。在对两个最先进的系统TACO和Finch的评估中,揭示了广泛的脆弱性,特别是在TACO中,TENSURE在大多数生成的测试用例中暴露了崩溃或静默误编译。这些发现突显了稀疏编译生态系统中专用测试工具的关键需求。
英文摘要:
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 black-box 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 metamorphic 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.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。