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.

NetBSD 11.0 RC3

https://www.netbsd.org/releases/formal-11/NetBSD-11.0.html#
1•unleaded•1m ago•0 comments

nbio: A non-blocking I/O and event loop abstraction in Odin

https://pkg.odin-lang.org/core/nbio/
1•philippta•2m ago•0 comments

Medicare dips a toe into hemp for seniors

https://www.axios.com/2026/04/06/medicare-coverage-cbd-products-cannabis
1•brandonb•4m ago•0 comments

Show HN: NanoClip – A minimalist clipboard manager and snippet expander for Mac

https://www.getnano.dev/clip
1•vbaro•4m ago•0 comments

Show HN: Splice CAD – Wiring and cable assembly CAD with an agentic assist

https://splice-cad.com/
2•djsdjs•4m ago•0 comments

Why are so many young adults dying of heart attacks?

https://www.empirical.health/blog/heart-attacks-rising-young-people/
1•brandonb•5m ago•0 comments

Tintin goes to the neurologist (2004) [pdf]

https://www.cmaj.ca/content/171/12/1433
2•thunderbong•6m ago•0 comments

Show HN: Ghost Pepper – 100% local hold-to-talk speech-to-text for macOS

https://github.com/matthartman/ghost-pepper
3•MattHart88•6m ago•0 comments

When Is a Podcast Not a Podcast?

https://forkingmad.blog/when-is-a-podcast-not-a-podcast/
1•justjax•9m ago•1 comments

Show HN: Kept for the children and machines that come after

https://www.latentdiaries.com/
1•ainthusiast•11m ago•1 comments

Combine multiple Docker Compose files with profiles

https://docs.docker.com/compose/how-tos/profiles
1•nvahalik•13m ago•0 comments

HogPocket – Mobile dashboard for PostHog analytics

https://apps.apple.com/us/app/hogpocket/id6760708657
1•omardakelbab1•13m ago•0 comments

Show HN: A web app to rescue old printers, using Linux in a v86 VM plus WebUSB

https://printervention.app/
1•gmac•14m ago•1 comments

Wikipedia's AI agent row likely just the beginning of the bot-ocalypse

https://www.malwarebytes.com/blog/ai/2026/04/wikipedias-ai-agent-row-likely-just-the-beginning-of...
6•hackernj•15m ago•1 comments

Artemis II livestream with Interstellar soundtrack

https://lunarstellar.space
2•starost•15m ago•0 comments

War on Raze

https://gist.github.com/chrispsn/af6844b80687462814fc39d4b97399a6
1•tosh•15m ago•0 comments

Finding the pot of gold using EXIF and Open-Meteo

https://leisuredoma.in/p/rainbows
1•ltrg•16m ago•0 comments

Tell HN: Claude Code /buddy saves the day

1•9wzYQbTYsAIc•16m ago•0 comments

Battle Isle is a series of turn-based strategy/tactics video games

https://en.wikipedia.org/wiki/Battle_Isle
1•doener•18m ago•0 comments

Chinese scientists unveil glowing Avatar-like plants that could light cities

https://www.euronews.com/next/2026/04/02/chinese-scientists-unveil-glowing-avatar-like-plants-tha...
3•_____k•18m ago•0 comments

PDF of the Current POSIX Standard

https://corvora.github.io/posix_complete.pdf
1•birdculture•22m ago•0 comments

Better MoE model inference with warp decode

https://cursor.com/blog/warp-decode
2•babelfish•23m ago•0 comments

The Luna Ring [pdf]

https://www.shimz.co.jp/en/topics/dream/content02/pdf/lunaring_e.pdf
1•mooreds•25m ago•0 comments

Iranians Condemn Strike on a Top University (Sharif)

https://www.nytimes.com/2026/04/06/world/middleeast/iranians-condemn-university-strike.html
6•osnium123•26m ago•3 comments

Show HN: Knightline: Chess opening trainer with SM-2 spaced repetition

https://www.knightline.app/
1•xtrmity•27m ago•0 comments

Paving Hawaiian roads with recycled plastics and abandoned fishing nets

https://www.acs.org/pressroom/presspacs/2026/march/paving-hawaiian-roads-with-recycled-plastics-a...
2•PaulHoule•29m ago•0 comments

Mourning for dinosaurs, 65M years too late

https://www.cnn.com/2026/04/05/science/dinosaurs-tiktok-documentary-cec
1•Tomte•29m ago•0 comments

Show HN: TTF-DOOM – A raycaster running inside TrueType font hinting

https://github.com/4RH1T3CT0R7/ttf-doom
1•4RH1T3CT0R•31m ago•0 comments

Show HN: Formal theory of consciousness built on ∞-categories

https://holon.sh/
1•old8man•32m ago•1 comments

Russian crypto payment system expands into Africa

https://www.ft.com/content/a9de2bb5-7bbf-4d04-9424-25d4b9cda2b6
1•dosinga•32m ago•0 comments