frontpage.
newsnewestaskshowjobs

Open Source @Github

fp.

Open in hackernews

Zig and GPUs

https://alichraghi.github.io/blog/zig-gpu/
57•Cloudef•1y ago

Comments

LegNeato•1y ago
See also https://github.com/Rust-GPU/rust-gpu and https://github.com/rust-gpu/rust-cuda
ladyanita22•1y ago
Surprisingly, it seems this project just supports Spir-V and PTX, but not DXIL or AMDGCN.

I say surprisingly, because I'd expect Rust support to be more mature than Zig's.

lostmsu•1y ago
Microsoft indicated they are switching to SPIR-V from DXIL: https://devblogs.microsoft.com/directx/directx-adopting-spir...
skywal_l•1y ago
I am a complete noob in GPU but is AMDGCN the older generation with the new one being RDNA? If you generate a binary for AMDGCN, will it run on the newest cards?

Also, I though that these GPU ISAs were "proprietary". I wonder how reliable the binary generation can be.

AliChraghi•1y ago
AMD ISAs are changing for almost every generation so LLVM[1] continues to keep the architecture name "amdgcn" and handle the variation based on the model flag (e.g., -mcpu=gfx1030 for RDNA2, -mcpu=gfx1100 for RDNA3).

> I though that these GPU ISAs were "proprietary"

PTX spec[2] is publicly available but the actual hardware assembly (SASS) is not. Although i believe Nsight allows you to view it.

1. https://llvm.org/docs/AMDGPUUsage.html#processors

2. https://docs.nvidia.com/cuda/parallel-thread-execution

imtringued•1y ago
If LLVM can target AMD GPUs what exactly prevents AMD and ROCm from supporting all the damn GPUs?

At this point I'm convinced that the real problem with AMD GPUs isn't necessarily the compilers (although they do produce mediocre code) or even the hardware itself, but some crappy C++ driver code that can't handle running graphics and compute at the same time. The datacenter GPUs never had to run graphics in the first place, so they are safe.

slavik81•1y ago
In my experience, the compiler, compute drivers, and HIP runtime work fine for all modern AMD GPUs. The only parts of the stack that don't run on all GPUs are the math and AI libraries. And that is mostly because AMD isn't building and testing those libraries for unsupported GPUs. The actual work required to enable functional support was straightforward enough that I ported them myself when packaging the libraries for Debian. Though, I had a lot of help on the testing.

See the Debian Trixie Supported GPU list: https://salsa.debian.org/rocm-team/community/team-project/-/...

SomaticPirate•1y ago
While I admire the work of hobbyists it still looks like C/C++ will be the default until a GPU vender makes the decision to support these libraries.

From my understanding, Vulkan and OpenGL are nice but the true performance lies in the specific toolkits (ie CUDA, Metal).

Wrapping the vendor provided frameworks is liable to break and that isn't tenable for someone who wants to do this on a professional basis.

pjmlp•1y ago
They also miss that on CUDA's case it is an ecosystem.

Actually it is C, C++, Fortran, OpenACC and OpenMP, PTX support for Java, Haskell, Julia, C#, alongside the libraries, IDE tooling and GPU graphical debugging.

Likewise Metal is plain C++14 plus extensions.

On the graphics side, HLSL dominates, following by GLSL and now slang. There are then MSL, PSSL and whatever NVN uses.

By the way, at GTC NVIDIA announced going all in with Python JIT compilers for CUDA, with feature parity with existing C++ tooling. There is now a new IR for doing array programming, Tile IR.

dismalaf•1y ago
I don't quite get this comment.

This is supposed to be used in place of CUDA, HIP, Metal, Vulkan, OpenGL, etc... It's targeting the hardware directly so doesn't need to be supported as such.

The site also seems to clearly state it's a work in progress. It's just an interesting blog post...

slowmovintarget•1y ago
The Zig compiler can compile C, though.

Show HN: Turnfeed – a social feed inside ChatGPT

https://chatgpt.com/plugins/plugin_asdk_app_69f121f489748191a86a5a4f1dbe27b2?q=turnf
1•TheodorNEngoy•1m ago•0 comments

Show HN: Emacs Liquid Glass

https://github.com/larrasket/emacs-liquid-glass
1•lr0•3m ago•0 comments

Show HN: CrossPlay - Games, puzzles and tools for your e-reader

https://crossplay.ma-r-s.com
1•ma-r-s•4m ago•0 comments

Detecting breaking API changes in Go with golang.org/x/exp/cmd/apidiff

https://medium.com/dev-genius/detecting-breaking-api-changes-in-go-with-apidiff-bd608bbc7996
1•cheikhdev•4m ago•0 comments

How to Survive an Infestation of Toxic Caterpillars

https://www.newyorker.com/science/elements/how-to-survive-an-infestation-of-toxic-caterpillars
1•petethomas•4m ago•0 comments

MacSurf and the State of AI Assisted Projects

https://www.patreon.com/MacSurf/posts/macsurf-state-of-166060679
1•mplsllc•5m ago•0 comments

Tucows

https://en.wikipedia.org/wiki/Tucows
2•reaperducer•6m ago•0 comments

Show HN: Jobman – nohup with retries, timeouts, and dependencies

https://github.com/ryancswallace/jobman
1•ryancswallace•9m ago•1 comments

Working on Economics with Fable 5

https://wilsoniumite.com/2026/08/03/working-on-economics-with-fable-5/
1•Wilsoniumite•11m ago•0 comments

Chernobyl's Robots, or the Hackathon from Hell

https://hackaday.com/2026/08/07/chernobyls-robots-or-the-hackathon-from-hell/
1•rustoo•11m ago•0 comments

Target Is Slicing Open Pokémon Card Boxes Before They're Sold to Deter Scalpers

https://www.ign.com/articles/target-is-slicing-open-pokmon-card-boxes-before-theyre-sold-in-a-bid...
2•TMWNN•12m ago•1 comments

U.S. Department of Energy Launches the Genesis Open Models Initiative

https://genesisopenmodels.anl.gov/
2•moelf•16m ago•0 comments

Cowchat – Let Claude, Codex, and other agents talk to each other locally

https://cowchat.cowboy.inc/
1•ryanlchan•16m ago•0 comments

Musk Refuses Ukrainian Request to Enable Starlink for Deep Strikes Inside Russia

https://united24media.com/world/elon-musk-refuses-ukrainian-request-to-enable-starlink-for-deep-s...
2•CharlesW•17m ago•0 comments

Not-So-Kosher Slaughterhouse

https://rumble.com/v798evg-secret-kosher-slaughterhouse-exposed-in-england-sickening-investigatio...
1•krautburglar•17m ago•0 comments

"I built a speed/distance tracker for my hamster, uploads to his Strava account"

https://www.reddit.com/r/SideProject/comments/1v9uyq0/i_built_a_speeddistance_tracker_for_my_hams...
1•zdw•18m ago•0 comments

The Long, Knotty, World-Spanning Story of String

https://hakaimagazine.com/features/the-long-knotty-world-spanning-story-of-string/
1•ohjeez•19m ago•0 comments

Novella in Blindsight/Echopraxia Universe

https://phulp.com/apophenia.html
1•binbag•20m ago•1 comments

Spytrap – Who's Watching You?

https://play.google.com/store/apps/details?id=com.hwassef.spytrap&hl=en_US
1•Hwassef•21m ago•0 comments

What Was the Internet?

https://www.bostonreview.net/articles/what-was-the-internet/
1•cdrnsf•24m ago•0 comments

Joe Rogan Experience #2537 – David Sinclair [video]

https://www.youtube.com/watch?v=hxid7FofhMw
1•Bender•24m ago•0 comments

Improving Fable 5's biology safeguards

https://www.anthropic.com/news/improving-fable-5-s-biology-safeguards
3•mbeavitt•26m ago•0 comments

Putin's Missiles Carry American Technology

https://jeffreylminch.substack.com/p/every-night-putins-missiles-carry
2•rmason•28m ago•2 comments

The Zero-Click Economy: Why 60% of Searches End Without a Click

https://www.forbes.com/councils/forbesbusinesscouncil/2026/03/02/the-zero-click-economy-why-60-of...
2•chrisjj•29m ago•1 comments

Show HN: Jacobian: Pure maths library and tools for agents

https://github.com/morluto/jacobian
1•Mplto•31m ago•0 comments

Archer Zee: Predicting the Airspace

https://archer.com/tech-blog/zee-predicting-the-airspace
1•vlovich123•32m ago•0 comments

Metabase SQLi zero-day exploited in customer data-theft attacks

https://www.bleepingcomputer.com/news/security/framework-tally-disclose-metabase-data-theft-attacks/
2•sbulaev•33m ago•0 comments

Formalizing Semantic Thermodynamics: How narrative gravity prunes LLM inference

https://github.com/tauansloboda/semantic-thermodynamics
1•tauanvinicius•35m ago•0 comments

Now you can securely link multiple phones to one Signal account

https://www.theverge.com/tech/975407/signal-linked-devices-sync
2•Cider9986•37m ago•0 comments

William Orbit, pop producer for Madonna, All Saints and more, dies aged 69

https://www.theguardian.com/music/2026/aug/07/william-orbit-pop-producer-madonna-all-saints-dies-...
4•tomduncalf•38m ago•0 comments