logoalt Hacker News

Nvidia announces native GPU programming in Rust

340 pointsby nonmaskableyesterday at 11:15 AM135 commentsview on HN

Comments

jacobgormyesterday at 10:54 PM

I strongly dislike CUDA. Once you have allowed that proprietary cr*p into your C++ codebase, it is very hard to get rid, and you end up with code that is either tied to a single vendor or an #ifdef hell, probably both.

The best way to program GPUs is face up to the reality that they are not the same machine as the CPU, write your kernels in separate files, and launch them manually, like in Metal, OpenCL, and D3D12, etc. These days we even have DSLs like Triton that make kernel writing much more ergonomic than anything you would hope to achieve in Rust.

show 11 replies
dlluyesterday at 10:22 PM

Since NVIDIA owns huggingface now and huggingface has the excellent Candle [1] crate for inference on Rust, this seems like a good step towards nice native Rust kernels.

[1] https://github.com/huggingface/candle

show 1 reply
salsa_catsuptoday at 2:46 AM

Does this mean I can write shaders in Rust for use with WGPU or Vulkan?

winwangtoday at 1:39 AM

Really exciting but it reads like Claude instead of what Nvidia posts have generally been like in the past. I don't need nor want my tech blogs to sound like a young adult novel.

manyatomsyesterday at 11:01 PM

How does this compare to vectorware? (https://www.vectorware.com/blog/)

show 2 replies
evaltokentoday at 1:23 AM

Interesting direction from Nvidia. Anything that makes writing reliable GPU code less painful is definitely a good thing.

nullbiotoday at 1:36 AM

Makes me sad that Go doesn't get love. I feel like Go is perfect for LLMs.

show 1 reply
the__alchemistyesterday at 10:20 PM

I'm looking forward to trying these when they stabilize! I currently use WGPU for graphics, and cudarc for CUDA.

Note: Cuda-oxide is similar to Cudarc's host component, but uses a rust-style kernel dialect. Advantage: Share structs between host and device. Disadvantage: Trading standard Cuda kernels for a new, WIP dialect.

I haven't tried the tile API yet; looking forward to it.

The last time I checked, Cuda Oxide was Linux only, and required Async; these are why I haven't tried it yet.

show 1 reply
Driftbenchtoday at 12:54 AM

Been waiting for something like this. CUDA C++ is a pain; Rust's safety for kernel programming could be a game changer.

LarsDu88yesterday at 10:44 PM

In this age of LLM written everything which has softly killed my motivation for learning Rust somewhat, this has revived my interest if not only for the fact the LLMs haven't yet been trained on this yet!

show 4 replies
claiiryesterday at 10:28 PM

> The launch is checked rather than trusted.

Damn even Nvidia is putting out fully Claude-written articles.

show 14 replies
bt1ayesterday at 11:30 PM

Will it then be possible to query TJunc hotspot temps on linux?

rvzyesterday at 10:31 PM

First of all, this is a pre-1.0 release that requires a nightly Rust compiler (if you choose the SIMT track with cuda-oxide) so that one is going to be unstable software.

Secondly, When an issue occurs with a kernel or you want to write your own custom kernel in Rust, now we need to diagnose if the problem came from either cuda-oxide (SIMT), Rust's side, CUDA or Tile (If you decide to choose the Tile track).

Another dependency into the list and course everything is open source except CUDA itself. So any issue that happens on the CUDA level, you are forced to wait for them to fix it.

nicebyteyesterday at 10:46 PM

what this article tells me is that no one at Nvidia actually cares about this project whatsoever. otherwise, they would have had a person actually write the announcement.

shmerltoday at 12:07 AM

Nvidia only? Typical.

This is more promising: https://github.com/Rust-GPU/rust-gpu/

mococayesterday at 11:33 PM

AI slop article, how can I trust on this?

nonmaskableyesterday at 11:17 AM

[dead]

ReshamJoshiyesterday at 11:43 AM

[dead]

westurneryesterday at 11:43 PM

[dead]

mococayesterday at 11:32 PM

The world is unsafe

show 1 reply
dunlintoday at 12:34 AM

Rust for GPU programming? My CUDA debugging sessions just got a whole lot less painful, hopefully.