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•11mo ago

Comments

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

Tesla's China sales climb in the first two months of 2026 while BYD numbers drop

https://www.cnbc.com/2026/03/13/teslas-china-sales-climb-in-the-first-two-months-of-2026-while-by...
1•MilnerRoute•36s ago•0 comments

Toolpack SDK, an Open Source TypeScript SDK for Building AI-Powered Applications

1•sajeerzeji•3m ago•0 comments

Show HN: Crasher – Random Group Chat

https://crasher.alephz.com/
1•ishener•4m ago•0 comments

The Compose key is magic

https://crescentro.se/posts/compose-key/
2•birdculture•5m ago•0 comments

'Like a trap you can't escape': The women who regret being mothers

https://www.bbc.com/news/articles/cvgkvge4rkmo
1•haunter•5m ago•0 comments

"Counterpoint: I think the doc read process has killed Amazon"

https://twitter.com/bryanrbeal/status/2032635436510675015
1•trelane•5m ago•0 comments

Show HN: Zap Code – AI code generator that teaches kids real HTML/CSS/JS

https://www.zapcode.dev
3•eibrahim•5m ago•0 comments

Male shoe anxiety hits the Oval Office

https://www.cnn.com/2026/03/13/style/rubio-vance-big-shoes-florsheim-cec
2•randycupertino•6m ago•0 comments

Show HN: Voice Mode for Gemini CLI Using the Live API

https://github.com/kstonekuan/gemini-cli-voice-extension
1•kstonekuan•7m ago•0 comments

Marketing for Founders

https://github.com/EdoStra/Marketing-for-Founders
1•jimsojim•8m ago•0 comments

Head of FCC threatens broadcaster licenses over critical coverage of Iran war

https://twitter.com/BrendanCarrFCC/status/2032855414233047172
4•theahura•8m ago•0 comments

Claude spring break usage promotion

https://support.claude.com/en/articles/14063676-claude-spring-break-usage-promotion
5•enceladus06•8m ago•1 comments

Polymers with purpose: molecules can squirm free of the pack

https://www.nature.com/articles/d41586-026-00767-7
1•y1n0•9m ago•0 comments

WristPP: A Wrist-Worn System for Hand Pose and Pressure Estimation

https://arxiv.org/abs/2603.00606
2•PaulHoule•10m ago•0 comments

VibePod

https://github.com/VibePod/vibepod-cli
1•nezhar•10m ago•0 comments

The Matriarch

http://letsreesetnow.com
1•TheMediaShift•10m ago•0 comments

Show HN: Generate a /mu/ style essentials chart for your last.fm history

https://mymuguide.site/
1•vagabund•11m ago•0 comments

MCP Is Dead; Long Live MCP

https://chrlschn.dev/blog/2026/03/mcp-is-dead-long-live-mcp/
2•CharlieDigital•11m ago•0 comments

Thoughts on Generative A.I

https://kghose.github.io/generative-ai/
1•y1n0•11m ago•0 comments

Blue books make an "out of step" campus comeback in the AI era

https://www.axios.com/2026/03/14/ai-blue-books-colleges-jobs
1•1vuio0pswjnm7•12m ago•0 comments

Building Google Maps for Orbit

https://orbnav.vercel.app
3•supernovalabs•12m ago•1 comments

Show HN: Karpathy's Autoresearch with Evolutionary Database

https://github.com/hgarud/autoresearch
1•hgarud•13m ago•0 comments

Tell HN: Free speech has consequences' is a nonsensical statement

1•piratesAndSons•14m ago•2 comments

It's time to move your docs into a repo – especially because of AI

https://www.dein.fr/posts/2026-03-13-its-time-to-move-your-docs-in-the-repo
8•gregdoesit•15m ago•0 comments

Three More AI Psychoses

https://pluralistic.net/2026/03/12/normal-technology/#bubble-exceptionalism
2•MindGods•15m ago•0 comments

Vim experience in Excel: An add-in that brings Vim's key bindings to Excel

https://github.com/sha5010/vim.xlam
1•thunderbong•16m ago•0 comments

Claudetop – htop for Claude Code sessions (see your AI spend in real-time)

https://github.com/liorwn/claudetop
2•liorwn•17m ago•1 comments

Cuban protesters ransack Communist office as energy crisis deepens

https://www.bbc.com/news/articles/c875zd7de5xo
1•tartoran•19m ago•0 comments

Can RL Improve Generalization of LLM Agents? An Empirical Study

https://arxiv.org/abs/2603.12011
1•tsurg_dot_com•20m ago•1 comments

You're Using an Inferior Pour-Over Coffee Brewer

https://www.wired.com/story/kalita-wave-pour-over-coffee-brewer/
1•y1n0•21m ago•1 comments