News for hackers. Stuff that matters.
Re:Rust on Every GPU by Voultapher on Saturday July 26, 2025 @08:42AM (#44693697)
Who is we here? I'm curious to hear more about your ambitions here, since surly pulling in wgpu or something similar seems out-of-scope for the traditionally lean Rust stdlib.
Re:Rust on Every GPU by LegNeato on Saturday July 26, 2025 @09:01AM (#44693784)
Many of us working on Rust + GPUs in various projects have discussed starting a GPU working group to explore some of these questions:

https://gist.github.com/LegNeato/a1fb3e3a9795af05f22920709d9...

Agreed, I don't think we'd ever pull in things like wgpu, but we might create APIs or traits wgpu could use to improve perf/safety/ergonomics/interoperability.

Re:Rust on Every GPU by junon on Saturday July 26, 2025 @11:58AM (#44695046)
I'm surprised there isn't already a Rust GPU WG. That'd be incredible.
Re:Rust on Every GPU by Voultapher on Saturday July 26, 2025 @12:25PM (#44695229)
Cool, looking forward to that. It's certainly a good fit for the Rust story overall, given the increasingly heterogenous nature of systems.
Re:Rust on Every GPU by jpc0 on Saturday July 26, 2025 @02:00PM (#44695881)
Hears an idea,

Get Nvidia, AMD, Intel and whoever else you can get into a room. Get LLVMs boys into the same room.

Compile LLVMIR directly into hardware instructions fed into the GPU, get them to open up.

Having to target an API is part of the problem, get them to allow you to write Rust that directly compiles into the code that will run on the GPU, not something that becomes something else, that becomes spirv that controls a driver that will eventually run on the GPU.

Re:Rust on Every GPU by bobajeff on Saturday July 26, 2025 @02:52PM (#44696209)
Re:Rust on Every GPU by jpc0 on Saturday July 26, 2025 @03:41PM (#44696465)
Very likely something along those lines.

Effectively standardise passing operations off to a coprocessor. C++ is moving into that direction with stdexec and the linear algebra library and SIMD.

I don’t see why Rust wouldn’t also do that.

Effectively why must I write a GPU kernel to have an algorithm execute on the GPU, we’re talking about memory wrangling and linear algebra almost all of the time when dealing with GPU in any way whatsoever. I don’t see why we need a different interface and API layer for that.

OpenGL et al abstract some of the linear algebra away from you which is nice until you need to give a damn about the assumptions they made that are no longer valid. I would rather that code be in a library in the language of your choice that you can inspect and understand than hidden somewhere in a driver behind 3 layers of abstraction.

Re:Rust on Every GPU by bobajeff on Saturday July 26, 2025 @04:47PM (#44696814)
>I would rather that code be in a library in the language of your choice that you can inspect and understand than hidden somewhere in a driver behind 3 layers of abstraction.

I agree that, that would be ideal. Hopefully, that can happen one day with c++, rust and other languages. So far Mojo seems to be the only language close to that vision.

Re:Rust on Every GPU by pjmlp on Sunday July 27, 2025 @02:20AM (#44699271)
Guess which companies have been driving senders / receivers work.
Re:Rust on Every GPU by trogdc on Saturday July 26, 2025 @07:39PM (#44697779)
These are just wrappers around intrinsics that exist in LLVM already.
Re:Rust on Every GPU by Ygg2 on Saturday July 26, 2025 @02:17PM (#44695981)
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?

Re:Rust on Every GPU by jpc0 on Saturday July 26, 2025 @02:23PM (#44696025)
Somehow I want to believe if you get everyone else in the room, and it becomes enough of a market force that nvidia stops selling GPUs because of it, they will change. Cough linux gpu drivers
Re:Rust on Every GPU by shmerl on Saturday July 26, 2025 @11:21PM (#44698680)
Yeah, Nvidia can get lost with their CUDA moat. But AMD should be interested.
Re:Rust on Every GPU by ashdksnndck on Sunday July 27, 2025 @12:17AM (#44698883)
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?
Re:Rust on Every GPU by __s on Sunday July 27, 2025 @09:52AM (#44701321)
They tried. OpenCL, OpenMP
Re:Rust on Every GPU by pjmlp on Sunday July 27, 2025 @02:23AM (#44699278)
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.

Re:Rust on Every GPU by pawelmurias on Sunday July 27, 2025 @05:32AM (#44700026)
Better for running web apps.
Re:Rust on Every GPU by pjmlp on Sunday July 27, 2025 @12:32PM (#44702477)
As long as they are using Web standards, and not Chrome APIs, I do agree.
Re:Rust on Every GPU by Ygg2 on Sunday July 27, 2025 @09:04AM (#44701048)
> 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.

Re:Rust on Every GPU by ninkendo on Sunday July 27, 2025 @12:23PM (#44702413)
> 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 on Every GPU by mertcikla on Sunday July 27, 2025 @05:48AM (#44700097)
LLVM people have been at it for a while now, they got it working on Nvidia and AMD working on apple I believe: https://www.modular.com/

it baffles me that more people haven't heard about them. it's mighty impressive what they have achieved.