Cargando…
A ROOT feature for parsing PyTorch Geometric graph neural networks into C++ code for fast inference
Graph neural networks have proven effective in many different fields — including particle physics — and are typically trained using Python tools such as PyTorch Geometric. For deployment, however, it is often desirable to move away from Python and run fast inference in a high-performance environment...
Autor principal: | |
---|---|
Lenguaje: | eng |
Publicado: |
2023
|
Materias: | |
Acceso en línea: | http://cds.cern.ch/record/2868483 |
_version_ | 1780978224414588928 |
---|---|
author | Van Berkum, Stefan |
author_facet | Van Berkum, Stefan |
author_sort | Van Berkum, Stefan |
collection | CERN |
description | Graph neural networks have proven effective in many different fields — including particle physics — and are typically trained using Python tools such as PyTorch Geometric. For deployment, however, it is often desirable to move away from Python and run fast inference in a high-performance environment like C++. This report describes my work on adding a ROOT feature for parsing PyTorch Geometric graph neural networks into C++ code. The feature currently supports basic graph neural networks and preliminary results suggest that it is roughly five times faster than TorchScript (PyTorch's native C++ inference code generator) on a single CPU thread, for a basic graph-classification model with two graph convolutions. In the future, additional modules should be added to support the entire range of GNNs used in LHC experiments and further optimizations could yield even larger speedups. |
id | cern-2868483 |
institution | Organización Europea para la Investigación Nuclear |
language | eng |
publishDate | 2023 |
record_format | invenio |
spelling | cern-28684832023-08-25T20:29:08Zhttp://cds.cern.ch/record/2868483engVan Berkum, StefanA ROOT feature for parsing PyTorch Geometric graph neural networks into C++ code for fast inferenceComputing and ComputersGraph neural networks have proven effective in many different fields — including particle physics — and are typically trained using Python tools such as PyTorch Geometric. For deployment, however, it is often desirable to move away from Python and run fast inference in a high-performance environment like C++. This report describes my work on adding a ROOT feature for parsing PyTorch Geometric graph neural networks into C++ code. The feature currently supports basic graph neural networks and preliminary results suggest that it is roughly five times faster than TorchScript (PyTorch's native C++ inference code generator) on a single CPU thread, for a basic graph-classification model with two graph convolutions. In the future, additional modules should be added to support the entire range of GNNs used in LHC experiments and further optimizations could yield even larger speedups.CERN-STUDENTS-Note-2023-076oai:cds.cern.ch:28684832023-08-25 |
spellingShingle | Computing and Computers Van Berkum, Stefan A ROOT feature for parsing PyTorch Geometric graph neural networks into C++ code for fast inference |
title | A ROOT feature for parsing PyTorch Geometric graph neural networks into C++ code for fast inference |
title_full | A ROOT feature for parsing PyTorch Geometric graph neural networks into C++ code for fast inference |
title_fullStr | A ROOT feature for parsing PyTorch Geometric graph neural networks into C++ code for fast inference |
title_full_unstemmed | A ROOT feature for parsing PyTorch Geometric graph neural networks into C++ code for fast inference |
title_short | A ROOT feature for parsing PyTorch Geometric graph neural networks into C++ code for fast inference |
title_sort | root feature for parsing pytorch geometric graph neural networks into c++ code for fast inference |
topic | Computing and Computers |
url | http://cds.cern.ch/record/2868483 |
work_keys_str_mv | AT vanberkumstefan arootfeatureforparsingpytorchgeometricgraphneuralnetworksintoccodeforfastinference AT vanberkumstefan rootfeatureforparsingpytorchgeometricgraphneuralnetworksintoccodeforfastinference |