Live data from Hacker News

Nvidia announces native GPU programming in Rust

developer.nvidia.com

11–20 of 321 posts

Re: Nvidia announces native GPU programming in Rust

#11
post #9

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!

LLM don't need to be trained in a library to use it well. It's just Rust which they know well.

Re: Nvidia announces native GPU programming in Rust

#12
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.

Re: Nvidia announces native GPU programming in Rust

#13
post #5

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

Nobody cares if kernels are written in Rust. Kernels were meant to be written in C, but if you want to go more high-level try Triton or a similar DSL that nicely abstract tile sizes etc.

Re: Nvidia announces native GPU programming in Rust

#14

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, e…

Is this satire? D3D12 and Metal aren't any less proprietary than CUDA.

Re: Nvidia announces native GPU programming in Rust

#17

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, e…

> 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

Isn't that how CUDA code is normally written?

Re: Nvidia announces native GPU programming in Rust

#18

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, e…

You could also use Mojo, one language for all targets.

Re: Nvidia announces native GPU programming in Rust

#19

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, e…

You could also use Mojo, one language for all targets.

I began to lose interest after the acquisition. Have you been following along, are they still going to open source it?

Re: Nvidia announces native GPU programming in Rust

#20
post #9

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!

And what prevent you exactly ?

There were humans far superior than you for writting Rust before LLM, now there's a LLM. The only difference is price and time execution.

You get an awesome teacher (LLM) ready to answer all your questions about Rust.

And you still find excuses not to learn it ?

At some point, just realize you've been lazy to learn it and LLMs are just an excuse.

Post reply on HN