Deep learning (DL) compilers lower models onto diverse hardware, so their correctness depends on constraints from the model, the compiler, and the target platform. Existing techniques encode only part of these constraints: their tests can be rejected before reaching hardware-dependent logic, and compilation results do not show intermediate compilation states. Compiler-platform interaction issues therefore remain hidden. We propose XCheck, which deterministically extracts cross-layer constraints from documentation, compiler source code, and hardware specifications. It synthesizes models that satisfy all applicable constraints or violate a targeted one, and prioritizes constraints whose tests reach later compilation stages. It also inserts guards into compilers to record how intermediate states relate to quantities of the compiler and the platform, distinguishing compilations that coverage and compilation outcomes treat as the same. On TVM, ONNX-MLIR, and GeneSys, XCheck extracts 987 cross-layer constraints, whereas no baseline encodes a constraint involving the platform. It detects 36 issues, and four baselines miss 72.22% of them. Of these issues, 21 are compiler-platform interaction issues, and the baselines miss 85.71% of them. The developers have since fixed eight issues. Prioritization raises the share of tests reaching code generation by up to 8.50 percentage points, and the guards observe 269 distinct intermediate-state behaviors.
翻译:暂无翻译