Proof-of-Concept – Implementing the Kokkos model in Rust⌗
Demonstrating model advantages using a Rust implementation – GitHub – Report
Context⌗
This research project focuses on High Performance Computing (HPC) programming challenges, particularly the issue of code portability across diverse hardware architectures. It explores the possibility of implementing the Kokkos programming model, which provides abstractions over parallelization tools and data management, in the Rust programming language. This approach aims to combine Kokkos’ performance portability with Rust’s built-in features, such as memory-safety.
Illustrated Principles⌗
-
Performance Portability: The project demonstrates how different memory layouts affect performance in matrix multiplication operations, highlighting the importance of Kokkos’ abstractions.
-
Cache Efficiency: Benchmarks show how proper memory layout can significantly reduce cache misses, leading to performance improvements.
-
Language Compatibility: The research explores the feasibility of implementing a model that relies on modern C++ concepts (like templates) in a language with no proper equivalent.
-
Hardware Interaction: Benchmarks illustrate how software design choices interact with hardware characteristics, such as cache sizes and core counts.
Conclusions Reached⌗
-
Viability: The Kokkos programming model is generally compatible with Rust, benefiting from Rust’s ownership system and enum structures.
-
Performance: While the Rust implementation currently lags behind the C++ version in some benchmarks, the performance gap narrows for computationally intensive tasks. With optimization, similar performance levels might be achievable.
-
Limitations: The current lack of native GPGPU support in Rust limits the portability that a Rust-based Kokkos implementation could offer.
-
Future Directions: The research suggests several paths forward, including further development of the Proof-of-Concept, exploring interoperability with the C++ Kokkos library, and investigating hybrid tools for GPU support.
-
Language Evolution: Ongoing developments in the Rust language, such as the stabilization of certain features, could significantly benefit a full Kokkos-rs implementation.
Overall, the research demonstrates the potential for implementing HPC programming models in Rust while highlighting current limitations and areas for future work.