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.

Users cry foul after AMD stripped memory crypto from its consumer CPUs

https://arstechnica.com/security/2026/06/users-cry-foul-after-amd-stripped-memory-crypto-from-its...
1•helterskelter•1m ago•0 comments

David Attenborough's life's work, searchable

https://attenborough-100.vercel.app/
1•mooreds•1m ago•0 comments

Coding agents have no moat

https://tombedor.dev/coding-agents-have-no-moat/
1•mooreds•1m ago•0 comments

Nobody clicks your share buttons

https://derekhanson.blog/nobody-clicks-your-share-buttons/
1•mooreds•2m ago•0 comments

Heavyweight, to whom it may concern

https://neural.it/2026/05/heavyweight-to-whom-it-may-concern/
1•jruohonen•4m ago•0 comments

Show HN: tot.page – git-backed publishing for HTML and Markdown

https://tot.page/
1•ramoz•4m ago•0 comments

Current and Future Megaconstellations [video]

https://www.youtube.com/watch?v=cfOgp9gp2hA
1•ColinWright•4m ago•0 comments

AI may read a different PDF than your users

https://pqpdf.com/ai-document-integrity.php
1•pqpdf•7m ago•0 comments

Blood Tests Can Now Detect Alzheimer's. Should You Get One?

https://www.wsj.com/health/wellness/blood-tests-can-now-detect-alzheimers-should-you-get-one-9528...
1•JumpCrisscross•10m ago•0 comments

Upstream and Downstream Are Not Directions

https://piljoong.dev/posts/upstream-and-downstream-are-not-directions/
1•speckx•11m ago•0 comments

The Pissed-Off Spouses Who Try to Intervene in Their Partners' Jobs

https://slate.com/life/2026/06/work-job-wife-husband-kid-partner-boss-call.html
1•tekdude•12m ago•0 comments

Show HN: World Cup TUI with Live Updates

https://github.com/perryraskin/world-cup-tui
1•perryraskin•14m ago•1 comments

The FTC Cracked Down on 'Hidden' Car Dealer Fees. They're Still Happening

https://www.wsj.com/business/autos/the-ftc-cracked-down-on-hidden-car-dealer-fees-theyre-still-ha...
2•JumpCrisscross•15m ago•0 comments

Alberta Eradicated Rats

https://worksinprogress.co/issue/albertas-war-on-rats/
1•deunamuno•15m ago•0 comments

Why long context eats your VRAM: the KV cache explained

https://vettedconsumer.com/the-kv-cache-explained-why-long-context-eats-your-vram-and-how-to-fit-...
1•ermantrout•16m ago•0 comments

Show HN: Vet Turned Founder, AI Lawn Diagnosis

https://grassdx.com/
1•andrewbr•17m ago•0 comments

Heikki's Garden of Flowers, a catalogue of pictorial letterpress works

https://garden-of-flowers.heikkilotvonen.com/?essay
1•NaOH•17m ago•0 comments

Ask HN: How do you track commitments you make to other people in conversation?

1•annonymousjaat•17m ago•1 comments

Single dose of magic mushroom psychedelic can cause anatomical brain changes

https://www.theguardian.com/science/2026/may/05/magic-mushrooms-psychedelic-changes-brain-anatomy...
3•helterskelter•18m ago•0 comments

Google vs. Oracle (2021)

https://en.wikipedia.org/wiki/Google_LLC_v._Oracle_America,_Inc.
1•tosh•18m ago•0 comments

Game Engine White Papers Commander Keen

https://forgottenbytes.net/commander_keen.html
2•mfiguiere•20m ago•0 comments

Anti-slopping: An innovation for rectifying LLM writing clichés

https://research.thoughtworks.com/library/anti-slopping-an-innovation-for-rectifying-llm-writing-...
1•freeatnet•22m ago•0 comments

JD Vance Confirms Iran Will Get Jaw-Dropping Sum Under Trump Deal

https://newrepublic.com/post/211826/jd-vance-us-pay-iran-billions-trump-deal
9•nothrowaways•24m ago•5 comments

A Clojure Dialect on Rust

https://clj.rs
1•caseym831•24m ago•0 comments

At Berkeley, the enrollment dip [in CS] has come from a supply-side constraint

https://alumni.berkeley.edu/california-magazine/2026-summer/major-issue/
1•jedberg•25m ago•1 comments

Oura and Counsel Health Partner to Provide AI-Enabled Care Within the Oura App

https://ouraring.com/blog/counsel-integration-oura-app/
1•bariumbitmap•26m ago•0 comments

AI and Amateurism

https://pluralistic.net/2026/06/15/vernacular/
1•hn_acker•27m ago•0 comments

Show HN: Turboquant.cpp – Quantize embeddings to 1-4 bits, no training (400 LoC)

https://github.com/RunEdgeAI/turboquant.cpp
1•andrewmikhail•28m ago•0 comments

Ask HN: Whats your intuition on AGI breakthrough?

5•filup•30m ago•1 comments

Ask HN: Did your (non-AI) research field get less fun after commercialization?

1•blt•30m ago•0 comments