frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Zig and GPUs

https://alichraghi.github.io/blog/zig-gpu/
57•Cloudef•9mo ago

Comments

LegNeato•9mo ago
See also https://github.com/Rust-GPU/rust-gpu and https://github.com/rust-gpu/rust-cuda
ladyanita22•9mo 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•9mo ago
Microsoft indicated they are switching to SPIR-V from DXIL: https://devblogs.microsoft.com/directx/directx-adopting-spir...
skywal_l•9mo 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•9mo 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•9mo 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•9mo 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•9mo 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•9mo 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•9mo 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•9mo ago
The Zig compiler can compile C, though.

Doing Gigabit Ethernet over My British Phone Wires

https://thehftguy.com/2026/01/22/doing-gigabit-ethernet-over-my-british-phone-wires/
1•user5994461•2m ago•0 comments

Show HN: Vibecoded AWS SAA‑C03 Cheat Sheet

https://sa.carrots.dev/
1•Lwrless•4m ago•0 comments

The case for 1-bit displays in a high-dopamine world

https://turbulencegains.com/trmnl-review-2026/
1•jerr12939•5m ago•0 comments

Show HN: Free AI Headshot Generator

https://freeaitoolforthat.com/ai-headshot-generator
2•tamnv•6m ago•0 comments

The Gaffer #51: The Cardellini Clamp [video]

https://www.youtube.com/watch?v=I1gkwQcelKo
1•yair99dd•7m ago•1 comments

Vibe Graveyard

https://vibegraveyard.ai/
1•spc476•7m ago•0 comments

Disko-ZFS: Declaratively Managing ZFS Datasets

https://redalder.org/blog/disko-zfs-declaratively-managing-zfs-datasets.html
1•lovesegfault•8m ago•0 comments

Show HN: Jar.tools – online Jar file opener

https://jar.tools/
1•Igor_Wiwi•10m ago•0 comments

Going Founder Mode on Cancer

https://centuryofbio.com/p/sid
1•doppp•10m ago•0 comments

Ask HN: How do you AI code from your phone?

3•splitbrain•17m ago•0 comments

World record for endurance singing, 1976

https://www.rte.ie/archives/2026/0124/1553434-record-marathon-singer/
1•austinallegro•19m ago•0 comments

Show HN: I built a space travel calculator using Vanilla JavaScript

https://cosmic-odometer.vercel.app/
1•captainnemo729•20m ago•1 comments

Don't panic The blockchain explorer isn't out to get you

https://thebitgazette.com/dont-panic-the-blockchain-explorer-isnt-out-to-get-you/
1•CapricornQueen•27m ago•0 comments

Women filmed in secret for TikTok content – and then harassed online

https://www.bbc.co.uk/news/articles/cr7jej2elyyo
3•mindracer•30m ago•1 comments

Repatriate the gold': German economists advise withdrawal from US vaults

https://www.theguardian.com/world/2026/jan/24/repatriate-the-gold-german-economists-advise-withdr...
18•vinni2•32m ago•4 comments

Remotely unlocking an encrypted hard disk

https://jyn.dev/remotely-unlocking-an-encrypted-hard-disk/
1•fanf2•34m ago•0 comments

Qualcomm CEO pockets 15% pay rise as profits fall 45%

https://www.theregister.com/2026/01/23/qualcomm_ceo_pay/
1•Brajeshwar•40m ago•0 comments

Professor in Germany regards 2 years of ChatGPT chat history "academic work"

https://www.nature.com/articles/d41586-025-04064-7
1•myk-e•42m ago•1 comments

Show HN: AI Lint – Teach coding agents your team's standards, not just syntax

1•keepamovin•48m ago•0 comments

Ptolemaic Code seems functional but is based on a fundamentally incorrect model

https://tldr.nettime.org/@dk/115883067614348534
1•AndrewDucker•48m ago•0 comments

Show HN: 3 months cloning Typefully with Claude Code – here's what I learned

1•yeeyang•50m ago•0 comments

Build with Gemini 3 Flash, frontier intelligence that scales with you

https://blog.google/innovation-and-ai/technology/developers-tools/build-with-gemini-3-flash/
2•nnx•56m ago•0 comments

Chess engine, pt. 6: Neural-net evaluation

https://www.dogeystamp.com/chess6/
1•luu•1h ago•0 comments

The Signalflow concepts to learn, for easier charts, alerts

https://martincapodici.com/2026/01/24/the-signalflow-concepts-to-learn-for-easier-charts-alerts-a...
1•mcapodici•1h ago•0 comments

On Programming with Agents

https://zed.dev/blog/on-programming-with-agents
2•saurabh•1h ago•0 comments

Show HN: Orbit – Track "zombie loops" and cost-per-feature in AI agents

https://withorbit.io
1•harshit19932703•1h ago•0 comments

Nix Scripts

https://github.com/QuackHack-McBlindy/dotfiles
1•quackhack•1h ago•0 comments

Data Center Debate, with Philip Johnston (CEO of Starcloud) [video]

https://www.youtube.com/watch?v=0wBFNVEOlnU
2•T-A•1h ago•0 comments

Pigouvian Tax

https://en.wikipedia.org/wiki/Pigouvian_tax
1•nomilk•1h ago•0 comments

What's so special about the find of a Roman panther?

https://www.bbc.co.uk/news/articles/c17zp8pl0pjo
2•zeristor•1h ago•0 comments