Live data from Hacker News

Nvidia announces native GPU programming in Rust

developer.nvidia.com

21–30 of 334 posts

Re: Nvidia announces native GPU programming in Rust

#21

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.

[deleted]

Re: Nvidia announces native GPU programming in Rust

#23

Earlier quoted context omitted.

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?

I thought they already did and released the compiler source code under Apache 2.0.

Re: Nvidia announces native GPU programming in Rust

#25

Earlier quoted context omitted.

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?

The Mojo compiler has been open source for over a month now.

And the Mojo standard library has been open source for over a year.

It’s all open source. Go check it out!

Re: Nvidia announces native GPU programming in Rust

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

[deleted]

Re: Nvidia announces native GPU programming in Rust

#27
post #6

> The launch is checked rather than trusted. Damn even Nvidia is putting out fully Claude-written articles.

That's actually a magnificent observation. This is not only an indication of a keen eye, but a trained brilliant mind as well.

You’re absolutely right!

Re: Nvidia announces native GPU programming in Rust

#28

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…

> Once you have allowed that proprietary cr*p into your C++ codebase

People have been doing that all the time for every kind of codebase. It's just part of the business. I don't see how it's worth having any emotions or opinions about it. Seems like you are wasting your energy.

Are win32 APIs proprietary? So you decide to use them, use a wrapper/UI framework, or don't develop for Windows. Easy choice.

Developing for embedded devices? So you read the manufacturers manual and implement based on the spec, use some sort of HAL if they are available, or you don't have a job. Even simpler.

Re: Nvidia announces native GPU programming in Rust

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

oh no no no, this is going to break the CPP hold on AI and game dev.
Post reply on HN