frontpage.
newsnewestaskshowjobs

Open Source @Github

fp.

Open in hackernews

Zig and GPUs

https://alichraghi.github.io/blog/zig-gpu/
57•Cloudef•1y ago

Comments

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

Tribe in Colorado brings utility scale solar project online

https://www.npr.org/2026/07/06/nx-s1-5779756/despite-stiff-political-headwinds-tribe-in-colorado-...
1•geox•1m ago•0 comments

Claude Code deletes conversations after 30 days

1•mieubrisse•1m ago•0 comments

Adding Homemade TLS to a Homemade Web Server

https://www.dmytrohuz.com/p/adding-homemade-tls-to-a-homemade
1•dmyhuz•6m ago•0 comments

Euclid scientists discover most distant known quasars

https://www.euclid-ec.org/most-distant-quasars/
1•robin_reala•6m ago•0 comments

Ask HN: What is your go-to prompt to prove AI can be wrong?

1•throwaway_887•9m ago•0 comments

Ask HN: Do you guys struggle with finding a right person for your FDE role?

1•getelementbyiq•16m ago•0 comments

Experts offer advice on performing endurance events in excessive heat

https://news.northeastern.edu/2026/07/02/cycling-in-extreme-heat-tour-de-france/
1•ano-ther•17m ago•0 comments

Read Rust Like a Chinese Character

https://dawaba.pages.dev/writing/sometimes-read-rust-like-a-chinese-character/
1•saint-evan•18m ago•0 comments

A Self-Improving Code World Model Agent

https://jdsemrau.substack.com/p/a-self-improving-code-world-model
1•ph4rsikal•21m ago•0 comments

Show HN: Kiwi – Run agentic dev loops in the cloud, keep keys on your laptop

https://github.com/ibreakthecloud/kiwi
1•harshvkarn•22m ago•0 comments

Plex debuts 5-year membership pass for $250

https://arstechnica.com/gadgets/2026/07/250-used-to-get-you-a-lifetime-plex-pass-now-you-get-a-fi...
1•AndrewDucker•22m ago•0 comments

Australia prosecuting Amazon for unilaterally modifying Prime terms [video]

https://www.youtube.com/watch?v=DV2-GLJ2FnM
1•dataflow•25m ago•1 comments

Show HN: I built notion database based no code form builder

https://ndbforms.myurll.in/
1•nookeshkarri7•26m ago•0 comments

The Hitchhiker's Guide to Agentic AI

https://arxiv.org/abs/2606.24937
2•jonbaer•26m ago•0 comments

Show HN: TV Time to Serializd Importer

https://chromewebstore.google.com/detail/tv-time-→-serializd-impor/cpcfkgcidilfibakiaohbekkanlk...
1•Gooblebrai•26m ago•0 comments

your competitor is 10x better than you

https://www.mentionedby.world/
2•aykhanstoic•30m ago•1 comments

What else happened in 1776 [video]

https://www.youtube.com/watch?v=nGMCowI4exk
1•iansteyn•30m ago•0 comments

Venice AI becomes a unicorn with its privacy-first AI platform takes off

https://techcrunch.com/2026/07/01/venice-ai-becomes-a-unicorn-with-65m-series-a-as-its-privacy-fi...
2•felixdoerp•33m ago•0 comments

China fires ballistic missile into Pacific nuclear-free zone

https://www.ft.com/content/c52f0a98-2e6a-4acc-a668-d4ce442c4aba
1•cwwc•35m ago•0 comments

Roll your own file-based router in under 50 lines of code

https://wasp.sh/blog/2026/07/01/roll-your-own-file-based-router
1•cprecioso•35m ago•0 comments

Who Survives Europe's Energy Crisis?

https://themerchantsnews.substack.com/p/who-survives-europes-energy-crisis
3•felixdoerp•37m ago•0 comments

On Writing (Code)

https://unpredictabletokens.substack.com/p/on-writing-code
2•jac08h•40m ago•1 comments

Edit Markdown like editing a Word document

https://phcode.io/markdown-editor.html
2•charlypa•40m ago•2 comments

Inertial Navigation System

https://en.wikipedia.org/wiki/Inertial_navigation_system
1•thunderbong•41m ago•0 comments

Show HN: I built an AI that knows my net worth: 3 countries, 6 currencies

https://demo.joinbrisa.com
3•kareemarab•46m ago•0 comments

Pyramids – GIS Utility Package

https://github.com/serapeum-org/pyramids
2•marklit•47m ago•0 comments

Sentiment analysis of Reddit threads using BERT models

https://threadmood.sibencedigital.com/app?url=https%3A%2F%2Fwww.reddit.com%2Fr%2Fprogramming%2Fco...
4•jbarti•48m ago•1 comments

Quitting a Forever Game

https://ravi64.com/quitting-pokemon-go-forever-game/
2•outrunner•51m ago•0 comments

Compressor V2: three compression layers for a 50% LLM agent cost cut

https://www.edgee.ai/blog/posts/introducing-compressor-v2-three-compression-layers-measured-end-t...
5•kokakiwi•52m ago•0 comments

Pokémon Go '10th Anniversary Party' event guide

https://www.polygon.com/pokemon-go-10th-anniversary-party-event-timed-research-costumes-gimmighoul/
3•rldjbpin•53m ago•0 comments