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•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.

Severe Latency Impacting All Slack Services

https://slack-status.com/2026-05/fd9a431182c72eeb
1•xyru•1m ago•0 comments

Trump admin drawing up plans to stop processing intl flights in sanctuary cities

https://www.theguardian.com/us-news/2026/may/27/dhs-international-flights-sanctuary-cities
3•standardUser•4m ago•0 comments

New method for testing AI using real work-flows

https://github.com/AssimilatedHuman/LLM-Inquisitor
1•ballista2026•5m ago•0 comments

Show HN: My Attempt at QR as a Captcha

https://qr.arcades.click
1•jwally•10m ago•0 comments

Ask HN: I am about to go from SWE to Product Manager, what is your day 1 advice?

1•mr_00ff00•13m ago•1 comments

A Luxury Survivalist Community Is Tearing Itself Apart

https://www.wsj.com/us-news/a-luxury-survivalist-community-is-tearing-itself-apart-53d2a99f
1•tortilla•13m ago•1 comments

Why is Slack allowed to get away with lying?

5•slack_is_lying•17m ago•1 comments

AGH is the First open-network protocol for AI Agents

https://www.agh.network/
1•pedronauck21•18m ago•1 comments

How can we get politicians to listen? Surely there's a tech solution: Voice News

https://voicenews.app
1•henrystaley•18m ago•3 comments

Rise and Fall of Hosting Provider Gandi.net

https://gagliardoni.net/#20260528_gandi_downfall
2•tomgag•19m ago•2 comments

Google Engineer Charged with Insider Trading on Polymarket

https://www.bloomberg.com/news/articles/2026-05-27/google-engineer-charged-with-insider-trading-o...
5•forthwall•22m ago•0 comments

Charter Communications confirms data breach of apparently 40M records

https://www.techradar.com/pro/security/charter-communications-confirms-data-breach-shinyhunters-b...
2•lschueller•22m ago•0 comments

Wikipedia: Wiki Workers United Solidarity

https://en.wikipedia.org/wiki/Wikipedia:Wiki_Workers_United_solidarity
3•choult•23m ago•0 comments

I built three Wikipedia-based search tools as alternatives to Google AI

https://www.calishat.com/2026/05/21/three-search-alternatives-to-googles-brave-new-ai-world/
1•Calishat•25m ago•1 comments

NASA's Psyche Mission Aces Mars Flyby, Targets Metal-Rich Asteroid

https://www.nasa.gov/missions/psyche-mission/nasas-psyche-mission-aces-mars-flyby-targets-metal-r...
1•bookofjoe•25m ago•0 comments

Interesting possible new Tinder scam at scale

https://www.youtube.com/watch?v=rjxAYdUe8uU
1•lifeisstillgood•26m ago•0 comments

What Emerges When You Don't Break Sustained Coherent Human-AI Interaction

https://zenodo.org/records/20332884
1•Depiphany_Reb•28m ago•0 comments

Taking Naval Options Away from China –| Peter Zeihan [video][4m53s]

https://www.youtube.com/watch?v=NRkZprxYOzQ
1•Bender•28m ago•0 comments

China is keeping its best AI talent to itself via travel restrictions

https://techcrunch.com/2026/05/27/china-is-increasingly-keeping-its-best-ai-talent-to-itself/
1•jnord•29m ago•0 comments

A Google employee allegedly used inside information to win $1.2M on Polymarket

https://www.theverge.com/tech/938635/google-polymarket-insider-trading-prediction-market-bets
4•1vuio0pswjnm7•29m ago•0 comments

Halide Mark III

https://www.lux.camera/halide-mark-iii/
2•witweb•31m ago•0 comments

Keyboard Latency Probe

https://xkqr.org/bellwether/keyboardtest.html
2•birdculture•33m ago•0 comments

Google engineer charged in $1.2M Polymarket case

https://www.axios.com/2026/05/27/google-worker-polymarket-bets-inside-information-charges
7•1vuio0pswjnm7•33m ago•0 comments

Google Employee Charged with Insider Trading on Polymarket

https://www.wsj.com/tech/google-employee-charged-with-insider-trading-on-polymarket-b6a3b60f
4•1vuio0pswjnm7•35m ago•0 comments

Phaistos Disc

https://en.wikipedia.org/wiki/Phaistos_Disc
4•Jimmc414•39m ago•0 comments

Swift-dependencies is an unacceptable solution for managing Swift dependencies

https://adamz.dev/blog/swift-dependencies-warning/
1•zethraeus•40m ago•0 comments

ChatGPT, Claude, or Gemini? Big Pharma Is Choosing Sides

https://www.bigpharmasharma.com/p/chatgpt-claude-or-gemini-big-pharma
2•ShivuBPS•41m ago•1 comments

Ask HN: Gen model to 1) design characters 2) make a consistent comic with them?

3•rvba•41m ago•1 comments

I built a free cross-AI prompt manager (Chrome ext)

https://chromewebstore.google.com/detail/snipprompt-—-save-inject/glpahglhjckmlgpdanoflialkgnjmimm
1•PaoloJNN•42m ago•0 comments

Internet Traffic in Iran Increasing

https://radar.cloudflare.com/traffic/ir?dateRange=28d
10•Cider9986•45m ago•2 comments