Hacker News

Top stories

Live mirror
30 storiesupdated just nowView source snapshot
  1. Nvidia announces native GPU programming in Rust(nvidia.com ↗)
    72comments
  2. Training a 4B model to produce 81% faster query plans than Postgres(rohanbansal.com ↗)
    80comments
  3. Breaking the 1.58-bit Barrier for Ternary LLMs(arxiv.org ↗)
    15comments
  4. Xiaomi Mimo 2.6 live post-training dashboard(xiaomi.com ↗)
    58comments
  5. Backups Aren't Simple(filipovski.net ↗)
    25comments
  6. Small programming tricks(will-keleher.com ↗)
    180comments
  7. OpenSpec – A lightweight and configurable AI spec framework(openspec.dev ↗)
    13comments
  8. The engineering behind the US Strategic Petroleum Reserve(johnjwang.com ↗)
    25comments
  9. Reversing Factorio's RNG(gegell.github.io ↗)
    16comments
  10. Performance Improvements in .NET 11(devblogs.microsoft.com/dotnet ↗)
    31comments
  11. Australia says it could follow Canada in forging deeper ties with EU(independent.co.uk ↗)
    54comments
  12. HarnessTax: How Much Does the Harness Matter for Coding Agents?(harnesstax.github.io ↗)
    3comments
  13. AWS says it can't restore some data from mideast facilities struck by Iran(wsj.com ↗)
    183comments
  14. Reverse-engineered Jev-like model(github.com/vinnylarouge ↗)
    8comments
  15. Japan's book scene is moving from bookstores to libraries(untranslatedjp.substack.com ↗)
    37comments
  16. Show HN: An e-ink frame that hears birds and draws them as 1800s illustrations(github.com/arnegiacomo ↗)
    238comments
  17. How good are frontier models at physics?(arxiv.org ↗)
    36comments
  18. Mistral X Mozilla: Private, Multilingual AI Browsing(mistral.ai ↗)
    186comments
  19. Destroy After Reading: photocopiers,cheap paper and DIY gave metal it's look(truegrittexturesupply.com ↗)
    2comments
  20. Anecdotally, programmers dislike "reduce"(evanhahn.com ↗)
    148comments
  21. Accurate Models of AMD Matrix Cores(arxiv.org ↗)
    7comments
  22. Anatomy of a Texture(agentlien.github.io ↗)
    12comments
  23. Why Does the Universe Expand?(cosmicave.org ↗)
    10comments
  24. Dream-RSI: Recursive Self-Improvement through Evolving Worlds(arxiv.org ↗)
    49comments
  25. I replaced my brown-noise browser tab with a menu bar app(oldmanrahul.com ↗)
    7comments
  26. Training Text-to-Image Models 3.6× Faster(linum.ai ↗)
    5comments
  27. Hackers Got Inside a Flock Camera(wired.com ↗)
    214comments
  28. The DeepMind Institute(deepmind.com ↗)
    43comments
  29. William Buckland's Theology of Geology(historytoday.com ↗)
    discuss
  30. Vectorized and performance-portable Quicksort (2022)(googleblog.com ↗)
    27comments

Nvidia announces native GPU programming in Rust

211 pointsby 13h agodeveloper.nvidia.com
72 comments
2h agoHN ↗

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.

2h agoHN ↗

cudarc been great for me, because it's easy to look up existing examples and references, and it maps 1-to-1 with what I see. I'm already having a tough time with CUDA itself, a dialect of it makes a tad harder to rely on previous work.

Seems more ergonomic in general though, both approaches they share, compared to cudarc, and less build infrastructure and fiddling with environments, which is great.

2h agoHN ↗

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.

1h agoHN ↗

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

1h agoHN ↗

kernels aren't meant to be written by any defined language. C is just a traditionally good default language that took over from assembly. No particular reason we have to stick with C.

14m agoHN ↗

And quite a few reasons that something better than C should be used. Rust seems a good candidate.

2h agoHN ↗

The launch is checked rather than trusted.

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

2h agoHN ↗

not to worry, they have an 'AI generated summary' box too

1h agoHN ↗

Its a recursive summarization pyramid

1h agoHN ↗

This thread flags an honest assessment of AI signal detection.

13m agoHN ↗

It gets fun when someone uses an uncensored model to bypass a refusal, but they accidentally pick one that was trained for erotic writing and brings its particular talent to the documentation task.

1h agoHN ↗

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

15m agoHN ↗

One might even say it is load-bearing on the seam!

1h agoHN ↗

even Nvidia

Why "even Nvidia"?

They are fully behind using AI for basically everything.

What's next? "Damn, even McDonald's is putting out unhealthy food"

1h agoHN ↗

Sure, but even Anthropic doesn't appear to use Claude for blog posts. (I don't think anyone should. The prose stinks.)

58m agoHN ↗

Anthropic _absolutely_ does

They are just better at hiding it or configuring Claude.

I have several skills that reformat text to remove AI-speak tells.

17m agoHN ↗

I think implication being organizations with 40,000+ employees and even more consultants and contractors plus a lot of budget are also using LLMs to draft public facing content instead of paying for content writers or even just proof readers .

It points to friction rather than cost economics. Same reason we are always surprised why multi billion dollar product companies with millions of install base prefer electron instead of a native app.

10m agoHN ↗

I believe most of their marketing videos use fairly convincing text to speech too, not voice actors.

50m agoHN ↗

I get the impression that Nvidia employees don't care too much - I started seeing fully AI-written "documentation" on some of their smaller projects more than a year ago (i.e., before it was even slightly a good idea).

48m agoHN ↗

People never really read documentation before. Agents do read it now, and they seem to understand LLM-written text just fine.

47m agoHN ↗

People never really read documentation before.

The heck you talking about? How do you think we wrote software for the last 50 years?

37m agoHN ↗

when you start to internalize that these kinds of statements are an indication of how the average developer of the last 10-15 years operated the adoption rate of AI makes a lot more sense

33m agoHN ↗

This is extremely depressing, I think I'm coming around to the realization that you may be right and I've been naive my entire career.

35m agoHN ↗

Yeah lol it’s basically the only reliable way to know how things work. Pre-AI, I read documentation for libraries that I used almost every day.

And now with AI I’m using it to fact check Claude. And still reading it for myself to understand why other peoples code is written a certain way. It’s basically the most important thing to reference when coding.

Sure today Claude can just read the library code and tell you what a function does or how to do something. But it still won’t tell you why something is a certain way or won’t figure out specifically-designed usage patterns as reliably as the author telling you “this is an example of doing x”

8m agoHN ↗

What? People never read documentation?

I start with reading and exploring documentation first; with the codebase as a secondary tab.

When it’s not LLM generated, documentation is supposed to be easier to read and more insightful than code.

48m agoHN ↗

Is that your honest load bearing assessment you’re going to flag?

47m agoHN ↗

I hadn't read the article and read this comment as though NVIDIA themselves were implying that this library was checked but not trusted by them since it was fully LLM generated.

37m agoHN ↗

What are we for, I ask? What the hell are we now. Chatters to LLMs now? Is this our future? It really is starting to feel like it now.

20m agoHN ↗

Dude I am in slop fucking hell right now. There is still room for a human touch, without which the agents will lever us harder and faster into a world of incomprehensible garbage.

15m agoHN ↗

I totally concur. I'm almost lost for words at this stage. I need me some land to grow vegetables on and that's about it. Maybe some chickens. Every single day brings more despair (and not the prosperity we were promised).

30m agoHN ↗

Claude, rewrite my graphics card in Rust. Make no mistakes.

2h agoHN ↗

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.

2h agoHN ↗

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!

2h agoHN ↗

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

1h agoHN ↗

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.

1h agoHN ↗

I think OP’s point is that the payoff in learning a new language has diminished in this AI era. You can call that lazy, I’d consider it smart to consider whether you could be doing other, better, things with your time.

1h agoHN ↗

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

2h agoHN ↗

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.

2h agoHN ↗

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.

2h agoHN ↗

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

1h agoHN ↗

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?

1h agoHN ↗

No. CUDA allows you to write all the code in a single file, and uses a preprocessor to split it back out and pass it through separate compilers, one for host and one for device.

1h agoHN ↗

This true, but you can write the two separately if you want.

The disadvantages of writing them together are listed in the various parent posts. But some code authors really like the convenience of having the two in the same file.

1h agoHN ↗

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

1h agoHN ↗

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

1h agoHN ↗

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

1h agoHN ↗

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!

1h agoHN ↗

Nice, thank you. There is an old python project I've been thinking about converting to Mojo.

40m agoHN ↗

Or julia if you want a much more mature ecosystem.

30m agoHN ↗

I highly recommend Julia for (scientific) GPU programming but it would be nice if there was a larger community and/or funding behind the GPU side of things. It has very few core devs for what it is.

1h agoHN ↗

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.

1h agoHN ↗

CUDA is not an API, CUDA is a language, so you cannot make that comparison.

1h agoHN ↗

The CUDA runtime is a special case of one of the libraries provided by the CUDA Toolkit. The CUDA runtime provides both an API and some language extensions to handle common tasks such as allocating memory, copying data between GPUs and other GPUs or CPUs, and launching kernels. The API components of the CUDA runtime are referred to as the CUDA runtime API.

From: https://docs.nvidia.com/cuda/cuda-programming-guide/01-intro...

1h agoHN ↗

yeah, just write a stub/wrapper around it and abstract. it's the classic coupling problem. nothing to do with CUDA

1h agoHN ↗

I strongly dislike CUDA. Once you have allowed that proprietary cr*p

Genuine question...why not just type "crap"? It's not even that much of a curse, but I've never really understood the point of self-censorship. If you don't want to curse then you could just use a non-curse word.

47m agoHN ↗

It may be to bypass censorship, rather than self-censorship. Some platforms block or shadowban comments with curse words. Not sure about this platform.

17m agoHN ↗

HN definitely doesn't give a crap about that word.

28m agoHN ↗

* is used to give emphasis and show that they are using the word as curse word rather just calling it bad

20m agoHN ↗

Launching kernels manually is an error prone PITA which I believe is the principle reason for CUDA's popularity. Having the compiler give an error when you mess up is a huge benefit. But having the compiler allow you to express "I want to launch this kernel over a grid with these dimensions, with these arguments" as a single expression is where the vast majority of the value comes from.

The having it all in a single file is mostly an artefact of the fact that it is C++, because C++ is single file at a time compilation. In D (which is multiple files in a single compiler invocation) with DCompute (which targets CUDA and OpenCL with upcoming support for Vulkan and Metal), you are required to write the kernels in a separate module, but you get all the benefits of the compiler complaining when you mess up _and_ the expressivity of "launch me this kernel".

1h agoHN ↗

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

26m agoHN ↗

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

7m agoHN ↗

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