Live data from Hacker News

Rust running on every GPU

rust-gpu.github.io

201–210 of 211 posts

Re: Rust running on every GPU

#201
post #130

Earlier quoted context omitted.

Hell will freeze over, then go into negative Kelvin temperatures before you see nVidia agreeing in earnest to do so. They make too much money on NOT GETTING COMMODITIZED. nVidia even changed CUDA to make API not compatible with interpreters. It's the same reason Safari is in such a sorry state. Why make web browser better, when it could cannibalize your app store?

Hmm. Maybe the opportunity would be more like AMD, Intel, and the various AI labs and big tech get together, and by their powers combined figure out a way to stop giving NVIDIA their margin?

They tried. OpenCL, OpenMP

Re: Rust running on every GPU

#202
post #198
post #181

Earlier quoted context omitted.

By making Web browser "better" do you mean more ChromeOS like? CUDA is great for Python as well. Maybe Intel and AMD should actually produce something worthwhile using.

> By making Web browser "better" do you mean more ChromeOS like? Whichever part makes Safari completely fail at properly rendering Jira. A task even Firefox can do.

> Whichever part makes Safari completely fail at properly rendering Jira

What evidence do you have that this is Safari’s fault and not Jira’s fault?

Give me a web browser and I will write code that will fail in it and work in other browsers.

Re: Rust running on every GPU

#203
post #181

Earlier quoted context omitted.

By making Web browser "better" do you mean more ChromeOS like? CUDA is great for Python as well. Maybe Intel and AMD should actually produce something worthwhile using.

Better for running web apps.

As long as they are using Web standards, and not Chrome APIs, I do agree.

Re: Rust running on every GPU

#204

Certainly impressive that this is possible! However, for my use cases (running on arbitrary client hardware) I generally distrust any abstractions over the GPU api, as the entire point is to leverage the low level details of the gpu. Treating those details as a nuisance leads to bugs and performance loss, because each target is meaningfully different. To overcome this, a similar system should be brought forward by th…

If only everyone could have agreed upon spir-v

Re: Rust running on every GPU

#205

This is a little crude still, but the fact that this is even possible is mind blowing. This has the potential, if progress continues, to break the vendor-locked nightmare that is GPU software and open up the space to real competition between hardware vendors. Imagine a world where machine learning models are written in Rust and can run on both Nvidia and AMD. To get max performance you likely have to break the abstra…

Do you really need to break the abstraction? Current scenario where SPIR-V is let's say compiled by Mesa into NIR and then NIR is compiled into GPU specific machine code works pretty well, where optimizations can happen on different phases of compilation.

Re: Rust running on every GPU

#206

Earlier quoted context omitted.

> Is the "Rust -> WebGPU -> SPIR-V -> MSL -> Metal" pipeline robust when it come to performance? It's basically the same concept as Apple's Clang optimizations, but for the GPU. SPIR-V is an IR just like the one in LLVM, which can be used for system-specific optimization. In theory, you can keep the one codebase to target any number of supported raster GPUs. The Julia -> Metal stack is comparatively not very portable…

> The Julia -> Metal stack is comparatively not very portable You can do "Julia -> KernelAbstractions.jl -> Metal", "Julia -> KernelAbstractions.jl -> CUDA", etc. if you need portability. This is already used by some of the numerical libraries in the ecosystem.

Sure, you could do that for any language/SDK if you're patient enough. You could scrap the abstraction layer altogether and litter the whole thing with ifdefs if you're really lazy.

We're definitely going to see people using higher-level libraries to abstract all this away in the future though. We knew this was going to happen a decade ago, so it's been frustrating watching GPU standards fragment while featureset demands consolidate. Nowadays there is basically no upside to writing a raster program with native GPU libraries when you could target a higher-level standard with oftentimes better performance.

Re: Rust running on every GPU

#207

Earlier quoted context omitted.

Complexity is not inherently bad. Browsers are more or less exactly as complex as they need to be in order to allow users to browse the web with modern features while remaining competitive with other browsers. This is Tesler's Law [0] at work. If you want to fully abstract away GPU compilation, it probably won't get dramatically simpler than this project. [0]: https://en.wikipedia.org/wiki/Law_of_conservation_of_comp…

I swear, if I had 2c for every supposed "law", I would be a millionaire now. Slogans make no law, but programmers sure love "naming things." In all fairness, the obsessive elevating of good-sounding slogans into colloquial "laws" is a uniquely American phenomenon. My pet-theory is that this goes back to old days when computer science wasn't considered a "real" science. That is, in "real" sciences there are laws, so t…

Okay sure, but Larry Tesler was a real one, and whatever you want to call it, his observation is spot-on.

If I had 2c for every time I've seen a "Senior" dev push the complexity around on their plate like it's spinach, I'd be a millionaire with you.

Re: Rust running on every GPU

#208

Certainly impressive that this is possible! However, for my use cases (running on arbitrary client hardware) I generally distrust any abstractions over the GPU api, as the entire point is to leverage the low level details of the gpu. Treating those details as a nuisance leads to bugs and performance loss, because each target is meaningfully different. To overcome this, a similar system should be brought forward by th…

Rust is a system language, so you should have the control you need. We intend to bring GPU details and APIs into the language and core / std lib, and expose GPU and driver stuff to the `cfg()` system. (Author here)

I wish I could say that my lack of understanding the contents of this article was just ignorance but unfortunately it makes my brain want to explode. There is a back ended compliment in there somewhere. What I mean is you're a smart mofo.

Re: Rust running on every GPU

#210
post #174

Earlier quoted context omitted.

Rust is a system language, so you should have the control you need. We intend to bring GPU details and APIs into the language and core / std lib, and expose GPU and driver stuff to the `cfg()` system. (Author here)

Do you get any interest from big players like AMD? I'm surprised that they didn't start such initiative, but I guess they can as well back yours.

I have not, it is easy to get in touch with me though.
Post reply on HN