Live data from Hacker News

Nvidia announces native GPU programming in Rust

developer.nvidia.com

301–310 of 334 posts

Re: Nvidia announces native GPU programming in Rust

#302
post #237

Earlier quoted context omitted.

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.

I have never seen a comment this gray

in all of hackernews' shitty UX decisions, gray unreadable comments is one of the worst ones

Re: Nvidia announces native GPU programming in Rust

#304
post #223

Earlier quoted context omitted.

FYI, the world is a lot more decentralized than we think and even during the Dark Ages, guess what, that was happening in Europe and many places in the world were booming scientifically, technologically, etc.

Dark Ages weren't as interconnected by communications and wrapped by the tentacles of transnational corpocracy as modern world, though...

Meh. It's not like we forgot how to make copper wires for landlines. We'll be fine. We'll live more or less like in 1880 or 1920, it's not a horrible life. I do hope we get to keep antibiotics, though.

Re: Nvidia announces native GPU programming in Rust

#305

Earlier quoted context omitted.

I guess you are not from the generation of texters. This how languages work we used to use * as a way to avoid getting censored it over time became a way to curse or give emphasis.

Am I, with around 30, in this generation? Putting * in words seems like self censorship to me. Still, might have a cultural component. German here.

It can be used for in-jokey comedic effect. For example, referring to M*cr*sft W*nd*ws or Br*dc*m as though they were offensive terms. Or *r*cl*.

Re: Nvidia announces native GPU programming in Rust

#306

Earlier quoted context omitted.

I was learning Rust slowly when the LLM enabled coding became good enough. I switched from learning to full on building with Rust. I still learn high level concepts as needed but I will not be able to write Rust on my own at all. And that sounds scary but the way I got over the fear is by realizing there are many things that I do very well but I do not know their internals very well. Driving is an example. I barely u…

There are two types of programmers: the pragmatists who see programming as a chore and would gladly never write a line of code again given the right tools, and the gardeners who don't want their enjoyable and rewarding garden-tending work taken away from them.

> pragmatists

Which is a collective term for transactionalists, short-termists and profit-seekers of all kinds in this case.

Re: Nvidia announces native GPU programming in Rust

#307

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, Yes, I also prefer doing it that way, but in Cuda with the driver API. Allows you to handle kernels like shaders, including editing and hot-reloading at runtime. The reason I'm sticking with CUDA is because it's by far the most convenient API to use, w…

> The reason I'm sticking with CUDA is because it's by far the most convenient API to use, without nonsense like 50-liners to alloc memory or the need to manage descriptors, bindings, queue families, etc.

I was there when the OpenCL committee was deciding on that sort of stuff.

As I recall, and it's been two decades and a lot of sleepless nights since then, there was real pushback at the time against OpenGL-style default bindings. So folks didn't want to establish an implicit command queue or any other default objects attached to other objects. Part of it is because OpenGL was perceived as clumsy and passé, some of it was because it is not friendly to multi-threaded applications.

Those first meetings were a shitshow full of tension, implicit threats from Apple, and backroom deals. Kudos to Neil Trevett for chairing the group; I I bet it wasn't fun for him either.

Re: Nvidia announces native GPU programming in Rust

#308
post #48

Earlier quoted context omitted.

If the sole motivation for learning things are payoff, then sure.

the sole motivation is feeding and sheltering my family. in the time BC (before Clankers), rust was a better way to do that.

> in the time BC (before Clankers)

Nice one!

Which year shall we count as 1 AD (Anno Delirii (or should it be Darii))?

Re: Nvidia announces native GPU programming in Rust

#309
post #282

Earlier quoted context omitted.

Win32 is the most stable abi on the Linux desktop.

Dead wrong. Win32 (externally) only seems stable, but internally it changes between Windows releases. Win7 syscalls are completely different from Win11 syscalls, meaning if I want to release a binary _without relying_ on Win32 I need to provide full syscall mappings _for each and every Windows version_. This doesn't happen on Linux.

>> Win32 is the most stable abi on the Linux desktop.

> Dead wrong [...] if I want to release a binary _without relying_ on Win32

Then you are not using the Win32 ABI, are you?

Re: Nvidia announces native GPU programming in Rust

#310

Earlier quoted context omitted.

That's a nice way of saying that it's a dependency clusterfuck. I've never understood why we can't just expose the GPU ISA directly the way the CPU does. It's all getting compiled down at the end of the day so someone has to write a compiler for it either way. We'd be substantially better off IMO if it was all built directly into LLVM and then let middleware sort out the details.

If i'm not mistaken, this already exists, and the assembly language here is called PTX https://llvm.org/docs/NVPTXUsage.html

PTX is a bytecode format, the CUDA driver JIT compiles it when uploading into the cards.
Post reply on HN