Xuanteng Huang
Xuanteng is currently a Ph.D. student in Sun Yat-sen University. His research focuses on the software-hardware co-design on GPU runtime system to better serve the emerging machine learning applications.
China
Session
PyTorch is the the most popular deep learning framework used in both academic and industry. Researchers and engineers use PyTorch to train their models with the convenient and well-defined neural network APIs in eager mode. After training, one has to export the model computation flow as a graph to a framework-agnostic format (e.g., ONNX, TensorRT, etc.) to deploy the trained model for inference with better performance. Thus, we need a mechanism to capture the computation operations happend inside a DNN model.
Graph capturing aims to track and record the PyTorch API invocations used in a model. Since the release of PyTorch 2.0 in 2023, there are two primary machineries to trace a model computation graph: fx.symbolic_trace
and Dynamo. In this proposal, I'd like to introduce the usage of both kinds of APIs, and further dissect the underlying working machinary of these two approaches. We also tend to discuss the limitations of both, showing that fx.symbolic_trace
is limited by the static symbolic tracing mode and Dynamo is still on its early age.