Leveraging AI to Modernize Computational Mechanics Codes: Transitioning Pocket Tensor to Kokkos for GPU Acceleration
Please login to view abstract download link
Machine learning (ML) models are increasingly being integrated into computational mechanics codes to enhance predictive capabilities and improve computational efficiency. In this work, we present advancements in embedding ML models within SIERRA/Solid Mechanics [1], a high-performance finite element analysis code developed at Sandia National Laboratories. SIERRA uses a modified version of the legacy C++ library Pocket Tensor [2] for tensor operations. To ensure long-term maintainability and leverage modern hardware architectures, we are transitioning the tensor operations to GPU acceleration using Kokkos [3], a portable performance programming model. This transition involves re-engineering the ML model integration to utilize Kokkos for efficient parallel execution across diverse hardware platforms, including GPUs. By leveraging Kokkos, we aim to achieve portability and scalability while maintaining compatibility with SIERRA’s existing infrastructure. Throughout this process, we utilized LLMs as a collaborative tool to assist in refactoring the legacy code, providing valuable insights and accelerating the development cycle. This presentation will focus on the lessons learned during the transition, including challenges encountered in modernizing legacy code, strategies for effective use of AI tools in software development, and insights into achieving portability and maintainability in high-performance computing applications. These experiences highlight the potential of AI-assisted workflows to streamline complex code migration efforts and drive innovation in computational mechanics. REFERENCES [1] S. T. Miller, F. Beckwith, M. R. Buche, et al., "Sierra/Solid Mechanics 5.16 User's Guide," 2023. [Online]. Available: https://doi.org/10.2172/2430358. [2] G. Valiente, "Pocket Tensor," GitHub repository. [Online]. Available: https://github.com/GValiente/pocket-tensor. [3] C. R. Trott, et al., Kokkos 3: Programming model extensions for the exascale era, IEEE Transactions on Parallel and Distributed Systems 33 (4) (2021) 805–817. Sandia National Laboratories is a multimission laboratory managed and operated by National Technology & Engineering Solutions of Sandia, LLC, a wholly owned subsidiary of Honeywell International Inc., for the U.S. Department of Energy’s National Nuclear Security Administration under contract DE-NA0003525. SAND2026-15809A
