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•11mo 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•11mo 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•11mo 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•11mo 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•11mo 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•11mo 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•11mo ago
The Zig compiler can compile C, though.

Javier Milei's bribery scandal may have derailed Argentina's crypto investment

https://www.theguardian.com/world/2026/apr/12/crypto-javier-milei-bribery-argentina
1•kasperni•21s ago•0 comments

Language, Curiosity and Life – By Masato Hagiwara

https://masatohagiwara.net/lcl.html
1•jotaefea•8m ago•0 comments

New metal with triple copper's heat conduction challenges fundamental physics

https://www.scientificamerican.com/article/new-metal-with-triple-coppers-heat-conduction-challeng...
2•thunderbong•22m ago•0 comments

Harvesting easter eggs: An exploratory study of enjoying transnarrative media

https://journals.plos.org/plosone/article?id=10.1371/journal.pone.0341588
1•PaulHoule•26m ago•0 comments

ORAC-NT MedChem Copilot that blocks synthetically infeasible molecules

https://github.com/Kretski/ORAC-NT
1•DREDREG•28m ago•0 comments

Show HN: Local LLM on a Pi 4 controlling hardware via tool calling

https://github.com/stfurkan/pi-llm
1•stfurkan•28m ago•1 comments

How to Split Mounjaro Pens

https://henryaj.substack.com/p/you-can-just-take-less-mounjaro
1•henryaj•32m ago•0 comments

Memoir to Secure Computing Technology Corp

https://cryptosmith.com/r/sctc/
1•relaunched•36m ago•1 comments

Postgres Advisory Locks: Deadlocks, Key Packing, and Fetch-Lock-Refetch

https://dteather.com/blogs/postgres-advisory-locks/
2•davidteather•37m ago•0 comments

Google Externalised the Cost of Renaming Gmail

https://nativerse-ventures.com/gmail-rename-cascade
7•Srinathprasanna•52m ago•0 comments

Show HNZ A native C/GTK Linux tray internet monitor to log ISP dropouts

https://github.com/lsferreira42/internet-indicator
1•lsferreira42•59m ago•0 comments

Show HN: A social feed with no strangers

https://www.grateful.so/
2•rpatni•1h ago•0 comments

A protective case for your glasses

https://thangs.com/designer/Gazzaladra/3d-model/Glasses%20case-1511373
2•dsego•1h ago•0 comments

Taking on CUDA with ROCm: 'One Step After Another'

https://www.eetimes.com/taking-on-cuda-with-rocm-one-step-after-another/
12•mindcrime•1h ago•4 comments

Vegetative Patients May Be More Aware Than We Knew

https://www.nytimes.com/2026/04/09/magazine/vegetative-states-conscious-aware.html
6•bookofjoe•1h ago•1 comments

Should capitalism be a choice?

https://cyrusradfar.com/thoughts/should-capitalism-be-a-choice
6•cyrusradfar•1h ago•0 comments

Major history podcasts are being faked

https://old.reddit.com/r/podcasting/comments/1sjgscs/major_history_podcasts_are_being_faked/
1•softwaredoug•1h ago•0 comments

Sam Altman's home targeted in second attack

https://sfstandard.com/2026/04/12/sam-altman-s-home-targeted-second-attack/
41•babelfish•1h ago•26 comments

Welcome to Agents Week

https://blog.cloudflare.com/welcome-to-agents-week/
1•cebert•1h ago•0 comments

They accidentally started a green screen revolution [video]

https://www.youtube.com/watch?v=Y3Dfw969itU
3•qingcharles•1h ago•0 comments

Show HN: Vapephone

https://wefumevapes.com/
1•wvlia5•1h ago•0 comments

KindleModding

https://kindlemodding.org/
2•fallinditch•1h ago•0 comments

Tech valuations are back to pre-AI boom levels

https://www.apollo.com/wealth/the-daily-spark/tech-valuations-back-to-pre-ai-boom-levels
66•akyuu•1h ago•6 comments

Linux Out-of-Bounds Access Fixed for Unprivileged Users with Crafted Certs

https://www.phoronix.com/news/Linux-OOB-Special-Certificate
2•moehm•1h ago•0 comments

Adventures in Slop: Can an AI Agent Generate Web Traffic?

https://www.tomdalling.com/blog/adventures-in-slop-can-an-ai-agent-generate-traffic/
1•ingve•1h ago•0 comments

Is Nvidia [stock] Worth 400% More? (video)

https://www.youtube.com/watch?v=xXyeTXLFfzs
1•hank808•1h ago•1 comments

Largest Curation of IAS

https://sstflix.ai
1•suschlebinger•1h ago•1 comments

Warning to drivers as Hyundai recalls 300k cars over life-threatening glitch

https://www.dailymail.co.uk/news/article-15726527/hyundai-cars-recall-seatbelt-anchor-detach.html
2•Bender•1h ago•1 comments

Git fixup is magic (and Magit is too)

https://arialdomartini.github.io/git-fixup
1•birdculture•1h ago•0 comments

Gephi – The Open Graph Visualization Platform

https://gephi.org
2•maxloh•1h ago•0 comments