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.

Sign Errors in "The Four Laws of Black Hole Mechanics"

https://arxiv.org/abs/2603.25171
1•mellosouls•36s ago•0 comments

Show HN: Agent Kernel – 3 MD files that turn any AI into a self-aware Agent

https://agent-kernel.dev/?release=v1.23.0
1•obilgic•3m ago•0 comments

Show HN: AgentGuard – An open-source firewall to secure autonomous AI agents

https://github.com/Caua-ferraz/AgentGuard
1•millimercure•5m ago•0 comments

Why the Minnesota Starvation Experiment Doesn't Generalize to Modern Dieting

https://greyenlightenment.com/2026/03/21/why-the-minnesota-starvation-experiment-doesnt-generaliz...
1•paulpauper•8m ago•0 comments

Why most AI projects fail after the demo works

https://thenewstack.io/ai-demo-to-production/
1•msolujic•21m ago•0 comments

Scale AI X Prediction Markets

https://reppo.ai/
1•rgvrmdya•23m ago•1 comments

What's the Deal with Forward Deployed Engineers?

1•rubyrenegade•28m ago•1 comments

I automated my social media outreach with Claude Code

https://github.com/Brainrot-Creations/claude-plugins
2•shubhthorat•28m ago•1 comments

Modeling the AGI Economy

https://continuations.com/modeling-the-agi-economy
2•allenleee•29m ago•0 comments

PICO-8 platformer system: handling every notoriously difficult physics edge case

https://torcado.com/blog/simple-platformer/
2•memalign•29m ago•0 comments

A leak reveals that Anthropic is testing a more capable AI model "Claude Mythos"

https://fortune.com/2026/03/26/anthropic-says-testing-mythos-powerful-new-ai-model-after-data-lea...
3•Tiberium•31m ago•0 comments

Update and learning from Unfudged HN Show last month

https://cyrusradfar.com/thoughts/unfudged-from-frustration-to-open-source
1•cyrusradfar•31m ago•0 comments

YouGov withdraws survey showing rising church attendance in England and Wales

https://www.theguardian.com/world/2026/mar/26/yougov-withdraws-survey-church-attendance-christian...
1•prawn•36m ago•0 comments

Show HN: Scroll bar scuba dude swimming as you scroll

https://scrollbuddy.com/
2•hello12343214•40m ago•3 comments

Show HN: New Causal Impact Library

https://github.com/YuminosukeSato/bsts-causalimpact
1•djwjjtw•40m ago•0 comments

Ask HN: How do you handle breaking changes from third-party APIs in production?

1•kriish2205•40m ago•0 comments

Sycophantic AI decreases prosocial intentions and promotes dependence

https://www.science.org/doi/10.1126/science.aec8352
2•noleary•42m ago•0 comments

Ordinary Americans Take on Mark Zuckerberg and Big Tech in Jury Trials

https://www.thebignewsletter.com/p/normal-americans-say-enough-to-big
1•connor11528•43m ago•0 comments

The Innovation Edge: How Large Companies Lose It and How to Get It Back

https://books.forbes.com/books/the-innovation-edge/
2•teleforce•43m ago•0 comments

Claw Fact Bus: "Facts, Not Commands" for AI Agent Coordination

https://github.com/YangKGcsdms/claw_fact_bus/blob/master/protocol/SPEC.md
1•CarterYang•47m ago•0 comments

From shine to decline: Degradation of over 1M solar PV systems in Germany

https://www.sciencedirect.com/science/article/pii/S0140988326001611
2•toomuchtodo•51m ago•0 comments

Anthropic considers IPO as soon as October

https://www.theedgesingapore.com/news/artificial-intelligence/claude-ai-maker-anthropic-considers...
6•doppp•51m ago•0 comments

Slashing agent token costs by 98% with RFC 9457-compliant error responses

https://blog.cloudflare.com/rfc-9457-agent-error-pages/
5•cezarvil•56m ago•1 comments

The decline and fall of the Roman currency empire

https://www.economist.com/finance-and-economics/2026/03/26/the-decline-and-fall-of-the-roman-curr...
3•andsoitis•57m ago•0 comments

Database Performance Bottlenecks: N+1 Queries, Missing Indexes, Connection Pools

https://howtocenterdiv.com/beyond-the-div/your-database-is-the-bottleneck-not-your-code
3•imkyssa•58m ago•0 comments

Show HN: AI career guides for software career family

https://www.ai-proof-careers.com/industry/software-technology
1•yoyothesheep•1h ago•0 comments

Trump's signature will appear on US dollars

https://www.nytimes.com/2026/03/26/us/politics/trump-signature-us-dollars.html
4•mizzao•1h ago•6 comments

The Failure of the Thermodynamics of Computation(2010)

https://sites.pitt.edu/~jdnorton/Goodies/Idealization/index.html
2•nill0•1h ago•0 comments

Limitations of Serial Cloning in Mammals

https://www.nature.com/articles/s41467-026-69765-7
2•bookofjoe•1h ago•1 comments

XFX Is Fixing the Part of Crypto That Still Feels Like a Wire Transfer

https://www.siliconsnark.com/a-startup-called-xfx-is-fixing-the-part-of-crypto-that-still-feels-l...
1•SaaSasaurus•1h ago•0 comments