Tensors Fitting Perfectly

02/26/2021
by   Adam Paszke, et al.
0

Multidimensional arrays (NDArrays) are a central abstraction in modern scientific computing environments. Unfortunately, they can make reasoning about programs harder as the number of different array shapes used in an execution of a program is usually very large, and they rarely appear explicitly in program text. To make things worse, many operators make implicit assumptions about the shapes of their inputs: array addition is commonly enriched with broadcasting semantics, while matrix multiplication assumes that the lengths of contracted dimensions are equal. Because precise reasoning about shapes is crucial to write correct programs using NDArrays, and because shapes are often hard to infer from a quick glance at the program, we developed Tensors Fitting Perfectly, a static analysis tool that reasons about NDArray shapes in Swift for TensorFlow programs by synthesizing a set of shape constraints from an abstract interpretation of the program. It can both (1) check for possible inconsistencies, and (2) provide direct insights about the shapes of intermediate values appearing in the program, including via a mechanism called shape holes. The static analysis works in concert with optional runtime assertions to improve the productivity of program authors.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
10/05/2022

Axon: A Language for Dynamic Shapes in Deep Learning Graphs

Axon is a language that enables shape and rank inference for tensors in ...
research
06/02/2021

Putting the Squeeze on Array Programs: Loop Verification via Inductive Rank Reduction

Automatic verification of array manipulating programs is a challenging p...
research
11/25/2020

Learning to Infer Shape Programs Using Latent Execution Self Training

Inferring programs which generate 2D and 3D shapes is important for reve...
research
07/18/2019

Responsibility Analysis by Abstract Interpretation

Given a behavior of interest in the program, statically determining the ...
research
04/27/2020

FlexSA: Flexible Systolic Array Architecture for Efficient Pruned DNN Model Training

Modern deep learning models have high memory and computation cost. To ma...
research
02/23/2020

Verifying Array Manipulating Programs with Full-Program Induction

We present a full-program induction technique for proving (a sub-class o...
research
05/16/2019

Direct Interpretation of Functional Programs for Debugging

We make another assault on the longstanding problem of debugging. After ...

Please sign up or login with your details

Forgot password? Click here to reset