arXivPreprintOpen accesscs.PL

The Output-Space Hypothesis: Enumerative Equivalence Checking for Tensor Programs

Paul Biberstein, Joseph Devietti, Mayur Naik

Key points

From the paper's conclusion
  • A novel way to find bugs in tensor programs by flipping the quantifiers is proposed using a system called extquotesingle extquotesingledirigo extquotesingle extquotesingle with a novel symbolic execution strategy.
  • dirigo finds 600 kernels that are actually buggy out of 6,988 AI-written CUDA kernels marked correct by differential testing, finding 97.3 extpercnt of those bugs within two minutes.
  • This approach demonstrates a more consistent way to identify bugs in tensor programs.

Abstract

Tensor programs, as used in deep learning models, are a prime target for optimization, as small performance improvements can have a large impact across training or inference workloads. However, such optimizations are complicated and can produce subtle bugs. Traditionally, correctness is assumed when differential testing against a reference on random inputs fails to reveal bugs. However, the inputs to these programs are massive tensors, and finding bugs can require generating extremely low likelihood inputs with precise relationships among their values. We propose a novel way to find bugs more consistently by flipping the quantifiers. Rather than generating a single input and checking all output tensor locations for equivalence, what if you could check a single output tensor location's equivalence for all inputs? We implement this idea in a system, \dirigo, by using a novel symbolic execution strategy. We demonstrate that \dirigo can find bugs effectively in a public dataset of 6,988 AI-written CUDA kernels that are all marked correct by differential testing. Of these, \dirigo finds 600 kernels that are actually buggy, and finds 97.3\% of those bugs within two minutes.

Read the paper

Discussion · 1

Science Skim's AI key points, plus readers' public thoughts

Science SkimAI key points
Pinned
  • A novel way to find bugs in tensor programs by flipping the quantifiers is proposed using a system called extquotesingle extquotesingledirigo extquotesingle extquotesingle with a novel symbolic execution strategy.
  • dirigo finds 600 kernels that are actually buggy out of 6,988 AI-written CUDA kernels marked correct by differential testing, finding 97.3 extpercnt of those bugs within two minutes.
  • This approach demonstrates a more consistent way to identify bugs in tensor programs.

Readers' thoughts

No reader thoughts yet.

Related papers