PyPm is a Python-based domain specific language (DSL) for building rewrite-based optimization passes on deep learning computation graphs. Users define individual optimizations by writing (a) \emph{patterns} that match subgraphs of a computation graph and (b) corresponding \emph{rules} which replace a matched subgraph with an optimized kernel. PyPm is distinguished from the many other DSLs for defining rewriting passes by its complex and novel pattern language which borrows concepts from logic programming. PyPm patterns can be recursive, nondeterminstic, and can require checking domain-specific constraints such as the shapes of tensors. The PyPm implementation is thus similarly complicated, consisting of thousands of lines of C++ code. In this paper, we present our work formalizing and distilling and this complexity to an understandable mathematical core. We have developed a formal core calculus expressing the main operations of the PyPm pattern language. We define both a declarative semantics – describing which patterns match which terms – and an algorithmic semantics – an idealized version of the PyPm pattern interpreter – and prove their equivalence. The development is fully mechanized in the Coq proof assistant.

Mon 3 Mar

Displayed time zone: Pacific Time (US & Canada) change

11:20 - 12:20
Optimizations & Transformations (1)Main Conference at Casuarina Ballroom (Level 2)
Chair(s): Oleksandr Zinenko n/a
11:20
20m
Talk
SySTeC: A Symmetric Sparse Tensor Compiler
Main Conference
Radha Patel Massachusetts Institute of Technology, Willow Ahrens Massachusetts Institute of Technology, Saman Amarasinghe Massachusetts Institute of Technology
11:40
20m
Talk
Pattern Matching in AI Compilers and its Formalization
Main Conference
Joseph W. Cutler University of Pennsylvania, Alexander Collins NVIDIA, Bin Fan Nvidia, Mahesh Ravishankar , Vinod Grover NVIDIA
12:00
20m
Talk
Scalar Interpolation: A Better Balance Between Vector and Scalar Execution for SuperScalar Architectures
Main Conference
Reza Ghanbari University of Alberta, Henry Kao Huawei Technologies Canada, João P. L. De Carvalho AMD, Ehsan Amiri Huawei Technologies Canada, Jose Nelson Amaral University of Alberta