Semi-static Type, Shape and Symbolic Shape Inference for Dynamic Computation Graphs
The growing interest in deep learning has created a demand to compile computation graphs to accelerate execution and to deploy applications on various devices. Modern deep learning frameworks construct computation graphs dynamically. This gives rise to the problem of inferring types of dynamic computation graphs. Two approaches are known. One of them is a dynamic approach that constructs the computation graph from the execution trace of an actual input. While this approach is straightforward, the results of the shape inference will consist of only concrete values and is often difficult for users to interpret. The other one performs static analysis over the source program. This method can produce symbolic shape inference results but suffers from the dynamic nature of the host programming language Python.
In this paper, we propose a novel approach for type, shape, and symbolic shape inference of dynamic computation graphs as a mixture of the above two methods. We present results of applying our prototype inference engine for networks written with PyTorch and demonstrate its effectiveness for nontrivial networks.
Conference DayTue 16 JunDisplayed time zone: Pacific Time (US & Canada) change
11:30 - 12:30
|On the Challenges in Programming Mixed-Precision Deep Neural Networks|
|Semi-static Type, Shape and Symbolic Shape Inference for Dynamic Computation Graphs|