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.

Lauf EElja Electric Mountain Bike Review: Power Trip

https://www.wired.com/review/lauf-eelja-electric-mountain-bike/
1•joozio•12s ago•0 comments

SNES-IDE: Your Journey into SNES Game Development

https://github.com/BrunoRNS/SNES-IDE
2•retro_guy•2m ago•0 comments

Show HN: BracketView – JSON viewer/formatter/validator in the browser

https://app.bracketview.in
2•bracketview•2m ago•0 comments

Only 2.5% of 12,779 tech job listings are entry-level

https://www.datamatastudios.com/careers
1•datamatastudios•3m ago•0 comments

Rethinking RSS, newsletters, and how I read every morning

https://sixcolors.com/post/2026/04/rethinking-rss-newsletters-and-how-i-read-every-morning/
1•01-_-•9m ago•0 comments

Show HN: Fact check, summarize, explain any article or webpage on local CPU

https://github.com/kouhxp/fftext
1•mrkn1•9m ago•0 comments

Making a New Plan

https://cate.blog/2026/06/02/making-a-new-plan/
1•adrianhoward•10m ago•0 comments

A nature-inspired ion trap for parallel manipulation of ions on a massive scale

https://www.science.org/doi/10.1126/sciadv.aec7048
1•bookofjoe•11m ago•0 comments

How to Train Your Goblin

https://goblins.mchen.workers.dev/
1•angristan•16m ago•0 comments

Magnetoelectric antennas could transform how underwater robots talk

https://newatlas.com/engineering/magnetoelectric-antennas-submarine-robots-communications/
3•breve•25m ago•0 comments

The Math sales gurus won't show you

https://julienreszka.com/blog/the-math-sales-gurus-won-t-show-you/
3•julienreszka•26m ago•0 comments

ESMFold 2 has the highest throughput on Tenstorrent AI processors

https://twitter.com/moritzthuening/status/2063382385845244281
3•molli•30m ago•0 comments

US to pull jets, destroyers and submarines from NATO in European drawdown

https://www.politico.eu/article/us-to-pull-jets-destroyers-and-submarines-from-nato-in-a-broader-...
4•breve•33m ago•0 comments

The breakneck AI boom is fueling anti-tech extremism

https://www.theguardian.com/technology/2026/jun/07/anti-ai-tech-extremism-violence
3•geox•34m ago•1 comments

If LLMs Have Human-Like Attributes, Then So Does Age of Empires II

https://arxiv.org/abs/2605.31514
2•Luc•34m ago•0 comments

Why Nigeria's stock market is falling – and when analysts expect a rebound

https://nairametrics.com/2026/06/05/why-nigerias-stock-market-is-falling-and-when-analysts-expect...
2•kckkmgboji•39m ago•1 comments

Oklo, a natural nuclear fission reactor

https://en.wikipedia.org/wiki/Natural_nuclear_fission_reactor
2•bkfh•39m ago•0 comments

SQLite-creative-coding: Creative coding in SQL

https://github.com/phenax/sqlite-creative-coding
2•thunderbong•49m ago•0 comments

Show HN: Grafana Cloud observability plugin for Hermes Agent

https://github.com/alexander-akhmetov/sigil-hermes
2•oboroten•51m ago•0 comments

Scientists ejected from diabetes conference for distributing journal reprints

https://arstechnica.com/science/2026/06/scientists-ejected-from-diabetes-conference-for-distribut...
27•BerislavLopac•53m ago•11 comments

Acquired.fm Carve Outs

https://acquired-carve-outs.vercel.app/
2•gwintrob•56m ago•0 comments

Floppy Disk patent was granted today in 1972 – when 80KB took up 8 inches

https://www.tomshardware.com/pc-components/storage/the-floppy-disk-patent-was-granted-today-in-19...
3•giuliomagnifico•1h ago•0 comments

How a PhD is like riding a bike (2025)

https://www.science.org/content/article/how-ph-d-riding-bike
3•the-mitr•1h ago•0 comments

Pennsylvania Healthcare meta analysis for June 2026 [pdf]

https://ia601502.us.archive.org/23/items/pa-rating-area-individual-analyses-june-2026/PA_Rating_A...
2•EddieMunsterrr•1h ago•0 comments

Ask HN: Why do AIs talk like this?

2•keepamovin•1h ago•1 comments

H2JVM – A Haskell Library for Writing JVM Bytecode

https://discourse.haskell.org/t/h2jvm-a-haskell-library-for-writing-jvm-bytecode/14182
2•rowbin•1h ago•0 comments

Automated QA and Testing with AI

https://antirez.com/news/168
3•Chrisszz•1h ago•0 comments

Show HN: YourMemory, agentic memory is a pruning problem, not a hoarding problem

https://yourmemoryai.vercel.app/
19•SachitRafa•1h ago•0 comments

Plumbum v2.0.0 Pythonic Shell Combinators Released

https://plumbum.readthedocs.io/en/latest/
2•GalaxySnail•1h ago•0 comments

An AI Story Just Won the Commonwealth Short Story Prize

https://tumbleweedwords.com/ai-literary-prize-flash-fiction.html
3•tumbleweedwords•1h ago•0 comments