AMD Working To 'Push Rust Deep into the GPU Stack' (phoronix.com)
- Reference: 0185486118
- News link: https://developers.slashdot.org/story/26/09/07/086221/amd-working-to-push-rust-deep-into-the-gpu-stack
- Source link: https://www.phoronix.com/news/AMD-Rust-Deep-Into-GPU-Stack
> AMD is building out what they are describing as an "elite" team of developers for driving Rust code "deep into the GPU stack" from firmware to drivers, shader compilers, and other GPU software in Rust. AMD Senior Fellow Harsh Meno [2]posted this week to LinkedIn about this new effort...
>
> And note [3]this AMD job posting that's active for hiring a software development engineer to work on Rust code...
>
> "We are building next-generation systems software for AMD GPUs with Rust as a core technical direction. The work spans compilers, runtimes, low-level GPU software, firmware, developer tooling, and methods for improving the safety and correctness of complex hardware-software systems.
>
> "Rust is not incidental to this role. You will help establish how Rust is used in performance-sensitive and high-trust parts of the GPU stack, including the compiler and tooling support, system interfaces, engineering practices, and validation methods required for production deployment. You will have the opportunity to influence both near-term implementations and the longer-term architecture for using Rust across current and future AMD platforms."
"AMD also isn't alone," the article points out, "as NVIDIA has also been pursuing similar Rust-based initiatives for their GPU software too, including the development of the Nova Linux kernel driver written in Rust."
[1] https://www.phoronix.com/news/AMD-Rust-Deep-Into-GPU-Stack
[2] https://www.linkedin.com/feed/update/urn:li:activity:7498974645694586880/
[3] https://careers.amd.com/careers-home/jobs/89874?lang=en-us
Artificial Intelligence (Score:2)
How does AI do with Rust? It seems like most of the AI generated code is in HTML, Typescript, and Python. Is it capable of advanced work in Rust?
Re: (Score:3)
LLMs focusing on code generation can generate code in nearly any language.
I for example use them sometimes for the initial "frame" of Dart/Flutter languages.
I worked a while with an unknown LLM (unknown, as it was a research project and the LLMs involved did not disclose their names), that LLM claimed it only needs to see the grammar or examples of a private language I use.
As I never bothered to write a formal grammar for it, I gave it a few thousand lines of code. Then it started asking a few questions, an
Re:Artificial Intelligence (Score:4, Informative)
I understand. It's true most AIs can generate code in virtually any language. But, my experience has been that the code quality drops precipitously if the language is not one of the ones I've mentioned and as the code base grows.
SQL is great. C and C# not so great. Powershell, surprisingly bad after about 50 or more lines.
Re: (Score:2)
python and js is great. I think rust is fine, because the language has some hard rules, which are easy to follow and in case the AI does not follow them the compiler gives a hard error. AIs can iterate quite well on hard errors, the weakness is subtle mistakes that can't be caught by compilers, linters, etc.
Re: (Score:2)
The Web page for Lox mentions Scheme. One of the List-like descendants of Scheme is [1]Racket [racket-lang.org], which has some features intended to facilitate making new languages. Racket also replaces data types with a "contract" system. For anyone who might be interested.
[1] https://racket-lang.org/
Re: (Score:2)
We have used LLM's to generate a lot of Rust very successfully. I would rather trust AI generating Rust than almost any other language because the Rust compiler is so fussy about types and object lifetimes that it gives the LLM far less opportunity to sneaky silly, hard to find, errors in. Also Rust's error messages are very comprehensive and helpful, which LLM's make good use of.
no choice (Score:1)
I guess if you can't get talented and gifted developers you have no choice.
I hope they don't expect Rust to do magic (Score:3)
While AMD's efforts regarding the "amdgpu"-driver appear laudable, the one thing I spotted time and again when issues arose with that driver are crazy back-and-forth iterations of changing constants and similar trivial things because, apparently, the developers have too little, too imprecise, too volatile documentation at hand of what the hardware actually does. The management of voltages and clock frequencies alone has changed so many times already, often just replacing one problem with another... and no change in programming language can possibly fix this.
Also, ROCm certainly is not in its pitiful state just because "the wrong programming language was used".
Re:I hope they don't expect Rust to do magic (Score:4, Insightful)
This is an incredibly frustrating time to try to use a GPU in general. On Windows, both drivers are shit. On Linux, the closed source drivers are all shit, but the AMD OSS driver is pretty good. And despite this, AMD won't open the floodgates and give away enough information to actually make it as good as it could be. They have absolute proof that they cannot do as well as the community, but they absolutely refuse to let the data flow. And yet, they are still multiple times as helpful as Nvidia.
Re: (Score:2)
> They have absolute proof that they cannot do as well as the community, but they absolutely refuse to let the data flow.
I really wonder what they think they are hiding.
Re: I hope they don't expect Rust to do magic (Score:1)
Probably NSA backdoors that were introduced at a time when there was no OSS driver available that they have to now maintain secrecy on or risk massive fines and prison terms (national security letters, if you are not familiar).
The latest New Shiny Bandwagon ... (Score:2)
... has the full orchestra on it it seems. Reminds me of when every webdev was extolling the virtues of Ruby to whoever would listen. How often do you see any mention of it now?
Wtf is the point of Rust at the to-the-metal level when by definition most of what you do will be unsafe memory wise? Seems to me like some Rust shills have been evangelising to devs still at the age where they can't differentiate marketing BS from fact.
Re: (Score:2)
Not a Rust / GPU dev but what I got from some articles is it greatly reduces the surface area in which memory safety bugs can live, since only the to-the-metal areas are in unsafe blocks, plus Rust gives you synchronization support to avoid race conditions. The drawback is compile time and missing the newest parts of the ecosystem. Asahi Linux' Rust based Apple GPU driver has only 3% unsafe code so a lot less code can go wrong.
[1]https://www.reddit.com/r/rust/... [reddit.com]
[1] https://www.reddit.com/r/rust/comments/xwdhwd/asahi_lina_on_her_experience_writing_a_driver_in/
Re: (Score:2)
> Reminds me of when every webdev was extolling the virtues of Ruby to whoever would listen.
Ruby on Rails is the best dynamically typed language available for Webdev. Python has more developers, so if you build on RoR, you might need to train some people. If you want a statically typed language for webdev (usually better on very large projects), C# as a language is great, but the ecosystem around Java is better.
> Wtf is the point of Rust at the to-the-metal level when by definition most of what you do will be unsafe memory wise?
Rust is useful when you have to work with incompetent programmers, which is most of them these days, especially those who write kernel drivers. If you encapsulate the driver accesses in fun
Rust is FAST. Ruby is slow (Score:3)
> ... has the full orchestra on it it seems. Reminds me of when every webdev was extolling the virtues of Ruby to whoever would listen. How often do you see any mention of it now?
> Wtf is the point of Rust at the to-the-metal level when by definition most of what you do will be unsafe memory wise? Seems to me like some Rust shills have been evangelising to devs still at the age where they can't differentiate marketing BS from fact.
WTAF Dude? Have you been so burnt by the past that you can't see when the industry does something right for a change? Rust gives nearly indistinguishable performance from C with memory safety and nearly equal efficiency. Isn't that what greybeards have been clamoring for since Java arrived (PSA: Java is nearly as fast as C for long running processes, like servers, but a HOG for RAM)? While I am too new at it to find rust intuitive or pleasant (I still understand C more), you can't argue with the result
Sure (Score:1)
If they are so "elite" why do they need a language like Rust to hold their hands?
Trust? (Score:3)
> ” Rust is not incidental to this role. You will help establish how Rust is used in performance-sensitive and high-trust parts of the GPU stack, including the compiler and tooling support, system interfaces, engineering practices, and validation methods required for production deployment. You will have the opportunity to influence both near-term implementations and the longer-term architecture for using Rust across current and future AMD platforms.”
Who is going to use Rust in a trusted compute environment? Rust isn't trustworthy, it has no mechanism for independent validation or verification using cross compilation from multiple toolchains. Rust is often regarded as being “memory safe”, which it absolutely is not, since it has an “unsafe” keyword. You can't have an “unsafe” keyword and at the same time claim you're safe. Even without the unsafe keyword, you can still corrupt memory, which effectively makes all the trans-furry-handwaving ride or die, Rust religion devotion, pretty much on par with every other religion (See Lunduke for that reference).
Why are they really using Rust? The spec for the language isn't finished, the tooling isn't finished, and it failed to meet the claims the evangelists scream about. At this point, you're picking Rust just for the handwaving and virtue signalling, it's not an engineering decision, no engineer worth the most basic qualification, would ever pick Rust, the joke has been over for a while.
Isn't rust bad for computers though? (Score:1)
If they put rust in the GPU surely that will inhibit performance...all that oxidized metal, can't be good for electrical conduction.
Re: (Score:2)
Well technically speaking rust conducts reasonably well (much less than iron of course), but one of the problem is that rust is larger than iron. It pushes apart the material, creates tears, and that is what reduces conductivity.
History will remember 2026 (Score:2)
... as the year that the attack of the robots was stopped by rust.