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.

Office Chair Is $50 Cheaper Than We've Seen Before

https://www.wired.com/story/branch-ergonomic-chair-pro-amazon-spring-sale-2026/
1•joozio•1m ago•0 comments

CERN uses tiny AI models burned into silicon for real-time LHC data filtering

https://theopenreader.org/Journalism:CERN_Uses_Tiny_AI_Models_Burned_into_Silicon_for_Real-Time_L...
1•TORcicada•2m ago•0 comments

Open Source Gave Me Everything Until I Had Nothing Left to Give

https://kennethreitz.org/essays/2026-03-18-open_source_gave_me_everything_until_i_had_nothing_lef...
1•ta988•4m ago•0 comments

Mysterious Trading Patterns Follow Trump into War

https://www.axios.com/2026/03/25/trump-iran-oil-insider-trading
1•karakoram•5m ago•1 comments

AI Research Is Getting Harder to Separate from Geopolitics

https://www.wired.com/story/made-in-china-ai-research-is-starting-to-split-along-geopolitical-lines/
1•joozio•6m ago•0 comments

Why This Jump in Gas Prices Feels Different

https://www.nytimes.com/2026/03/18/upshot/gas-prices-lookup.html
1•karakoram•7m ago•1 comments

Google to finance data center project leased to Anthropic

https://seekingalpha.com/news/4569914-google-to-finance-data-center-project-leased-to-anthropic
2•maneprajakta•11m ago•0 comments

Show HN: Spectator a cross platform DSL for cybersecurity

1•CzaxTanmay•13m ago•0 comments

I Caught a 3.4M Daily Download Supply Chain Attack

https://miles0sage.github.io/codeguard-mcp/blog.html
2•Miles0•17m ago•1 comments

The Superorganism Explained in 7 Minutes

https://natehagens.substack.com/p/why-the-world-feels-like-its-falling
2•shrubby•24m ago•1 comments

Simple English Wikipedia

https://simple.wikipedia.org/wiki/Main_Page
4•microflash•28m ago•1 comments

Building NetPulse: from MRTG replacement to something much bigger

https://as215855.net/posts/building-netpulse
1•miyuru•31m ago•0 comments

Over 11,000 munitions in 16 Days of the Iran War

https://www.rusi.org/explore-our-research/publications/commentary/over-11000-munitions-16-days-ir...
1•stubish•31m ago•0 comments

TUI for Vibe Coders

https://github.com/hritupitu/vibetui/tree/main
1•hritvikagarwal•40m ago•2 comments

Reducing our monorepo size to improve developer velocity

https://dropbox.tech/infrastructure/reducing-our-monorepo-size-to-improve-developer-velocity
2•vinhnx•40m ago•1 comments

CSS Refactoring with an AI Safety Net

https://danielabaron.me/blog/css-refactoring-with-an-ai-safety-net/
2•vinhnx•41m ago•0 comments

Understanding LRU Caches in Go: Part 2

https://learnwithtimi.substack.com/p/2-understanding-least-recently-used
1•giddy_dev•42m ago•0 comments

Show HN: Layer – Hide your personal AI files from Git without touching gitignore

https://crates.io/crates/git-layer
2•aungsiminhtet•57m ago•0 comments

Ask HN: Anybody tried to cheat AI-HR-system with hidden/white sentences?

3•KellyCriterion•58m ago•1 comments

Show HN: WordGen a Robust Wordlist Maker

1•CzaxTanmay•1h ago•0 comments

Ask HN: A Product Healing Agent, your thoughts?

1•gokulnair2001•1h ago•0 comments

C Preprocessor tricks, tips, and idioms

https://github.com/pfultz2/Cloak/wiki/C-Preprocessor-tricks,-tips,-and-idioms
1•signa11•1h ago•0 comments

Engineered yeast provides rare but essential nutrition for honeybees

https://www.nature.com/articles/s41586-025-09431-y
1•ludicrousdispla•1h ago•0 comments

Tree Editor – apply and remove types without breaking your data

https://github.com/justindmassey/tree-editor
1•justindmassey•1h ago•0 comments

Llama.cpp with CUDA Support on Original Jetson Nano (4GB)

https://github.com/kreier/llama.cpp-jetson
2•Abishek_Muthian•1h ago•2 comments

LLMs on a PowerPC Mac

http://www.theresistornetwork.com/2025/03/thinking-different-thinking-slowly-llms.html
1•austinallegro•1h ago•0 comments

Show HN: WordGen, a fast and easy to use wordlist generator

1•CzaxTanmay•1h ago•0 comments

Stop Guessing. Start Scaling. Land Your Dream Big Tech Offer with InterviewGPT

https://interviewgpt.deepchill.app/blogs
1•tiancaioyzy•1h ago•0 comments

Show HN: NUPA is Pax Economica, 6,480x more stable than current US economy

2•bedardbrandon89•1h ago•0 comments

Show HN: Live global gas station inventory

https://tanklevel.info/
3•t819291•1h ago•0 comments