From 1613bf6804143e69f72bcd0383f20773bff52fc6 Mon Sep 17 00:00:00 2001 From: Sanjiban Sengupta Date: Tue, 11 Feb 2025 13:13:40 +0100 Subject: [PATCH 1/2] feat: Add TMVA SOFIE GPU Project --- .../2025/proposal_TMVA-SOFIE-GPU.md | 42 +++++++++++++++++++ gsoc/2025/mentors.md | 2 + 2 files changed, 44 insertions(+) create mode 100644 _gsocproposals/2025/proposal_TMVA-SOFIE-GPU.md diff --git a/_gsocproposals/2025/proposal_TMVA-SOFIE-GPU.md b/_gsocproposals/2025/proposal_TMVA-SOFIE-GPU.md new file mode 100644 index 000000000..2da204ecd --- /dev/null +++ b/_gsocproposals/2025/proposal_TMVA-SOFIE-GPU.md @@ -0,0 +1,42 @@ +--- +title: TMVA SOFIE - GPU Support for Machine Learning Inference +layout: gsoc_proposal +project: ROOT +year: 2025 +organization: CERN +difficulty: medium +duration: 350 +mentor_avail: June-October +--- + +# Description +SOFIE (System for Optimized Fast Inference code Emit) is a Machine Learning Inference Engine within TMVA (Toolkit for Multivariate Data Analysis) in ROOT. SOFIE offers a parser capable of converting ML models trained in Keras, PyTorch, or ONNX format into its own Intermediate Representation, and generates C++ functions that can be easily invoked for fast inference of trained neural networks. The parsed models produce C++ header files that can be seamlessly included and used in a 'plug-and-go' style. + +SOFIE currently supports various Machine Learning operators defined by the ONNX standards, as well as a Graph Neural Network (GNN) implementation. It supports the parsing and inference of Graph Neural Networks trained using DeepMind Graph Nets. + +As SOFIE continues to evolve, there's a need to enable inference on GPUs. This project aims to explore different GPU stacks (such as CUDA, ROCm, ALPAKA) and implement GPU-based inference functionalities in SOFIE. There is already a SYCL implementation for SOFIE, developed in 2023, which can serve as a reference for future development. + +## Task ideas +In this project, the contributor will gain experience with GPU programming and its role in Machine Learning inference. They will start by understanding SOFIE and running inference on CPUs. After researching GPU stacks and methods of their integration with SOFIE, the contributor will implement GPU support for inference, ensuring the code is efficient and well-integrated with GPU technologies. + +## Expected results and milestones + * **Familiarization with TMVA SOFIE**: Understanding the SOFIE architecture, working with its internals, and running inference on CPUs. + * **Research and Evaluation**: Analyzing various GPU stacks (CUDA, ROCm, ALPAKA, etc.) and determining their alignment with SOFIE. + * **Implementation of GPU Inference**: Developing functionalities for GPU-based inference in SOFIE. + * **[Optional] Benchmarking**: Evaluating the performance of the new GPU functionality by benchmarking memory usage, execution time, and comparing results with other frameworks (such as TensorFlow or PyTorch). + +## Requirements + * Proficiency in C++ and Python. + * Basic knowledge of GPU programming (e.g., CUDA). + * Familiarity with version control systems like Git/GitHub. + +## Mentors + * **[Lorenzo Moneta](mailto:lorenzo.moneta@cern.ch)** + * [Sanjiban Sengupta](mailto:sanjiban.sengupta@cern.ch) + +## Links + * [ROOT Project homepage](https://root.cern/) + * [ROOT Project repository](https://github.com/root-project/root) + * [SOFIE Repository](https://github.com/root-project/root/tree/master/tmva/sofie) + * [Implementation of SOFIE-SYCL](https://github.com/root-project/root/pull/13550/) + * [Accelerating Machine Learning Inference on GPUs with SYCL](https://dl.acm.org/doi/10.1145/3648115.3648123) diff --git a/gsoc/2025/mentors.md b/gsoc/2025/mentors.md index ef2d3d673..4c1306661 100644 --- a/gsoc/2025/mentors.md +++ b/gsoc/2025/mentors.md @@ -19,9 +19,11 @@ layout: plain * David Lange [david.lange@cern.ch](mailto:david.lange@cern.ch) CompRes * Serguei Linev [S.Linev@gsi.de](mailto:S.Linev@gsi.de) GSI * Peter McKeown [peter.mckeown@cern.ch](mailto:peter.mckeown@cern.ch) CERN +* Lorenzo Moneta [lorenzo.moneta@cern.ch](mailto:lorenzo.moneta@cern.ch) CERN * Felice Pantaleo [felice.pantaleo@cern.ch](mailto:felice.pantaleo@cern.ch) CERN * Giacomo Parolini [giacomo.parolini@cern.ch](mailto:giacomo.parolini@cern.ch) CERN * Alexander Penev [alexander.p.penev@gmail.com](mailto:alexander.p.penev@gmail.com) CompRes/University of Plovdiv, BG +* Sanjiban Sengupta [sanjiban.sengupta@cern.ch](mailto:sanjiban.sengupta@cern.ch) CERN * Mayank Sharma [mayank.sharma@cern.ch](mailto:mayank.sharma@cern.ch) UMich * Simon Spannagel [simon.spannagel@desy.de](mailto:simon.spannagel@desy.de) DESY * Graeme Stewart [graeme.andrew.stewart@cern.ch](mailto:graeme.andrew.stewart@cern.ch) CERN From 8a70a4773d462a94b8843b6d5b052e87ec970e83 Mon Sep 17 00:00:00 2001 From: Sanjiban Sengupta Date: Tue, 11 Feb 2025 16:50:44 +0100 Subject: [PATCH 2/2] feat: Add project on hls4ml integration in SOFIE --- .../2025/proposal_TMVA-SOFIE-GPU.md | 6 +-- .../2025/proposal_TMVA-SOFIE-HLS4ML.md | 41 +++++++++++++++++++ gsoc/2025/mentors.md | 2 +- 3 files changed, 45 insertions(+), 4 deletions(-) create mode 100644 _gsocproposals/2025/proposal_TMVA-SOFIE-HLS4ML.md diff --git a/_gsocproposals/2025/proposal_TMVA-SOFIE-GPU.md b/_gsocproposals/2025/proposal_TMVA-SOFIE-GPU.md index 2da204ecd..ad209b85c 100644 --- a/_gsocproposals/2025/proposal_TMVA-SOFIE-GPU.md +++ b/_gsocproposals/2025/proposal_TMVA-SOFIE-GPU.md @@ -6,11 +6,11 @@ year: 2025 organization: CERN difficulty: medium duration: 350 -mentor_avail: June-October +mentor_avail: Flexible --- # Description -SOFIE (System for Optimized Fast Inference code Emit) is a Machine Learning Inference Engine within TMVA (Toolkit for Multivariate Data Analysis) in ROOT. SOFIE offers a parser capable of converting ML models trained in Keras, PyTorch, or ONNX format into its own Intermediate Representation, and generates C++ functions that can be easily invoked for fast inference of trained neural networks. The parsed models produce C++ header files that can be seamlessly included and used in a 'plug-and-go' style. +SOFIE (System for Optimized Fast Inference code Emit) is a Machine Learning Inference Engine within TMVA (Toolkit for Multivariate Data Analysis) in ROOT. SOFIE offers a parser capable of converting ML models trained in Keras, PyTorch, or ONNX format into its own Intermediate Representation, and generates C++ functions that can be easily invoked for fast inference of trained neural networks. Using the IR, SOFIE can produce C++ header files that can be seamlessly included and used in a 'plug-and-go' style. SOFIE currently supports various Machine Learning operators defined by the ONNX standards, as well as a Graph Neural Network (GNN) implementation. It supports the parsing and inference of Graph Neural Networks trained using DeepMind Graph Nets. @@ -27,7 +27,7 @@ In this project, the contributor will gain experience with GPU programming and i ## Requirements * Proficiency in C++ and Python. - * Basic knowledge of GPU programming (e.g., CUDA). + * Knowledge of GPU programming (e.g., CUDA). * Familiarity with version control systems like Git/GitHub. ## Mentors diff --git a/_gsocproposals/2025/proposal_TMVA-SOFIE-HLS4ML.md b/_gsocproposals/2025/proposal_TMVA-SOFIE-HLS4ML.md new file mode 100644 index 000000000..1a231d09d --- /dev/null +++ b/_gsocproposals/2025/proposal_TMVA-SOFIE-HLS4ML.md @@ -0,0 +1,41 @@ +--- +title: TMVA SOFIE - HLS4ML Integration for Machine Learning Inference +layout: gsoc_proposal +project: ROOT +year: 2025 +organization: CERN +difficulty: medium +duration: 350 +mentor_avail: Flexible +--- + +# Description +SOFIE (System for Optimized Fast Inference code Emit) is a Machine Learning Inference Engine within TMVA (Toolkit for Multivariate Data Analysis) in ROOT. SOFIE offers a parser capable of converting ML models trained in Keras, PyTorch, or ONNX format into its own Intermediate Representation, and generates C++ functions that can be easily invoked for fast inference of trained neural networks. Using the IR, SOFIE can produce C++ header files that can be seamlessly included and used in a 'plug-and-go' style. + +Currently, SOFIE supports various machine learning operators defined by ONNX standards, as well as a Graph Neural Network implementation. It supports parsing and inference of Graph Neural Networks trained using DeepMind Graph Nets. + +As SOFIE evolves, there is a growing need for inference capabilities on models trained across a variety of frameworks. This project will focus on integrating hls4ml in SOFIE, thereby enabling generation of C++ inference functions on models parsed by hls4ml. + +## Task ideas +In this project, the contributor will gain experience with C++ and Python programming, hls4ml, and their role in machine learning inference. The contributor will start by familiarizing themselves with SOFIE and running inference on CPUs. After researching the possibilities for integration with hls4ml, they will implement functionalities that ensure efficient inference of ML models parsed by hls4ml, which were previously trained in external frameworks like TensorFlow and PyTorch. + +## Expected results and milestones + * **Familiarization with TMVA SOFIE**: Understanding the SOFIE architecture, working with its internals, and running inference on CPUs. + * **Research and Evaluation**: Exploring hls4ml, its support for Keras and PyTorch, and possible integration with SOFIE. + * **Integration with hls4ml**: Developing functionalities for running inference on models parsed by hls4ml. + +## Requirements + * Proficiency in C++ and Python. + * Knowledge of hls4ml + * Familiarity with version control systems like Git/GitHub. + +## Mentors + * **[Lorenzo Moneta](mailto:lorenzo.moneta@cern.ch)** + * [Sanjiban Sengupta](mailto:sanjiban.sengupta@cern.ch) + +## Links + * [ROOT Project homepage](https://root.cern/) + * [ROOT Project repository](https://github.com/root-project/root) + * [SOFIE Repository](https://github.com/root-project/root/tree/master/tmva/sofie) + * [hls4ml documentation](https://fastmachinelearning.org/hls4ml/) + * [hls4ml Repository](https://github.com/fastmachinelearning/hls4ml) diff --git a/gsoc/2025/mentors.md b/gsoc/2025/mentors.md index 4c1306661..65831f60e 100644 --- a/gsoc/2025/mentors.md +++ b/gsoc/2025/mentors.md @@ -23,7 +23,7 @@ layout: plain * Felice Pantaleo [felice.pantaleo@cern.ch](mailto:felice.pantaleo@cern.ch) CERN * Giacomo Parolini [giacomo.parolini@cern.ch](mailto:giacomo.parolini@cern.ch) CERN * Alexander Penev [alexander.p.penev@gmail.com](mailto:alexander.p.penev@gmail.com) CompRes/University of Plovdiv, BG -* Sanjiban Sengupta [sanjiban.sengupta@cern.ch](mailto:sanjiban.sengupta@cern.ch) CERN +* Sanjiban Sengupta [sanjiban.sengupta@cern.ch](mailto:sanjiban.sengupta@cern.ch) CERN/UofManchester * Mayank Sharma [mayank.sharma@cern.ch](mailto:mayank.sharma@cern.ch) UMich * Simon Spannagel [simon.spannagel@desy.de](mailto:simon.spannagel@desy.de) DESY * Graeme Stewart [graeme.andrew.stewart@cern.ch](mailto:graeme.andrew.stewart@cern.ch) CERN