Re:A Proposal Fix for C/C++ Relaxed Atomics in Practice
by one_even_prime on Sunday November 05, 2023 @01:58PM
(#38154370)
Not leaving room for a language below C++ is one of C++ core values. The C++ memory model (and its execution model btw) _is_ a GPU memory model. Some of the major GPU vendors are already able to run standards conforming C++ on their GPUs (e.g. AMD via rocm-stdpar, Intel via the onedpl/algorithm header, and nvidia via their nvc++ compiler). The main reason OOTA and RFUB aren't solved problems in C++, is because the trade-offs of sburf-acyclic are at tension with C++ core values.
Given the importance of GPUs on modern computing systems and the time and effort it has taken C++ to get here, I have a hard time imagining any change to the C++ memory model that would regress this support.
Rust is different: it has a different audience and goals, and it has already painted itself into a design corner that prevents it from properly supporting even modern CPU hardware (e.g. Arm CHERI and RISC-V CHERI with 128-bit and 96-bit pointers). A memory model for Rust that is more restrictive than the C++ memory model and which prevents Rust from natively running on more modern hardware like GPUs, could be a valid point in Rust's design space, if these restrictions were to buy Rust programmers simplicity, productivity, or safety.
Given the importance of GPUs on modern computing systems and the time and effort it has taken C++ to get here, I have a hard time imagining any change to the C++ memory model that would regress this support.
Rust is different: it has a different audience and goals, and it has already painted itself into a design corner that prevents it from properly supporting even modern CPU hardware (e.g. Arm CHERI and RISC-V CHERI with 128-bit and 96-bit pointers). A memory model for Rust that is more restrictive than the C++ memory model and which prevents Rust from natively running on more modern hardware like GPUs, could be a valid point in Rust's design space, if these restrictions were to buy Rust programmers simplicity, productivity, or safety.